/* =========================================
   HEALTH LIBRARY HERO
========================================= */

.library-hero {
    width: 100%;
    box-sizing: border-box;

    padding: 120px 20px;

    background:
        radial-gradient(
            circle at 85% 20%,
            #d9f5f7,
            #f7fcfc 65%
        );

    text-align: center;
}


/* =========================================
   HERO CONTAINER
========================================= */

.library-hero .section-container {
    width: min(1180px, 92%);
    max-width: 1180px;

    margin-left: auto;
    margin-right: auto;

    display: flex;
    justify-content: center;
}


/* =========================================
   HERO CONTENT
========================================= */

.library-hero-content {
    width: 100%;
    max-width: 900px;

    margin-left: auto;
    margin-right: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================
   HERO HEADING
========================================= */

.library-hero h1 {
    width: 100%;

    margin-top: 12px;

    color: #064D59;

    font-size: clamp(42px, 5vw, 60px);

    line-height: 1.08;

    letter-spacing: -2px;

    text-align: center;
}


.library-hero h1 span {
    color: #0BA2B2;
}


/* =========================================
   HERO DESCRIPTION
========================================= */

.library-hero p {
    width: 100%;
    max-width: 650px;

    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;

    color: #71868A;

    font-size: 14px;

    line-height: 1.8;

    text-align: center;
}


/* =========================================
   SEARCH
========================================= */

.library-search {
    display: flex;

    align-items: center;

    width: 100%;
    max-width: 780px;

    height: 56px;

    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;

    padding-left: 18px;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid #DBE9EB;

    border-radius: 12px;

    box-shadow:
        0 12px 30px rgba(5, 70, 80, .06);
}


.library-search span {
    flex-shrink: 0;

    color: #0BA2B2;

    font-size: 22px;
}


.library-search input {
    flex: 1;

    min-width: 0;

    height: 100%;

    padding: 0 14px;

    border: none;

    outline: none;

    background: transparent;

    color: #064D59;

    font-family: inherit;

    font-size: 13px;
}


.library-search button {
    flex-shrink: 0;

    height: 42px;

    margin-right: 7px;

    padding: 0 20px;

    border: none;

    border-radius: 8px;

    background: #075763;

    color: #FFFFFF;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.25s ease;
}


.library-search button:hover {
    background: #064D59;

    transform: translateY(-1px);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .library-hero {
        padding: 80px 16px;
    }


    .library-hero .section-container {
        width: 100%;
    }


    .library-hero-content {
        max-width: 100%;
    }


    .library-hero h1 {
        font-size: clamp(36px, 9vw, 48px);

        letter-spacing: -1.5px;
    }


    .library-hero p {
        max-width: 600px;

        font-size: 13px;
    }


    .library-search {
        max-width: 100%;

        height: 54px;
    }

}


@media (max-width: 480px) {

    .library-hero {
        padding: 65px 15px;
    }


    .library-hero h1 {
        font-size: 36px;
    }


    .library-search {
        height: 52px;

        padding-left: 12px;
    }


    .library-search input {
        padding: 0 8px;

        font-size: 12px;
    }


    .library-search button {
        height: 40px;

        padding: 0 14px;
    }

}

/* =========================================
   TOPICS
========================================= */

.library-topics {
    padding: 90px 0;

    background: #FFFFFF;
}

.section-heading {
    max-width: 650px;
}

.section-heading h2 {
    margin-top: 9px;

    color: #064D59;

    font-size: 38px;

    line-height: 1.2;
}

.section-heading p {
    margin-top: 12px;

    color: #788C90;

    font-size: 12px;

    line-height: 1.7;
}

.topic-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    margin-top: 40px;
}

.topic-card {
    position: relative;

    display: grid;

    grid-template-columns: 46px 1fr 20px;

    align-items: center;

    gap: 13px;

    min-height: 120px;

    padding: 20px;

    border: 1px solid #E0EFF1;

    border-radius: 16px;

    background: #FFFFFF;

    text-decoration: none;

    box-shadow:
        0 8px 25px rgba(5, 70, 80, .04);

    transition: .25s ease;
}

.topic-card:hover {
    transform: translateY(-4px);

    border-color: #A9DDE2;

    box-shadow:
        0 15px 35px rgba(5, 70, 80, .09);
}

.topic-icon {
    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #E4F8FA;

    color: #0BA2B2;

    font-size: 18px;

    font-weight: 700;
}

.topic-card h3 {
    color: #075763;

    font-size: 14px;
}

.topic-card p {
    margin-top: 6px;

    color: #788C90;

    font-size: 10px;

    line-height: 1.5;
}

.topic-card > span {
    color: #0BA2B2;

    font-size: 18px;
}


/* =========================================
   ARTICLES
========================================= */

.library-articles {
    padding: 90px 0;

    background: #F4FBFC;
}

.article-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    margin-top: 40px;
}

.article-card {
    overflow: hidden;

    background: #FFFFFF;

    border: 1px solid #E0EFF1;

    border-radius: 18px;

    box-shadow:
        0 8px 25px rgba(5, 70, 80, .04);
}

.article-image {
    height: 190px;

    display: flex;

    align-items: flex-end;

    padding: 18px;

    background: #D8F3F5;
}

.article-one {
    background:
        linear-gradient(
            135deg,
            #BCECEF,
            #EAFBFC
        );
}

.article-two {
    background:
        linear-gradient(
            135deg,
            #D5F1EE,
            #EFFBFA
        );
}

.article-three {
    background:
        linear-gradient(
            135deg,
            #CDEAF0,
            #EEF9FA
        );
}

