/* ============================================
   Professional Blog Enhanced Styles
   Moti Equipments Industrial Knowledge Hub
   ============================================ */

/* ===== Reading Progress Bar ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #fdc800 0%, #f0ad4e 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 4px rgba(253, 200, 0, 0.3);
}

/* ===== Sticky Table of Contents ===== */
.blog-toc-wrapper {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 25px;
    background: #f9f9f9;
    border-left: 4px solid #fdc800;
    border-radius: 4px;
}

.blog-toc-wrapper h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: # #252525;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc-list li {
    margin-bottom: 12px;
}

.blog-toc-list a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    padding: 8px 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.blog-toc-list a:hover {
    color: #fdc800;
    background: #fff;
    border-left-color: #fdc800;
    padding-left: 16px;
}

.blog-toc-list a.active {
    color: #fdc800;
    background: #fff;
    border-left-color: #fdc800;
    font-weight: 600;
}

/* Mobile TOC */
.blog-toc-mobile {
    display: none;
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    border-left: 4px solid #fdc800;
}

.blog-toc-mobile-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    color: #252525;
}

.blog-toc-mobile-toggle i {
    transition: transform 0.3s ease;
}

.blog-toc-mobile-toggle.active i {
    transform: rotate(180deg);
}

.blog-toc-mobile .blog-toc-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.blog-toc-mobile.expanded .blog-toc-list {
    max-height: 600px;
    margin-top: 15px;
}

@media (max-width: 991px) {
    .blog-toc-wrapper {
        display: none;
    }
    
    .blog-toc-mobile {
        display: block;
    }
}

/* ===== Blog Content Styling ===== */
.blog-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
    font-size: 14px;
    color: #777;
}

.blog-meta-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-meta-info i {
    color: #fdc800;
}

.blog-category-badge {
    display: inline-block;
    background: #fdc800;
    color: #252525;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Typography & Content Hierarchy ===== */
.blog-single-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 50px 0 25px;
    color: #252525;
    line-height: 1.3;
    padding-bottom: 15px;
    border-bottom: 3px solid #fdc800;
}

.blog-single-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 35px 0 20px;
    color: #252525;
    line-height: 1.4;
}

.blog-single-content p {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.blog-single-content ul,
.blog-single-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-single-content li {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 12px;
}

.blog-single-content strong {
    color: #252525;
    font-weight: 600;
}

/* ===== Highlight Box ===== */
.highlight-box {
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    border-left: 5px solid #fdc800;
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.highlight-box p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.highlight-box strong {
    color: #252525;
    font-size: 18px;
}

/* ===== Comparison Tables ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, #252525 0%, #3a3a3a 100%);
}

.comparison-table thead th {
    color: #fff;
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: #f9f9f9;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 16px 15px;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: #252525;
}

/* Mobile table scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .comparison-table {
        font-size: 13px;
    }
    
    .comparison-table thead th,
    .comparison-table td {
        padding: 12px 10px;
    }
}

/* ===== FAQ Accordion ===== */
.blog-faq-section {
    margin: 60px 0 40px;
    background: #f5f5f5;
    padding: 40px;
    border-radius: 8px;
}

.blog-faq-section h2 {
    font-size: 32px;
    margin: 0 0 30px 0;
    border-bottom: none;
}

.faq-item {
    background: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 17px;
    color: #252525;
    background: #fff;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    background: #f9f9f9;
    color: #fdc800;
}

.faq-question .faq-icon {
    font-size: 20px;
    color: #fdc800;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item.active .faq-question .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px;
    background: #f9f9f9;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    margin: 15px 0 0 0;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

/* FAQ Schema Markup (hidden) */
.faq-schema {
    display: none;
}

/* ===== CTA Blocks ===== */
.blog-cta-block {
    background: linear-gradient(135deg, #fdc800 0%, #f0ad4e 100%);
    padding: 35px 40px;
    margin: 50px 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(253, 200, 0, 0.3);
}

.blog-cta-block h3 {
    font-size: 26px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 15px 0;
}

.blog-cta-block p {
    font-size: 17px;
    color: #333;
    margin: 0 0 25px 0;
}

.blog-cta-block .btn {
    background: #252525;
    color: #fff;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-cta-block .btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== Author/Company Box ===== */
.blog-author-box {
    background: #f9f9f9;
    padding: 30px;
    margin: 50px 0;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    display: flex;
    gap: 25px;
    align-items: center;
}

.blog-author-logo {
    flex-shrink: 0;
}

.blog-author-logo img {
    width: 100px;
    height: auto;
}

.blog-author-info h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #252525;
}

.blog-author-info p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 15px 0;
}

.blog-author-contact {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.blog-author-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fdc800;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.blog-author-contact a:hover {
    color: #252525;
}

@media (max-width: 768px) {
    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-author-contact {
        justify-content: center;
    }
}

/* ===== Related Articles Section ===== */
.blog-related-section {
    margin: 60px 0 40px;
}

.blog-related-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    color: #252525;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.blog-related-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-related-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.blog-related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-related-card-content {
    padding: 20px;
}

.blog-related-card-content .category-badge {
    font-size: 11px;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.blog-related-card-content h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.blog-related-card-content h4 a {
    color: #252525;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-related-card-content h4 a:hover {
    color: #fdc800;
}

.blog-related-card-content .read-more {
    color: #fdc800;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 991px) {
    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== WhatsApp Floating Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    animation: float-pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes float-pulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== Blog Listing Enhancements ===== */
.blog-hero-section {
    background: linear-gradient(135deg, #252525 0%, #3a3a3a 100%);
    padding: 80px 0 60px;
    margin-bottom: 60px;
    color: #fff;
    text-align: center;
}

.blog-hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
}

.blog-hero-section .subtitle {
    font-size: 20px;
    color: #fdc800;
    font-weight: 600;
    margin: 0;
}

.blog-hero-section p {
    font-size: 17px;
    color: #ddd;
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* Category Filter */
.blog-category-filter {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.blog-category-filter button {
    background: #fff;
    border: 2px solid #e5e5e5;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-category-filter button:hover,
.blog-category-filter button.active {
    background: #fdc800;
    border-color: #fdc800;
    color: #252525;
}

/* Sticky CTA Banner */
.blog-sticky-cta {
    background: linear-gradient(135deg, #fdc800 0%, #f0ad4e 100%);
    padding: 40px;
    margin: 60px 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(253, 200, 0, 0.3);
}

.blog-sticky-cta h3 {
    font-size: 28px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 15px 0;
}

.blog-sticky-cta p {
    font-size: 17px;
    color: #333;
    margin: 0 0 25px 0;
}

/* ===== Responsive Improvements ===== */
@media (max-width: 991px) {
    .blog-content-wrapper {
        padding: 30px 15px;
    }
    
    .blog-single-content h2 {
        font-size: 28px;
    }
    
    .blog-single-content h3 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .blog-hero-section h1 {
        font-size: 36px;
    }
    
    .blog-hero-section .subtitle {
        font-size: 18px;
    }
    
    .blog-faq-section {
        padding: 25px 20px;
    }
    
    .blog-cta-block {
        padding: 25px 20px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}
