/* ==========================================================================
   Speranza Consulting - Blog Post Styles
   Scoped to .sci-blog-post to avoid leaking into other pages
   ========================================================================== */

:root {
    --sci-blue: #002d5b;
    --sci-gold: #e4cf66;
    --sci-dark: #1a1a1a;
    --sci-body: #3C3950;
    --sci-hover: #ff6c30;
    --sci-light-bg: #f9f9f9;
}

/* ---------- Base Layout ---------- */

.sci-blog-post {
    font-family: 'Roboto', sans-serif;
    color: var(--sci-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

.sci-blog-post *,
.sci-blog-post *::before,
.sci-blog-post *::after {
    box-sizing: border-box;
}

/* ---------- Hero Section with Geometric Pattern ---------- */

.sci-blog-hero-wrap {
    position: relative;
    background: linear-gradient(
        180deg,
        #f0f2f5 0%,
        #e8ecf1 30%,
        #f2f4f7 60%,
        #f8f9fa 80%,
        #ffffff 100%
    );
    overflow: hidden;
    border-bottom: 1px solid #e8ecf1;
}

/* Subtle warm texture */
.sci-blog-hero-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 25% 0%, rgba(0,45,91,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 100%, rgba(228,207,102,0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.sci-blog-hero-wrap::after {
    display: none;
}

.sci-blog-hero {
    position: relative;
    z-index: 3;
    max-width: 1150px;
    margin: 0 auto;
    padding: 80px 20px 100px;
}

.sci-blog-meta {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c9b340;
    margin-bottom: 16px;
    text-shadow: 0 1px 2px rgba(0, 15, 40, 0.15);
}

.sci-blog-meta .sci-meta-separator {
    margin: 0 10px;
    color: #ccc;
}

.sci-blog-post h1.sci-blog-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.15;
    color: var(--sci-blue);
    margin: 0 0 20px;
}

.sci-blog-subtitle {
    font-family: "Roboto", sans-serif;
    font-size: 19px;
    line-height: 1.7;
    color: #5a6577;
    margin-bottom: 0;
}

.sci-blog-featured-image {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto 0;
    display: block;
}

.sci-blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* ---------- Content Area ---------- */

.sci-blog-content-area {
    background: var(--sci-light-bg);
    padding: 60px 20px;
}

.sci-blog-content-card {
    max-width: 1150px;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 50px 60px;
}

/* ---------- Typography ---------- */

.sci-blog-content-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.3;
    color: var(--sci-blue);
    margin: 50px 0 20px;
}

.sci-blog-content-card h2:first-child {
    margin-top: 0;
}

.sci-blog-content-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    color: var(--sci-blue);
    margin: 40px 0 15px;
}

.sci-blog-content-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--sci-blue);
    margin: 30px 0 10px;
}

.sci-blog-content-card p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--sci-body);
}

.sci-blog-content-card a {
    color: var(--sci-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.sci-blog-content-card a:hover {
    color: var(--sci-hover);
}

.sci-blog-content-card strong {
    font-weight: 500;
    color: var(--sci-dark);
}

/* ---------- Guide Box (gold left border callout) ---------- */

.sci-blog-content-card .guide-box,
.sci-blog-content-card blockquote {
    border-left: 5px solid var(--sci-gold);
    background: var(--sci-light-bg);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 0 4px 4px 0;
    font-style: normal;
}

.sci-blog-content-card blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: #555;
}

.sci-blog-content-card blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #999;
    font-style: normal;
}

/* ---------- Lists ---------- */

.sci-blog-content-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sci-blog-content-card ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.7;
}

.sci-blog-content-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--sci-gold);
    border-radius: 50%;
}

.sci-blog-content-card ol {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    counter-reset: sci-counter;
}

.sci-blog-content-card ol li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
    font-size: 17px;
    line-height: 1.7;
    counter-increment: sci-counter;
}

.sci-blog-content-card ol li::before {
    content: counter(sci-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--sci-gold);
    color: var(--sci-blue);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Tables ---------- */

.sci-blog-content-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}

.sci-blog-content-card table thead th {
    background-color: var(--sci-blue);
    color: #fff;
    padding: 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.sci-blog-content-card table tbody td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    color: var(--sci-body);
}

.sci-blog-content-card table tbody tr:last-child td {
    border-bottom: none;
}

.sci-blog-content-card table tbody tr:nth-child(even) {
    background: var(--sci-light-bg);
}

/* ---------- FAQ Section ---------- */

.sci-blog-content-card .faq-item,
.sci-blog-content-card .sci-faq-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.sci-blog-content-card .faq-item:last-child,
.sci-blog-content-card .sci-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sci-blog-content-card .faq-item h3,
.sci-blog-content-card .sci-faq-item h3 {
    margin-top: 0;
    font-size: 20px;
}

/* ---------- Feature Cards (two-column) ---------- */

.sci-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.sci-feature-card {
    border: 1px solid #eee;
    border-top: 3px solid var(--sci-blue);
    padding: 25px;
    border-radius: 4px;
}

