/* ==========================================================================
   🎨 1. GLOBAL VARIABLES & BRAND IDENTITY (MINDRIVE COLORS)
   ========================================================================== */
:root {
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --heading-font: "Lato", sans-serif;
    --nav-font: "Poppins", sans-serif;

    /* Mindrive Premium Palette */
    --primary-blue: #1E3A8A;
    --energy-orange: #F97316;
    --white: #FFFFFF;
    --dark-gray: #1F2937;
    --light-gray: #F3F4F6;
    --shadow: 0 10px 30px rgba(30, 58, 138, 0.08);
    --shadow-hover: 0 20px 50px rgba(30, 58, 138, 0.18);
    
    /* Fallbacks Integration */
    --background-color: #ffffff;
    --default-color: var(--dark-gray); 
    --heading-color: #292929;
    --accent-color: var(--energy-orange); 
    --surface-color: #ffffff; 
    --contrast-color: #ffffff; 
}

.light-background {
    --background-color: #f8f8f8;
    --surface-color: #ffffff;
}

.dark-background {
    --background-color: #01020e;
    --default-color: #ffffff;
    --heading-color: #ffffff;
    --surface-color: #252525;
    --contrast-color: #ffffff;
}

.text-orange { color: var(--energy-orange); }

/* ==========================================================================
   💻 2. DESKTOP ARCHITECTURE & CARDS GRID (INDEX PAGE)
   ========================================================================== */
.blog-listing-section {
    padding: 60px 0 100px;
    background-color: #f8fafc;
}

.blog-page-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.blog-page-header h1 {
    font-size: 3rem;
    margin: 15px 0;
    color: #1e293b;
    font-weight: 800;
}

.blog-grid {
    display: grid !important;
    gap: 24px !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Fixed 3 Columns Layout on Desktop */
}

/* Premium Core Blog Card Grid Item */
.blog-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--energy-orange);
}

/* 16:9 Aspect Ratio Engine with Zoom Transitions */
.blog-card .blog-thumb-link, 
.blog-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9 !important; /* Forces 16:9 ratio dynamically */
    overflow: hidden;
    background: #eee;
    display: block;
}

.blog-card img, 
.blog-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    border-bottom: 1px solid #e5e7eb;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover img,
.blog-card:hover .blog-img-container img {
    transform: scale(1.1);
}

/* Floating Badges Component Layout */
.category-badge, 
.blog-content .badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 2;
    border: none;
}

/* Content Information Area Layout */
.blog-content, .blog-info {
    padding: 24px 30px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Title Truncation (2-Lines Symmetry Boundary) */
.blog-content h3, .blog-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.35;
    height: 52px; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s;
}

.blog-content h3 a, .blog-info h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card:hover h3, 
.blog-card:hover h3 a { 
    color: var(--energy-orange); 
}

/* Excerpt Truncation (3-Lines Symmetry Boundary) */
.blog-content p, .blog-info p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 10px 0;
    flex-grow: 1;
    height: 68px; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Inline Card Layout Anchor Filter */
.blog-content a:not(h3 a):not(.read-more) {
    color: var(--energy-orange);
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
}
.blog-content a:not(h3 a):not(.read-more):hover {
    text-decoration: underline;
    opacity: 0.85;
}

.read-more, .read-more-btn {
    margin-top: auto;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: color .18s ease;
}

.read-more:hover, .read-more-btn:hover {
    color: var(--energy-orange);
}

/* ==========================================================================
   📱 3. MOBILE & TABLET ANTI-AWKWARD RESPONSE ENGINE (MAX 991px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .blog-page-header h1 { 
        font-size: 2.2rem; 
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Forced 2 Columns on Mobile Devices */
        gap: 12px !important;
    }

    .blog-card {
        border-radius: 16px;
    }

    .blog-content, .blog-info {
        padding: 14px 14px 16px;
        gap: 6px;
    }

    /* Font Compression Matrix for Small Devices */
    .blog-content h3, .blog-info h3 {
        font-size: 0.92rem;
        line-height: 1.3;
        height: 38px; 
    }

    .blog-content p, .blog-info p {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 6px;
        height: 34px; 
        -webkit-line-clamp: 2;
    }
    
    .read-more, .read-more-btn {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   📄 4. SINGLE POST ARCHITECTURE LAYOUT WRAPPER
   ========================================================================== */
#readingProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--energy-orange), #ffae00);
    width: 0%;
    z-index: 99999;
    transition: width 0.1s ease-out;
}

.single-breadcrumb {
    background: #f9fafb;
    font-size: 0.86rem;
    border-bottom: 1px solid #e5e7eb;
}
.single-breadcrumb .breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}
.single-breadcrumb .breadcrumb a:hover {
    color: #111827;
}

