/*
 Responsive overrides for mobile/tablet
*/

.hamburger {
    display: none;
}

@media (min-width: 781px) {
    /* Avoid too large height of top banner in vertical mode */
    @media (max-height: 980px) {
        header .container {
            padding-top: 0.5rem;
        }

        header .banner {
            margin-bottom: -1.5rem;
        }

        header .logo {
            height: 8rem;
        }

        header .slogan {
            font-size: 2.75rem;
        }

        header nav ul li a {
            padding-top: 0.3rem;
            padding-bottom: 0.3rem;
        }

        section {
            scroll-margin-top: 10.34rem;
        }
    }
}

@media (max-width: 975px) {
    .numbers .key-figures {
        justify-content: center;
        gap: 2.897rem;
    }
}

@media (max-width: 780px) {

    :root {
        --padding: clamp(3rem, 6vw, 5rem);
    }

    body {
        font-size: 0.65rem;

        --font-size-slogan: 3.0em;
        --font-size-menu: 2.0em;
        --font-size-hero: clamp(3.75em, 5.5vw, 7em);
        --font-size-button: clamp(3.5em, 2.5vw, 4.5em);
        --font-size-year: 5.0em;
        --font-size-section: 6.0em;
        --font-size-subsection: 4.5em;
        --font-size-text: 3.5em;
        --font-size-subtext: 3.3em;
    }

    section {
        padding: 2.587rem 0;
    }

    section h2 {
        font-size: var(--font-size-section);
    }

    section p {
        font-size: var(--font-size-text);
        margin-bottom: 2rem;
        line-height: 1.4;
    }

    .btn {
        font-size: var(--font-size-button);
        padding: 1.449rem 2.276rem;
    }

    .container {
        padding: 0 3.104rem;
    }

    /* HEADER */
    header .container {
        padding: 0.8278rem var(--padding);
    }

    header .banner {
        gap: 2.483rem;
    }

    header .logo {
        padding-left: 0;
        height: 6.209rem;
    }

    header .slogan {
        font-size: var(--font-size-slogan);
        line-height: 1.3;
        padding-right: 0;
        line-break: anywhere !important;
    }

    /* Hamburger button */
    .hamburger {
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        border: 0;
        width: 4.346rem;
        height: 4.346rem;
        /* margin-left: auto; */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        cursor: pointer;
        padding: 1rem 0 1rem 1rem;
        margin: 1rem 0 1rem 2rem;
    }

    .hamburger span {
        position: absolute;
        display: block;
        width: 2.483rem;
        height: 0.207rem;
        background: var(--color-white);
        transition: transform var(--transition), opacity var(--transition);
    }

    .hamburger span:nth-child(1) {
        transform: translateY(-0.72rem);
    }

    .hamburger span:nth-child(2) {
        transform: translateY(0);
    }

    .hamburger span:nth-child(3) {
        transform: translateY(0.72rem);
    }

    .hamburger[aria-expanded="true"] span:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .hamburger[aria-expanded="true"] span:nth-child(3) {
        transform: rotate(-45deg);
    }

    /* Desktop nav -> Mobile panel */
    header nav {
        position: absolute;
        transform: none;
        right: 1.03rem;
        width: 31.04rem;
        margin-top: -1.65rem;

        /* collapsible panel animation */
        max-height: 0;
        overflow: hidden;
        transform: translateY(-0.62rem);
        pointer-events: none;
        transition: max-height 260ms ease, opacity 220ms ease, transform 240ms ease;
    }

    section {
        scroll-margin-top: 7.86rem;
    }

    header nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 1.035rem;
        padding: 0.8278rem;
        border-radius: 3rem;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    }

    header nav ul li a {
        padding: clamp(0.413rem, 1vh, 1.241rem) 1.656rem;
        font-size: var(--font-size-text);
    }

    /* Open state (JS also sets max-height to scrollHeight) */
    header nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        /* box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.25); */
    }

    /* HISTORY */
    .history {
        padding-top: 3.104rem;
    }

    .history details summary {
        font-size: var(--font-size-button);
        padding: clamp(1.552rem, 5vw, 2.587rem);
        border-radius: clamp(2rem, 10vw, 5.17rem);
    }


    .history .timeline img {
        /* min-width: 93.13rem;
        width: 120%; */
    }

    /* NUMBERS: */
    .numbers .key-figures {
        margin: 2rem 0 2.897rem 0;
        padding: 0;
    }

    .numbers .figure {
        min-width: 17.59rem;
        width: 27%;
    }

    .numbers .key-figures .figure:nth-child(2) {
        margin-left: 0;
    }

    /* TESTIMONIES */
    .testimonies p {
        padding-right: 0;
        margin-bottom: 2.897rem;
    }

    .testimonies .right {
        min-width: 28.97rem;
        max-width: 37.25rem;
    }


    /* KONBINI */
    .video .video-container {
        margin: 3.104rem auto;
    }

    /* MEDIA */

    .media .media-logos {
        gap: 2.897rem;
    }

    .media .media-logos img {
        height: 3.725rem;
    }

    .media .media-btn {
        padding: 0;
    }

    .media .media-btn.prev {
        left: 0.7rem;
    }

    .media .media-btn.next {
        right: 0rem;
    }

    .book .container {
        gap: 4.139rem;
    }

    .book .right {
        justify-content: center;
    }

    .support-us h2 {
        margin-top: 3.104rem;
    }

    .support-us p {
        margin-bottom: 4.139rem;
    }

    .support-us .btn {
        margin: 0 4.139rem 0 0;
    }

    .support-us .cta {
        margin-bottom: 2rem;
    }

    .contact details summary {
        font-size: var(--font-size-button);
        padding: 1.449rem 2.897rem;
        border-radius: clamp(2rem, 10vw, 5.17rem);
    }

    /* FOOTER */
    footer {
        padding: 3.725rem 0;
    }

    footer .slogan {
        /* font-size: 2.1rem; */
    }

    footer .banner {
        /* flex-direction: column; */
        /* align-items: flex-start; */
    }

    footer .menu ul {
        flex-wrap: wrap;
        gap: 0.2rem;
        padding: 0;
    }

    footer .menu ul li a {
        padding: 0.8rem clamp(2rem, 5vw, 6rem);
        font-size: clamp(1.4rem, 3.7vw, 1.8rem);
    }

    .book .container {
        gap: 4.139rem;
        flex-wrap: wrap;
    }

    .book .right {
        justify-content: center;
    }

    .support-us {
        background-position-x: 69%;
        background-position-y: 24%;
    }

    header .slogan {
        display: none;
    }

    .container {
        padding: 0 var(--padding);
    }

    .support-us .right {
        flex: 0;
    }

    .support-us p {
        margin-bottom: 2rem;
    }

    .support-us .btn {
        margin: 2rem 2rem 0 0;
    }
}

@media (max-width: 500px) {
    footer .menu ul {
        flex-wrap: wrap;
        justify-content: space-evenly;
    }

    @media (max-width: 375px) {

        h1,
        h2 {
            line-break: anywhere !important;
        }
    }



    /* Motion reduction */
    @media (prefers-reduced-motion: reduce) {
        @media (max-width: 780px) {
            header nav {
                transition: none;
                transform: none;
            }
        }
    }
}
