/* Enable percentage-based height for child elements */
html {
    height: 100%;
}

body {
    min-height: 100%;

    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto; /* Occupies all remaining space */
}

.container {
    box-sizing: content-box; /* content width = 1200px */
    max-width: 1200px;
    padding: 0 16px;
    margin: 0 auto; /* When a flex item has 'margin: 0 auto', it shrinks to the width of its content. */
}





/* ================================
   Header – desktop
================================ */

.gnb {
    flex-shrink: 0;

    position: sticky;
    top: 0;
    z-index: 2000;

    width: 100%;

    background: #454545;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.gnb__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 60px;
}

.gnb__brand {
    margin-inline-start: 12px;
}

.gnb__logo {
    width: 232px;
    height: 45px;
}

.gnb__nav {
    display: flex;
    gap: 11px;

    list-style: none;

    font-size: 14px;
    font-weight: 500;
}

.gnb__nav .gnb__link {
    display: inline-flex;
    align-items: center;

    height: 60px;
    padding: 0 9px;

    white-space: nowrap; /* Prevent line wrapping when users increase browser zoom / font size */
    color: #ffffff;
    text-align: center;
}

.gnb__more {
    position: relative; /* Absolute positioning reference for snb-container */
}

.gnb__more-icon {
    width: 17px;
    height: 17px;

    margin-inline-start: 4px;
}

.gnb__more-gap {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    width: 100%;
    height: 4px;

    background: transparent;
}

.snb__container {
    display: none;
    flex-direction: column;

    position: absolute;
    top: calc(100% + 4px);
    inset-inline-end: -11px; /* right, left */
    z-index: 1900; /* Below GNB (1000px) */

    min-width: 138px;
    padding: 11px 0;
    gap: 1px;

    background-color: #454545;
    white-space: nowrap;
    list-style: none;

    box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.25);
}

html[dir="rtl"] .snb__container {
    box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.snb__container .snb__link {
    display: block; /* Make the anchor fill the entire menu row so padding, hover, and click areas apply to the full width instead of just the text */

    width: 100%;
    padding: 9px 20px;

    color: #ffffff;
}

.gnb__more.todaysmoonphase-more--activated .gnb__link {
    text-decoration: underline;
}

.gnb__more.todaysmoonphase-more--activated .gnb__more-gap {
    display: block;
}

.gnb__more.todaysmoonphase-more--activated .snb__container {
    display: flex;
}

/* Desktop label formatting */
.gnb-space {
    display: none;
}



/* ================================
   Header – mobile
================================ */

.gnb__hamburger {
    display: none;

    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;

    width: 48px;
    height: 48px;

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

    cursor: pointer;
}

.gnb__hamburger-icon {
    width: 40px;
    height: 40px;
}

.gnb__backdrop {
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    bottom: 0;
    z-index: 1800;

    background: rgba(0, 0, 0, 0.35);
}

.gnb__drawer {
    display: none;

    position: fixed;
    inset-inline-end: 0; /* right, left */
    top: 60px;
    bottom: 0;

    z-index: 1900; /* Below GNB (1000px) */

    min-width: 227px;

    background: #454545;

    border-top: 1px solid rgba(255,255,255,0.08);

    overflow-y: auto;
}

.gnb__drawer-inner {
    padding: 31px 0;

    font-size: 14px;
    font-weight: 500;
}

.gnb__drawer-link {
    display: block;

    width: 100%;
    padding-block: 12px;
    padding-inline-start: 30px;
    padding-inline-end: 50px;

    color: #ffffff;

    white-space: nowrap;
}

.gnb__drawer-divider {
    border: 0;

    height: 1px;
    margin: 11px 17px;

    background: rgba(255, 255, 255, 0.12);
}

.gnb--drawer-open .gnb__drawer {
    display: block;
}

@media (max-width: 600px) {
    .container--header {
        padding: 0 8px;
    }
}

@media (max-width: 991px) {
    .gnb__logo {
        width: 206px;
        height: 40px;
    }

    .gnb__nav {
        display: none;
    }

    .gnb__right {
        display: flex;
        align-items: center;
    }

    .gnb__hamburger {
        display: inline-flex;
    }

    /* Mobile label formatting */
    .gnb-br {
        display: none;
    }

    .gnb-space {
        display: inline;
    }
}

@media (min-width: 992px) {
    .gnb__drawer,
    .gnb--drawer-open .gnb__drawer,
    .gnb__backdrop {
        display: none;
    }
}





/* ================================
   Footer – desktop
================================ */

.footer {
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    gap: 49px;
}

.footer__language {
    margin: 0 auto;

    max-width: 1010px;

    font-size: 14px;
    font-weight: 400;
}

.footer__language-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    list-style: none;
}

.footer__language-list li {
    margin-bottom: 10px;

    white-space: nowrap;
}

.footer__language-list li:not(:last-child)::after {
    content: "|";
    margin: 0 7px;

    color: #444444;
}

.footer__bottom {
    width: 100%;

    background: #454545;
}

.footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 90px;

    min-height: 91px;

    font-size: 15px;
    font-weight: 400;
}

.footer__copyright {
    flex: 1 1 auto; /* default: flex: 0 1 auto */

    margin-inline-start: 36px;

    color: #ffffff;
}

.footer__info {
    flex: 0 0 auto; /* default: flex: 0 1 auto */

    margin-inline-end: 32px;
}

.footer__info-list {
    display: flex;
    align-items: center;

    gap: 45px;

    list-style: none;
}

.footer__info-list a {
    white-space: nowrap;

    color: #ffffff;
}

.footer__icon-link {
    display: flex; /* Use block-level flex to avoid inline line-height affecting height */
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;
}

.footer__icon-img {
    width: 27px;
    height: 27px;
}

@media (hover: hover) and (pointer: fine) {
    .footer__icon-link:hover .footer__icon-img {
        opacity: 0.79;
    }
}



/* ================================
   Footer – mobile
================================ */

@media (max-width: 1231px) {
    .container--footer-bottom {
        padding-left: 0;
        padding-right: 0;
    }

    .footer__bottom-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;

        min-height: auto;
    }

    .footer__copyright {
        order: 2;

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

        height: 50px;
        padding: 0 16px;
        margin-inline-start: 0;

        font-size: 13px;
        color: #B0B0B0;
        text-align: center; /* Center text lines when wrapping (Flex centers the item, not the text) */
    }

    .footer__info {
        order: 1;

        margin-inline-end: 0;
    }

    .footer__info-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .footer__info-list > li {
        border-bottom: 1px solid rgba(255,255,255,0.14);
    }

    .footer__info-list > li:last-child {
        border-bottom: none;
    }

    .footer__info-list a {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        height: 49px;
    }

    .footer__info-list > li:last-child a {
        height: 60px;
    }
}