.single-wrapper { background: #f3f4f6; }

.single-wrapper .single-article {
    background: #ffffff;
    border-radius: 18px;
    padding: 26px 28px 30px;
    box-shadow: 0 18px 45px rgba(15,23,42,0.08);
}

.single-wrapper .single-title {
    max-width: 760px;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
}
.single-wrapper .single-meta { font-size: 0.9rem; color: #6b7280; }
.single-wrapper .single-meta i { color: #9ca3af; }
.single-wrapper .single-meta span { display: inline-flex; align-items: center; gap: 4px; }
.single-wrapper .single-meta span + span { margin-left: 14px; }

.single-wrapper .single-hero-image { margin-top: 20px; margin-bottom: 18px; }
.single-wrapper .single-hero-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.28);
}

/* 📂 Premium Table of Contents (TOC) Module Layout */
.premium-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 30px 0;
}
.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}
.toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toc-list li a {
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.toc-list li a:hover {
    color: var(--energy-orange);
}
.toc-indent {
    padding-left: 18px;
    font-size: 0.9rem;
}

/* ==========================================================================
   ✒️ 5. HIGH-FOCUS EDITORIAL TYPOGRAPHY ENGAGEMENT (SINGLE BODY)
   ========================================================================== */
.single-wrapper .single-body {
    font-family: "Georgia", serif; /* Serif core configuration locks long-dwell reading focus */
    font-size: 1.15rem;
    line-height: 1.9;
    color: #292d32;
    letter-spacing: -0.01em;
}

.single-wrapper .single-body h2 {
    font-family: var(--heading-font);
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 45px;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.single-wrapper .single-body h3 {
    font-family: var(--heading-font);
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 35px;
    margin-bottom: 12px;
}

.single-wrapper .single-body p { margin-bottom: 24px; }
.single-wrapper .single-body strong { color: #000000; font-weight: 700; }
.single-wrapper .single-body ul, .single-wrapper .single-body ol { padding-left: 24px; margin-bottom: 28px; }
.single-wrapper .single-body li { margin-bottom: 10px; padding-left: 4px; }

.single-wrapper .single-body blockquote {
    background: #fff7ed;
    border-left: 4px solid var(--energy-orange);
    padding: 20px 24px;
    margin: 35px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #475569;
}

.single-wrapper .single-body a {
    color: var(--energy-orange);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(249, 115, 22, 0.2);
    transition: all 0.2s ease;
}

.single-wrapper .single-body a:hover {
    color: #000000;
    border-bottom-color: #000000;
}

/* High-End First Letter Magazine Drop-Cap */
.single-wrapper .single-body > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 800;
    float: left;
    line-height: 1;
    margin-right: 10px;
    color: var(--energy-orange);
    font-family: var(--heading-font);
}

/* Dynamic Social Share Link Anchors Module Layout */
.share-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}
.share-btn:hover { opacity: 0.85; }
.share-btn.wa { background: #25D366; }
.share-btn.ln { background: #0077B5; }
.share-btn.tw { background: #000000; }

/* ==========================================================================
   📨 6. PREMIUM FLOATING LEAD CAPTURE FORM SYSTEM (SIDEBAR)
   ========================================================================== */
.premium-form-widget {
    border: none !important;
}
.input-group-wp {
    position: relative;
    margin-bottom: 4px;
}
.wp-input-field {
    width: 100%;
    padding: 12px;
    font-size: 0.92rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    background: transparent;
    transition: border-color 0.2s ease;
}
.wp-input-field:focus {
    border-color: var(--energy-orange);
}
.wp-floating-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    padding: 0 4px;
    color: #64748b;
    font-size: 0.92rem;
    pointer-events: none;
    transition: 0.2s ease all;
}
textarea.wp-input-field ~ .wp-floating-label {
    top: 24px;
}
.wp-input-field:focus ~ .wp-floating-label,
.wp-input-field:not(:placeholder-shown) ~ .wp-floating-label {
    top: 0px;
    font-size: 0.78rem;
    color: var(--energy-orange);
    font-weight: 600;
}

/* ==========================================================================
   📦 7. FOOTER CTA, SIDEBARS & UTILITIES MISC
   ========================================================================== */
.blog-footer-cta {
    background: var(--energy-orange);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 4rem;
}
.blog-footer-cta .cta-button {
    background: #fff !important;
    color: var(--energy-orange) !important;
    margin-top: 20px;
}

.single-wrapper .single-footer { background: #f9fafb; border-radius: 12px; }
.single-wrapper .single-footer .badge { cursor: pointer; transition: background .18s ease, transform .18s ease; }
.single-wrapper .single-footer .badge:hover { background: #e5e7eb; transform: translateY(-1px); }

.single-wrapper .single-related .card {
    border-radius: 14px;
    overflow: hidden;
    border: 0;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
    transition: transform .18s ease, box-shadow .18s ease;
}
.single-wrapper .single-related .card-img-top { height: 120px; object-fit: cover; }
.single-wrapper .single-related .card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(15,23,42,0.16); }
.single-wrapper .single-related .card-title { font-size: 0.95rem; font-weight: 600; }

.single-wrapper .single-sidebar .card { border-radius: 16px; }
.single-wrapper .single-sidebar .card-title { font-weight: 700; }
.single-wrapper .single-sidebar a { text-decoration: none; }
.single-wrapper .single-sidebar a:hover { text-decoration: underline; }

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.cta-button i { transition: transform 0.3s ease; }
.cta-button:hover { background: var(--accent-color); color: var(--contrast-color); }
.cta-button:hover i { transform: translateX(5px); }

/* Responsive Grid Scopes Overwrite for Article viewports */
@media (max-width: 767.98px) {
    .single-wrapper .single-article { padding: 18px 16px 22px; border-radius: 14px; }
    .single-wrapper .single-title { font-size: 1.6rem; }
    .single-wrapper .single-body { font-size: 1.08rem; line-height: 1.8; }
    .single-wrapper .single-body h2 { font-size: 1.5rem; margin-top: 35px; }
}

.single-sidebar-form .form-control,
.single-sidebar-form .form-select { font-size: 0.9rem; }
.single-sidebar-form textarea { resize: vertical; }
