/* ============================================================
   Vision Bars — Blog Article Styles
   Uses existing site CSS variables (--navy, --primary, etc.)
   ============================================================ */

/* ── Global overrides: beat layout.css h3 (#6B7280) and p (#6B7280) ── */
.blog-post-header h1,
.blog-post-header h2,
.blog-post-header h3,
.blog-post-header h4,
.blog-section h3,
.blog-section h4,
.blog-section-comparison-copy h3,
.blog-checklist h3,
.blog-section-text-only h3,
.blog-section-table h3 {
    color: #082b49 !important;
}

.blog-intro p,
.blog-intro li,
.blog-section-copy p,
.blog-section-copy li,
.blog-section-comparison-copy p,
.blog-section-comparison-copy li,
.blog-checklist li,
.blog-section-text-body p,
.blog-section-text-body li,
.blog-section-table p,
.blog-table td {
    color: #111111 !important;
}

/* ── Hero ──────────────────────────────────────────────────── */
.blog-article-hero {
    padding: 2rem 0 0;
}
.blog-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}

@media (max-width: 600px) {
    .blog-hero-img {
        max-height: 220px;
        border-radius: 0.5rem;
    }
}

/* ── Post Header ───────────────────────────────────────────── */
.blog-post-header {
    padding-bottom: 1.75rem;
    border-bottom: 3px solid var(--primary, #e67e22);
    margin-bottom: 2.5rem;
}
.blog-post-header .section-kicker {
    display: inline-block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary, #e67e22);
}
.blog-post-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.2;
    color: #082b49;
    margin: 0 0 1.25rem;
}

/* ── Meta row (date / author / read time) ──────────────────── */
.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #111111;
    font-size: 0.9375rem;
}
.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.blog-post-meta img {
    width: 16px;
    height: 16px;
    opacity: 0.55;
    filter: brightness(0) saturate(100%) invert(14%) sepia(86%)
            saturate(1243%) hue-rotate(185deg) brightness(92%) contrast(101%);
}

/* ── Introduction text ─────────────────────────────────────── */
.blog-intro {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #111111;
    margin-bottom: 3rem;
}
.blog-intro p { margin-bottom: 1.25rem; }

/* ── Standard section (text + image) ──────────────────────── */
.blog-section {
    margin: 0 0 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 14px rgba(8,43,73,0.06);
}
.blog-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}
@media (min-width: 768px) {
    .blog-section-grid {
        grid-template-columns: 1fr 1fr;
    }
    /* Even sections: text left, image right (default) */
    /* Odd sections: image left, text right */
    .blog-section.reverse .blog-section-grid {
        direction: rtl;
    }
    .blog-section.reverse .blog-section-grid > * {
        direction: ltr;
    }
}
.blog-section-copy h3 {
    margin: 0 0 0.875rem;
    font-size: clamp(1.1rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #082b49;
}
.blog-section-copy p {
    margin-bottom: 0.875rem;
    line-height: 1.75;
    color: #111111;
}
.blog-section-image img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    display: block;
}
.blog-section-caption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    color: #111111;
    text-align: center;
    font-style: italic;
}

/* ── Comparison section (Before / After) ──────────────────── */
.blog-section-comparison {
    /* same card style as .blog-section */
}
.blog-section-comparison-copy {
    margin-bottom: 1.25rem;
}
.blog-section-comparison-copy h3 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.1rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #082b49;
}
.blog-section-comparison-copy p {
    margin-bottom: 0.75rem;
    line-height: 1.75;
    color: #111111;
}
.blog-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 560px) {
    .blog-comparison { grid-template-columns: 1fr; }
}
.comparison-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}
.comparison-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.comparison-label {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: var(--primary, #e67e22);
    color: #fff;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
}
.comparison-item.after .comparison-label {
    background: var(--navy, #082b49);
}

/* ── Checklist section ─────────────────────────────────────── */
.blog-checklist {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary, #e67e22);
}
.blog-checklist h3 {
    margin: 0 0 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #082b49;
}
.blog-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-checklist li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #111111;
}
.blog-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary, #e67e22);
    font-weight: 700;
}

/* ── Text-only section ────────────────────────────────────── */
.blog-section-text-only {
    /* inherits .blog-section card style */
}
.blog-section-text-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #111111;
}
.blog-section-text-body p { margin-bottom: 0.875rem; }
.blog-section-text-body a {
    color: var(--primary, #e67e22);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Table section ─────────────────────────────────────────── */
.blog-section-table {
    /* inherits .blog-section card style */
}
.blog-table-wrap {
    overflow-x: auto;
    margin-top: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    -webkit-overflow-scrolling: touch;
}
.blog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.blog-table thead tr {
    background: var(--navy, #082b49);
    color: #ffffff;
}
.blog-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.blog-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #111111;
    vertical-align: top;
}
.blog-table tbody tr:last-child td {
    border-bottom: none;
}
.blog-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.blog-table tbody tr:hover {
    background: #fff7ed;
}

/* ── Table: stacked card layout on mobile ─────────────────── */
@media (max-width: 600px) {
    .blog-table-wrap {
        border: none;
        overflow-x: visible;
    }
    .blog-table,
    .blog-table thead,
    .blog-table tbody,
    .blog-table th,
    .blog-table td,
    .blog-table tr {
        display: block;
        width: 100%;
    }
    .blog-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
        visibility: hidden;
    }
    .blog-table tbody tr {
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
        background: #fff;
        box-shadow: 0 1px 4px rgba(8,43,73,0.06);
    }
    .blog-table tbody tr:nth-child(even) {
        background: #fff;
    }
    .blog-table td {
        border: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 0.6rem 1rem;
        position: relative;
        padding-left: 45%;
        white-space: normal;
        text-align: left;
        color: #111111;
    }
    .blog-table td:last-child {
        border-bottom: none;
    }
    .blog-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        top: 0.6rem;
        width: 40%;
        font-weight: 700;
        font-size: 0.8125rem;
        color: var(--navy, #082b49);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── Article footer CTA ────────────────────────────────────── */
.article-footer-cta {
    margin-top: 4rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--navy, #082b49) 0%, #0d3d68 100%);
    border-radius: 1rem;
    text-align: center;
    color: #fff;
}
.article-footer-cta h3 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.2rem, 2.5vw, 1.625rem);
    color: #fff;
}

/* ── Body text inside sections ─────────────────────────────── */
.blog-post-content p,
.blog-section-copy p,
.blog-section-comparison-copy p,
.blog-checklist p {
    margin-bottom: 0.875rem;
    line-height: 1.75;
}
.blog-post-content a,
.blog-section-copy a {
    color: var(--primary, #e67e22);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.blog-post-content a:hover,
.blog-section-copy a:hover {
    color: #082b49;
}

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 640px) {
    .blog-section { padding: 1.25rem; }
    .blog-checklist { padding: 1.25rem; }
    .article-footer-cta { padding: 1.75rem 1.25rem; }
}
