/* =========================================
   Sleep Health Metrics — Article-specific overrides
   Shared base styles: ../shared/blog-article.css
   This article uses a light (#EBEBE3) background.
   All rules below use !important to override the shared dark defaults.
   ========================================= */

/* Part 2 CTA card — transparent, no padding (this article does not use the blue CTA default) */
.blog-part.part2 {
    border-radius: 30px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 !important;
    gap: 0 !important;
}

/* Light background overrides */
body {
    background: #EBEBE3 !important;
    color: #191919 !important;
    background-image: none !important;
}

.blog-detail-page {
    background: #EBEBE3 !important;
}

.blog-detail-container {
    width: min(100% - 48px, 860px) !important;
    max-width: 860px !important;
    margin: 0 auto !important;
    padding: 136px 0 72px !important;
}

.blog-part {
    width: 100% !important;
    margin-left: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #191919 !important;
}

.part1 {
    display: flex !important;
    height: auto !important;
    margin-bottom: 42px !important;
    align-items: center !important;
    text-align: center !important;
}

.part1-title {
    font-family: "Playfair Display", serif !important;
    font-size: clamp(34px, 4.2vw, 48px) !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    color: #191919 !important;
}

.part1-subtitle {
    margin-bottom: 0 !important;
    color: rgba(25, 25, 25, 0.68) !important;
}

.part-metrics-table {
    display: block !important;
    margin-bottom: 56px !important;
    overflow: visible !important;
}

.metrics-table {
    display: grid !important;
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.15fr);
    gap: 2px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(25, 25, 25, 0.08);
    border-radius: 14px;
    background: rgba(25, 25, 25, 0.08);
}

.metrics-col {
    display: grid !important;
    grid-template-rows: 52px repeat(3, 52px) minmax(92px, auto) repeat(5, 52px);
    gap: 2px;
    min-width: 0;
}

.metrics-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #777666 !important;
    color: #EBEBE3 !important;
    font: 600 17px/1.2 "Inter", sans-serif !important;
    text-align: center;
}

.metrics-row {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 0 !important;
    padding: 12px 16px !important;
    background: #f7f7f1 !important;
    color: #191919 !important;
    font: 400 16px/1.35 "Inter", sans-serif !important;
    text-align: center;
}

.metrics-col-label .metrics-row {
    color: #6E5337 !important;
    font-weight: 600 !important;
}

.metrics-row-link {
    text-decoration: none !important;
}

.metrics-row-link:hover,
.metrics-row-link:focus-visible {
    color: #8F5624 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.metrics-row-tall {
    min-height: 0 !important;
    font-size: 15px !important;
}

.part-section {
    display: block !important;
    margin-bottom: 54px !important;
    scroll-margin-top: 96px;
}

.section-title,
.part9-title {
    margin: 0 0 24px !important;
    color: #191919 !important;
    font-family: "Playfair Display", serif !important;
    font-size: clamp(30px, 3.2vw, 38px) !important;
    font-weight: 500 !important;
    line-height: 1.16 !important;
}

.qa-block {
    width: 100%;
    margin: 0 0 30px !important;
    padding: 28px 30px;
    border: 1px solid rgba(25, 25, 25, 0.08);
    border-radius: 20px;
    background: #f7f7f1;
}

.qa-block:last-child {
    margin-bottom: 0 !important;
}

.qa-question {
    margin: 0 0 12px !important;
    color: #191919 !important;
    font: 600 20px/1.35 "Inter", sans-serif !important;
}

.qa-label {
    margin: 0 0 8px !important;
    color: #6E5337 !important;
    font: 600 16px/1.35 "Inter", sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-text {
    color: #191919 !important;
    font: 400 17px/1.65 "Inter", sans-serif !important;
}

.section-text strong,
.section-note strong {
    color: #191919 !important;
    font-weight: 700;
}

.section-bullet {
    padding-left: 0 !important;
}

.part9 {
    display: block !important;
    margin-top: 68px !important;
}

.part9-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px !important;
    width: 100%;
}

.topic-card {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid rgba(25, 25, 25, 0.08) !important;
    border-radius: 20px !important;
    background: #f7f7f1 !important;
    box-shadow: none !important;
}

.topic-card-img {
    width: 100% !important;
    height: 165px !important;
    border-radius: 0 !important;
    object-fit: cover !important;
}

.topic-card-body {
    padding: 18px 20px 22px !important;
}

.topic-card-title {
    color: #191919 !important;
    font-family: "Playfair Display", serif !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 1.18 !important;
}

/* Quote card unique layout for this article */
.quote-card-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0;
}

.quote-text {
    flex: 1;
}

.quote-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #191919;
    border: 1px solid #333333;
}

.quote-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Part 2: intro section (not a CTA in this article) */
.part2-intro {
    font-family: "Inter", sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #DCDCDC;
    line-height: 1.6;
    margin: 0 0 16px 0;
    width: 100%;
}

.part2-text {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: #DCDCDC;
    line-height: 1.6;
    margin: 0;
    width: 100%;
}

/* Label inside section text */
.label {
    font-family: "Inter", sans-serif;
    font-weight: 800;
    color: #FFFFFF;
}

/* =========================================
   Responsive — Mobile overrides
   ========================================= */
@media (max-width: 768px) {
    .blog-detail-container {
        width: min(100% - 32px, 520px) !important;
        padding: 92px 0 50px !important;
    }

    .part1 {
        align-items: center !important;
        text-align: center !important;
    }

    .part1-title {
        font-size: 34px !important;
        text-align: center !important;
    }

    .part1-subtitle {
        justify-content: center !important;
        text-align: center !important;
    }

    .blog-part.part2 {
        border-radius: 24px !important;
        flex-direction: column;
        height: auto;
        padding: 32px 20px;
    }

    .part-metrics-table {
        overflow-x: visible !important;
        padding-bottom: 4px !important;
    }

    .metrics-table {
        min-width: 0 !important;
        grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
        border-radius: 10px;
    }

    .metrics-col {
        grid-template-rows: 42px repeat(3, minmax(42px, auto)) minmax(104px, auto) repeat(5, minmax(42px, auto));
    }

    .metrics-header,
    .metrics-row {
        padding: 8px 5px !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
    }

    .metrics-row-tall {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }

    .qa-block {
        padding: 22px 20px;
        border-radius: 16px;
    }

    .section-title,
    .part9-title {
        font-size: 28px !important;
    }

    .qa-question {
        font-size: 18px !important;
    }

    .qa-label,
    .section-text {
        font-size: 16px !important;
    }

    .part9-cards {
        grid-template-columns: 1fr;
        gap: 12px !important;
    }

    /* Quote card — visible frame + stacked vertically on mobile */
    .part1-quote-card {
        background-color: rgba(245, 245, 245, 0.10);
        background-image: none;
        border: none;
        border-radius: 30px;
        padding: 20px;
        margin-top: 12px;
    }

    .quote-card-inner {
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 16px;
    }

    .quote-avatar {
        order: -1;
        width: 80px;
        height: 80px;
    }

    .quote-text {
        font-size: 16px;
    }
}