.article-image span {
    padding: 7px 10px;

    border-radius: 6px;

    background: #075763;

    color: #FFFFFF;

    font-size: 8px;

    font-weight: 700;
}

.article-content {
    padding: 24px;
}

.article-category {
    color: #0BA2B2;

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;
}

.article-content h3 {
    margin-top: 8px;

    color: #064D59;

    font-size: 18px;

    line-height: 1.3;
}

.article-content p {
    margin-top: 10px;

    color: #788C90;

    font-size: 11px;

    line-height: 1.7;
}

.article-content a {
    display: inline-block;

    margin-top: 18px;

    color: #075763;

    font-size: 10px;

    font-weight: 700;

    text-decoration: none;
}


/* =========================================
   CTA
========================================= */

.library-cta {
    padding: 80px 0;

    background: #FFFFFF;
}

.library-cta-box {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;

    padding: 55px;

    border-radius: 24px;

    background: #075763;
}

.library-cta-box h2 {
    max-width: 600px;

    margin-top: 10px;

    color: #FFFFFF;

    font-size: 34px;

    line-height: 1.2;
}

.library-cta-box p {
    max-width: 550px;

    margin-top: 12px;

    color: #C5E3E6;

    font-size: 12px;

    line-height: 1.7;
}

.library-cta-buttons {
    display: flex;

    flex-shrink: 0;

    gap: 10px;
}

.cta-light,
.cta-outline {
    padding: 13px 20px;

    border-radius: 8px;

    font-size: 10px;

    font-weight: 700;

    text-decoration: none;
}

.cta-light {
    background: #FFFFFF;

    color: #075763;
}

.cta-outline {
    border: 1px solid #74C9CF;

    color: #FFFFFF;
}

/* =========================================
   SEARCH RESULTS
========================================= */

.health-search-results {
    max-width: 650px;

    margin-top: 20px;
}


.search-result-heading {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 12px;

    color: #064D59;

    font-size: 11px;
}


.search-result-heading strong {
    color: #0BA2B2;

    font-size: 10px;
}


.search-result-list {
    display: grid;

    gap: 10px;
}


.search-result-card {
    display: grid;

    grid-template-columns: 42px 1fr 25px;

    align-items: center;

    gap: 13px;

    padding: 15px;

    background: #FFFFFF;

    border: 1px solid #DBE9EB;

    border-radius: 12px;

    text-decoration: none;

    box-shadow:
        0 8px 25px rgba(5, 70, 80, .05);

    transition: .2s ease;
}


.search-result-card:hover {
    border-color: #0BA2B2;

    transform: translateY(-2px);
}


.search-result-icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #E4F8FA;

    color: #0BA2B2;

    font-size: 18px;

    font-weight: 700;
}


.search-result-content span {
    color: #0BA2B2;

    font-size: 8px;

    font-weight: 700;

    text-transform: uppercase;
}


.search-result-content h3 {
    margin-top: 3px;

    color: #064D59;

    font-size: 13px;
}


.search-result-content p {
    margin-top: 4px;

    color: #788C90;

    font-size: 9px;

    line-height: 1.5;
}


.search-result-arrow {
    color: #0BA2B2;

    font-size: 17px;
}


.no-health-results {
    padding: 25px;

    text-align: center;

    background: #FFFFFF;

    border: 1px solid #DBE9EB;

    border-radius: 12px;
}


.no-health-results h3 {
    color: #064D59;

    font-size: 15px;
}


.no-health-results p {
    margin-top: 7px;

    color: #788C90;

    font-size: 10px;
}


.no-health-results a {
    display: inline-block;

    margin-top: 14px;

    color: #075763;

    font-size: 10px;

    font-weight: 700;

    text-decoration: none;
}

.library-view-all {
    margin-top: 30px;
}

.library-view-all a {
    color: #075763;

    font-size: 11px;

    font-weight: 700;

    text-decoration: none;
}

.library-view-all a:hover {
    color: #0BA2B2;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .topic-grid,
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .library-cta-box {
        flex-direction: column;

        align-items: flex-start;
    }

}


@media (max-width: 600px) {

    .library-hero {
        padding: 65px 0;
    }

    .library-hero h1 {
        font-size: 40px;
    }

    .library-search {
        height: 50px;
    }

    .library-search button {
        padding: 0 13px;
    }

    .topic-grid,
    .article-grid {
        grid-template-columns: 1fr;
    }

    .library-topics,
    .library-articles {
        padding: 65px 0;
    }

    .library-cta {
        padding: 55px 0;
    }

    .library-cta-box {
        padding: 35px 22px;
    }

    .library-cta-box h2 {
        font-size: 27px;
    }

    .library-cta-buttons {
        width: 100%;

        flex-direction: column;
    }

    .cta-light,
    .cta-outline {
        text-align: center;
    }

}

/* =========================================
   HEALTH LIBRARY ALIGNMENT FIX
========================================= */

.library-hero .section-container,
.library-topics .section-container,
.library-articles .section-container,
.library-cta .section-container {
    width: min(1180px, 92%);
    max-width: 1180px;

    margin-left: auto;
    margin-right: auto;

    box-sizing: border-box;
}


/* Keep hero content aligned with the container */

.library-hero-content {
    width: 100%;
    max-width: 800px;
}


/* Search should stay inside hero content */

.library-search {
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
}


/* Search results should stay inside the same width */

.health-search-results {
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
}


/* Mobile */

@media (max-width: 768px) {

    .library-hero .section-container,
    .library-topics .section-container,
    .library-articles .section-container,
    .library-cta .section-container {
        width: calc(100% - 32px);
        max-width: none;
    }

}