.sci-feature-card h3 {
    font-size: 20px;
    margin: 0 0 10px;
}

.sci-feature-card p {
    font-size: 15px;
    margin: 0;
    color: #666;
}

/* ---------- CTA Section ---------- */

.sci-blog-cta {
    text-align: center;
    margin: 50px 0 10px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.sci-blog-cta h2 {
    text-align: center;
}

.sci-blog-cta p {
    text-align: center;
    font-size: 18px;
    color: #666;
}

.sci-blog-cta .gem-button,
.sci-blog-cta .sci-cta-button {
    display: inline-block;
    background-color: var(--sci-blue);
    color: #fff !important;
    padding: 16px 40px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.sci-blog-cta .gem-button:hover,
.sci-blog-cta .sci-cta-button:hover {
    background-color: var(--sci-hover);
    color: #fff !important;
}

/* ---------- Closing Statement ---------- */

.sci-blog-closing {
    max-width: 1150px;
    margin: 0 auto;
    padding: 40px 60px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Images in Content ---------- */

.sci-blog-content-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.sci-blog-content-card .wp-caption {
    max-width: 100%;
    margin: 20px 0;
}

.sci-blog-content-card .wp-caption-text {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-top: 8px;
}

/* ---------- Horizontal Rules ---------- */

.sci-blog-content-card hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .sci-blog-post h1.sci-blog-title {
        font-size: 32px;
    }

    .sci-blog-hero-wrap::after {
        height: 80px;
    }

    .sci-blog-hero {
        padding: 50px 16px 80px;
    }

    .sci-blog-content-card {
        padding: 30px 24px;
    }

    .sci-blog-content-card h2 {
        font-size: 26px;
    }

    .sci-blog-content-card h3 {
        font-size: 20px;
    }

    .sci-feature-grid {
        grid-template-columns: 1fr;
    }

    .sci-blog-closing {
        padding: 30px 24px;
    }

    .sci-blog-content-card table {
        font-size: 13px;
    }

    .sci-blog-content-card table thead th,
    .sci-blog-content-card table tbody td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .sci-blog-post h1.sci-blog-title {
        font-size: 26px;
    }

    .sci-blog-content-card {
        padding: 24px 18px;
    }

    .sci-blog-subtitle {
        font-size: 16px;
    }

    .sci-blog-content-card p,
    .sci-blog-content-card ul li,
    .sci-blog-content-card ol li {
        font-size: 15px;
    }
}

/* ---------- Hide duplicate footer bars on blog posts ---------- */

.sci-blog-post ~ footer.custom-footer,
body.single-post footer.custom-footer {
    display: none !important;
}

body.single-post footer#footer-nav,
body.single-post .footer-site-info {
    display: none !important;
}

/* ---------- Fix: Table header strong text must be white ---------- */

.sci-blog-content-card table thead th,
.sci-blog-content-card table thead th strong,
.sci-blog-content-card table thead th * {
    color: #fff !important;
}

/* ---------- Fix: Checkmark paragraphs styled like bullet lists ---------- */

.sci-blog-content-card p:has(> strong:first-child) {
    /* fallback handled below */
}

/* Style paragraphs starting with checkmark characters as list items */
.sci-blog-content-card > p > strong:first-child {
    /* Let normal flow handle this */
}

/* Checkmark list styling via CSS */
.sci-blog-content-card .checkmark-item,
.sci-blog-content-card p:has(> strong:first-child) {
    position: relative;
}

/* Universal checkmark paragraph styling - targets paragraphs beginning with ✓ ✔ */
.sci-blog-content-card > p {
    /* Check if starts with checkmark - handled by JS fallback if needed */
}

/* ---------- Fix: Mobile-friendly tables with horizontal scroll ---------- */

.sci-blog-content-card .wp-block-table,
.sci-blog-content-card figure.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 30px 0;
}

.sci-blog-content-card .wp-block-table table,
.sci-blog-content-card figure.wp-block-table table {
    min-width: 600px;
}

@media (max-width: 768px) {
    .sci-blog-content-card table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .sci-blog-content-card table thead,
    .sci-blog-content-card table tbody,
    .sci-blog-content-card table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .sci-blog-content-card table {
        min-width: 650px;
        white-space: normal;
    }
}

/* ---------- Checkmark items - numbered gold circle style ---------- */

.sci-blog-content-card p.sci-checkmark-item {
    position: relative;
    padding-left: 65px;
    margin-bottom: 30px;
    line-height: 1.7;
    text-indent: 0;
}

.sci-blog-content-card p.sci-checkmark-item::before {
    content: attr(data-check-num);
    position: absolute;
    left: 0;
    top: 2px;
    width: 44px;
    height: 44px;
    background: var(--sci-gold);
    color: var(--sci-blue);
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sci-blog-content-card p.sci-checkmark-item strong:first-child {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--sci-blue);
    margin-bottom: 6px;
    line-height: 1.3;
}

