/* Shared by about, contact, the district pages and the story page (not the home page,
   whose header and footer behave differently). Loaded after base.css. */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-image-container {
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    margin-top: -3rem;
}

.main-image-container img {
    width: 100%;
    display: block;
}

.info-container h1 {
    font-family: "Shadows Into Light Two", cursive;
    text-align: left;
    font-size: 3.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

main h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 200%;
    background-color: #ffffff;
    background-image: linear-gradient(#262626, #262626);
    background-repeat: no-repeat;
    background-size: 40% 100%;
}

header {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    flex-shrink: 0;
    background-color: transparent;
    position: relative;
}

.main-nav {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex: 1;
    align-items: center;
}

.mobile-menu-button {
    display: none;
}

.footer {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
    height: 0;
    padding-bottom: 93.11%;
}

.footer-copyright {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.footer-copyright p {
    margin: 0;
    color: black;
    font-size: 0.9em;
}

.footer-column {
    color: #262626;
    text-align: left;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 200%;
    background-color: #ffffff;
    background-image: linear-gradient(#262626, #262626);
    background-repeat: no-repeat;
    background-size: 40% 100%;
    transition: background-size 0.4s ease-out;
}

.footer-column li {
    font-size: 1.2rem;
}

.footer-column a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.parallax-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.parallax-layer img {
    image-rendering: -webkit-optimize-contrast;
}

.layer-1 img { position: absolute; width: 100%; height: 46%; bottom: 52%; left: 0; object-fit: cover; }

.layer-2 img { position: absolute; width: 100%; height: 80%; bottom: 15%; left: 0; object-fit: cover; }

.layer-3 img { position: absolute; width: 100%; height: 67%; bottom: -5%; left: 0; object-fit: cover; }

.layer-4 .figure-left,
.layer-4 .figure-right { position: absolute; width: 20%; height: auto; bottom: -5%; object-fit: contain; }

.layer-5 img { position: absolute; width: 100%; height: 40%; bottom: -10%; left: 0; object-fit: cover; }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar.navbar--anchored {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    animation: slideDown 0.5s ease-out;
    box-sizing: border-box;
}

@media (min-width:1025px) {
    .navbar.navbar--anchored {
        height: 8vh;
        min-height: 65px;
        padding: 0;
        align-items: center;
    }

    .navbar.navbar--anchored .logo img {
        height: 8vh;
        max-height: 60px;
    }

}

@media (max-width:1024px) {
    .navbar.navbar--anchored {
        padding: 0 1.5rem;
    }

    header {
        height: auto;
        padding-bottom: 1rem;
    }

    .navbar {
        flex-wrap: wrap;
        padding: 0 1.5rem;
    }

    .logo {
        order: -1;
    }

    .logo img {
        height: 80px;
        padding: 0;
    }

    .mobile-menu-button {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: #333;
        padding: 10px;
        z-index: 1100;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        flex: none;
    }

    .nav-left,
    .nav-right {
        width: 100%;
    }

    .navbar.nav-open {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1099;
        flex-wrap: nowrap;
        padding: 0;
        box-sizing: border-box;
    }

    .navbar.nav-open .logo {
        display: none;
    }

    .navbar.nav-open .mobile-menu-button {
        position: absolute;
        top: 2rem;
        right: 1.5rem;
    }

    .main-nav a {
        padding: 1rem;
        display: block;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
        font-weight: bold;
        font-size: 1.2rem;
    }

    .main-nav li:last-child a {
        border-bottom: none;
    }

    .navbar.nav-open .main-nav li {
        opacity: 0;
        transform: translateY(-20px);
        animation: dropDownItem 0.5s ease-out forwards;
    }

    .navbar.nav-open .main-nav li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .navbar.nav-open .main-nav li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .navbar.nav-open .main-nav li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .navbar.nav-open .main-nav li:nth-child(4) {
        animation-delay: 0.4s;
    }

}

@media (max-width:768px) {
    .footer {
        height: auto;
        padding: 8rem 1rem 4rem 1rem;
        background-image: none;
        box-sizing: border-box; /* the padding stays inside the screen width */
    }

    .parallax-backgrounds {
        display: none;
    }

    .footer-column ul li {
        font-size: 0.8rem;
    }

}

/* Phones: refinements from the mobile UI review (tests/ui/mobile-layout.spec.js) */
@media (max-width: 600px) {
    .logo img {
        height: 56px;
    }

    /* The open menu fills the visible screen between the browser's bars (100vh stays as fallback) */
    .navbar.nav-open {
        height: 100dvh;
    }

    /* Touch targets of at least 44x44px; the gaps they replace keep the spacing about the same */
    .top-bar .social-links {
        gap: 0;
    }

    .top-bar .social-links a,
    .footer-column a[href] {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }

    .top-bar .social-links a {
        justify-content: center;
    }

    .footer-column ul {
        gap: 0;
    }
}
