:root {
    --gs1-color-primary-blue: #002C6C;
    --gs1-color-ui-1: #F0F5FA;
    --gs1-color-ui-2: #E5F0FC;
    --gs1-color-ui-3: #C4D7ED;
    --gs1-color-ui-3-rgba: rgba(196, 215, 237, 1);
    --gs1-color-ui-4: #E5E8EB;
    --gs1-color-ui-5: #A6B0BB;
    --gs1-color-ui-6: #696D73;
    --gs1-color-ui-7: #414345;
    --gs1-color-ui-8: #262626;
    --gs1-border-radius: 4px;
    --gs1-color-ui-danger: #BA1B23;
    --gs1-color-ui-danger-light: #FFDFDF;
    --gs1-color-white: #FFF;
    --gs1-color-link-accessible: #00799E;
    --gs1-color-forest: #00AC4A;
    --gs1-color-forest-light: #CCF1DC;
    --gs1-color-forest-dark: #026B30;
    --gs1-color-forest-accessible: #008037;
    --gs1-color-tangerine: #FF8200;
    --gs1-color-tangerine-light: #FFE6CC;
    --gs1-color-tangerine-dark: #A15700;
    --gs1-color-orange-accessible: #CD3C0D;
    --gs1-color-link: #008DBD;
    --gs1-color-link-light: #c1eefd;
}

/* -------- TEXT STYLES -------- */
.gs1-text {
    font-style: normal;
    text-decoration: none;
}

.gs1-text--primary {
    color: var(--gs1-color-primary-blue);
}

.gs1-text__xl {
    font-size: 22px;
    font-weight: bold;
    line-height: 31px;
}

.gs1-text__m {
    font-size: 15px;
    font-weight: 100;
    line-height: 18px;
}

.gs1-text__ms {
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.gs1-text__s {
    font-size: 12px;
    font-weight: 100;
    letter-spacing: 0.1px;
    line-height: 19px;
}

/* -------- BASE RESET -------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: "Gotham SSm A", "Gotham SSm B", Verdana, sans-serif;
}

/* -------- LAYOUT -------- */
body {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom); /* ensures no cutoff behind iPhone URL bar/home bar */
    overflow-x: hidden;
}

    body.no-scroll {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }

main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex: 1;
}

.main-box {
    background: var(--gs1-color-ui-1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex: 1;
}


/* -------- HEADER -------- */
header {
    display: flex;
    height: 64px;
    padding: 0 131px;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--gs1-color-white);
    border-bottom: 1px solid #E1E5E9;
}

/* -------- HERO SECTION -------- */
.hero-section {
    display: flex;
    height: 323px;
    padding: 19px 47px 18px 47px;
    margin: 0 10px;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    background: var(--gs1-color-white);
}

    header img,
    .hero-section img {
        object-fit: contain;
        height: 100%;
    }

/* -------- CONTENT -------- */
.content-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 0 28px;
    padding-bottom: 19px;
}

.content-section,
.link-groups-section {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

    .link-groups-section ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-self: stretch;
    }

ul {
    list-style: none;
}

/* -------- LINK BUTTONS -------- */
.link {
    display: flex;
    height: 60px;
    padding: 10px;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    background: #E4EFFA;
    width: 100%;
    cursor: pointer;
}

.link-img-box {
    display: flex;
    width: 40px;
    height: 40px;
    padding: 10px 9px 9px 10px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 100px;
    background: var(--gs1-color-white, #FFF);
}

    .link-img-box img {
        display: flex;
        width: 21px;
        height: 21px;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        aspect-ratio: 1 / 1;
    }

/* -------- DRAWER -------- */
.drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100svh; 
    height: 100dvh;
    max-height: 100lvh; 
    background: var(--gs1-color-white);
    border-radius: 15px 0 0 15px;
    box-shadow: 0 5px 26px 4px rgba(0, 0, 0, 0.17);
    transition: right 0.3s ease-in-out;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent scroll bleed */
    padding-bottom: env(safe-area-inset-bottom); /* ensure space for iPhone home bar */
}

    .drawer.open {
        right: 0;
    }

.drawer-header {
    display: flex;
    height: 64px;
    padding: 22px;
    justify-content: flex-end;
    align-items: center;
    background: var(--gs1-color-white, #FFF);
    border-radius: inherit
}

.drawer-btn {
    cursor: pointer;
}

.drawer-content-container {
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin: 0 20px;
    padding: 0 6px 90px 6px;
    align-items: center;
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.drawer-content {
    width: 100%;
}

#drawerContent {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    #drawerContent li {
        display: flex;
        width: 100%;
        padding: 11px 16px;
        align-items: flex-start;
        gap: 10px;
        border-radius: 4px;
        background: #F0F5FA;
    }

/* -------- PAGINATION -------- */
.drawer-pagination {
    position: sticky;
    bottom: calc(15px + env(safe-area-inset-bottom)); /* ensures visible above Safari/Android bottom bar */
    background: var(--gs1-color-white, #fff);
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    width: 100%;
}

    .drawer-pagination .pagination-base {
        display: flex;
        border-radius: 4px;
        border: 1px solid var(--gs1-color-ui-3);
        overflow: hidden;
    }

        .drawer-pagination .pagination-base .page-btn {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 40px;
            height: 40px;
            border: none;
            border-right: 1px solid var(--gs1-color-ui-3);
            background: var(--gs1-color-ui-1);
            transition: background 0.2s;
            cursor: pointer;
            color: var(--gs1-color-primary-blue, #002C6C);
            text-align: center;
            font-size: 14px;
            font-style: normal;
            font-weight: 600;
            line-height: 20px;
        }

            .drawer-pagination .pagination-base .page-btn:last-child {
                border-right: none;
            }

            .drawer-pagination .pagination-base .page-btn.active {
                background: var(--gs1-color-ui-3);
            }

            .drawer-pagination .pagination-base .page-btn:disabled {
                opacity: 0.5;
                cursor: not-allowed;
            }

/* -------- OVERLAY (NEW) -------- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(196, 215, 237, 0.8); /* From #C4D7ED */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1050;
}

    .drawer-overlay.active {
        opacity: 1;
    }

/* -------- FOOTER -------- */
.gs1-footer {
    display: flex;
    height: 64px;
    padding: 20px 0;
    justify-content: center;
    align-items: center;
}

/* -------- ERROR / NOT FOUND -------- */
.error-section {
    margin: 30px;
}

.error-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    padding: 22px;
    background: var(--gs1-color-ui-1, #F0F5FA);
    /* Make it fill the viewport height safely on mobile */
    min-height: calc(100svh - 60px);
    min-height: calc(100dvh - 60px); /* fallback for Android/desktop */
    box-sizing: border-box; /* ensure padding doesn’t affect height */
}

.error-img {
    display: flex;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    object-fit: contain;
}

.error-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* -------- RESPONSIVE -------- */
@media (min-width: 768px) {
    body {
        flex-direction: row;
    }
}
