﻿/* =========================================
   NDX PREMIUM BLOG STYLES
========================================= */

.ndx-blog-wrapper {
    padding: 3rem 2rem 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


.ndx-hero-fullbleed {
    width: 100%;
    max-width: 1920px; /* Caps the scaling on massive ultra-wide monitors */
    margin: 0 auto; /* Centers the entire block on ultra-wides */
    background: #ffffff;
}
/* DEFAULT: Massive Screens (>1400px) */
.ndx-hub-hero {
    position: relative;
    width: 100%;
    height: 490px;
    min-height: 490px;
    background-position: center bottom !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ndx-hub-hero-overlay {
    position: relative;
    text-align: left;
    padding: 0;
    max-width: 600px;
    width: 100%;
}

    .ndx-hub-hero-overlay h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        font-weight: 800;
        color: #002b5c;
        margin-bottom: 1rem;
        line-height: 1.2;
    }

    .ndx-hub-hero-overlay p {
        font-size: 1.25rem;
        color: #333;
        margin: 0;
    }

/* FIX 1: Standard Laptops (<1400px) */
@media (max-width: 1400px) {
    .ndx-hub-hero {
        height: 350px;
        min-height: 350px;
    }

    .ndx-hub-hero-overlay {
        max-width: 450px;
    }

        .ndx-hub-hero-overlay h1 {
            font-size: clamp(2.5rem, 5vw, 3rem);
        }

        .ndx-hub-hero-overlay p {
            font-size: 1.05rem;
        }
}

/* FIX 2: The Smart Stack for Small Laptops & Tablets (<1300px) */
@media (max-width: 1300px) {
    .ndx-hub-hero {
        background-image: none !important; /* Drops the heavily cropped image */
        height: auto;
        min-height: auto;
        padding: 2rem 1rem 4rem 1rem;
        align-items: center;
        justify-content: center;
    }

    .ndx-hub-hero-overlay {
        background: transparent;
        margin: 0 auto;
        padding: 0;
        max-width: 800px;
        text-align: center; /* Centers the text cleanly */
    }
}

/* MOBILE PHONES (< 768px) */
@media (max-width: 768px) {
    .ndx-hero-fullbleed {
        padding-top: 4rem; /* Keeps the sticky header from overlapping */
    }

    .ndx-hub-hero-overlay h1 {
        font-size: clamp(2rem, 8vw, 2.75rem); /* Slightly smaller H1 for tiny screens */
    }
}

/* FIX 3: Mobile Phones (<768px) */
@media (max-width: 768px) {
    .ndx-hub-hero {
        padding-top: 0; 
    }

    .ndx-hub-hero-overlay {
        padding: 1.5rem 1rem;
    }
}


.ndx-blog-header {
    text-align: center;
    margin-bottom: 4rem;
}

    .ndx-blog-header h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        font-weight: 800;
        color: #002b5c;
    }

    .ndx-blog-header p {
        font-size: 1.25rem;
        color: #555;
        max-width: 800px;
        margin: 1rem auto 0;
    }

/* Premium Card Design (Flexbox Centering Fix) */
.ndx-blog-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This mathematically centers any leftover cards */
    gap: 2.5rem;
}

.ndx-blog-card {
    /* Desktop: 3 cards per row (subtracting the gap space) */
    width: calc(33.333% - 1.67rem);
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .ndx-blog-card:hover {
        transform: translateY(-8px) !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    }

    .ndx-blog-card img.teaser-img {
        width: 100%;
        height: 240px;
        object-fit: cover;
        border-bottom: 4px solid #f2a900;
    }

.ndx-blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ndx-blog-card-meta {
    font-size: 0.85rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.ndx-blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #002b5c;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.ndx-blog-card-summary {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* TABLET: Drop to 2 columns */
@media (max-width: 1024px) {
    .ndx-blog-card {
        width: calc(50% - 1.25rem);
    }
}

/* MOBILE: Drop to 1 column */
@media (max-width: 768px) {
    .ndx-blog-card {
        width: 100%;
        max-width: 450px;
    }
}

/* --- 2. ARTICLE DETAIL PAGE --- */
.ndx-article-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem 1.5rem;
}

.ndx-article-header {
    text-align: center;
    margin-bottom: 3rem;
}

    .ndx-article-header h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
        font-weight: 800;
        color: #002b5c;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }

.ndx-article-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

    .ndx-article-author img {
        width: 55px;
        height: 55px;
        border-radius: 50%;
        object-fit: cover;
    }

.ndx-article-author-info {
    text-align: left;
}

.ndx-article-author-name {
    font-weight: 600;
    color: #002b5c;
    margin: 0;
    font-size: 1.1rem;
}

.ndx-article-date {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}

.ndx-article-hero-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- 3. WYSIWYG EDITOR OVERRIDES (THE IDIOT-PROOFING) --- */
.ndx-prose,
.ndx-prose p,
.ndx-prose span,
.ndx-prose li {
    font-size: 1.25rem !important;
    line-height: 1.8 !important;
    color: #333 !important;
}

    .ndx-prose img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
        display: block;
        margin: 2.5rem auto;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }

    .ndx-prose iframe {
        max-width: 100%;
    }

    .ndx-prose h2 {
        font-size: 2.25rem !important;
        color: #002b5c !important;
        margin: 3rem 0 1.25rem 0 !important;
        font-weight: 700 !important;
    }

    .ndx-prose h3 {
        font-size: 1.75rem !important;
        color: #002b5c !important;
        margin: 2.5rem 0 1rem 0 !important;
        font-weight: 600 !important;
    }

    .ndx-prose p {
        margin-bottom: 1.75rem !important;
    }

    .ndx-prose blockquote {
        font-size: 1.35rem !important;
        border-left: 5px solid #f2a900 !important;
        padding: 1rem 1.5rem !important;
        background: #f9f9f9 !important;
        font-style: italic !important;
        margin: 2rem 0 !important;
        color: #555 !important;
    }

    /* --- 4. THE WYSIWYG SIDE-BY-SIDE IMAGE TRICK --- */
    .ndx-prose table {
        width: 100% !important;
        border-collapse: collapse;
        margin: 2.5rem 0;
    }

    .ndx-prose td {
        padding: 0 15px;
        vertical-align: top;
        border: none !important;
    }

@media (max-width: 768px) {
    .ndx-prose table, .ndx-prose tbody, .ndx-prose tr, .ndx-prose td {
        display: block;
        width: 100% !important;
    }

    .ndx-prose td {
        padding: 0 0 1.5rem 0;
    }
}
