body {
    padding: 0;
    margin: 0;
}
.app {
    --header-height: 72px;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(190, 137, 22);
    overflow: hidden;
    font-family: "Bree Serif", serif;
    font-weight: 400;
    font-style: normal;
    color: white;
    user-select: none;
    display: flex;
    align-items: stretch;
}

/* Header and navigation styling is inherited from the global site stylesheet (style.css) */

/* Keep correct offset for fixed app container below the global header */
@media (max-width: 700px) {
    .app { --header-height: 88px; top: var(--header-height); }
}

.hidden {
    display: none;
}

.menu {
    position: relative;
    flex: 1;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
}

.menu-section {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4em;
    transition: all 0.5s ease;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.menu-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Responsive background images for David's section */
.menu-section[data-name="David"] {
    background-image: -webkit-image-set(
        url('assets/images/David-480.webp') 1x,
        url('assets/images/David-768.webp') 2x
    );
    background-image: image-set(
        url('assets/images/David-480.webp') 1x,
        url('assets/images/David-768.webp') 2x,
        url('assets/images/David-480.jpg') 1x,
        url('assets/images/David-768.jpg') 2x
    );
}

@media (min-width: 768px) {
    .menu-section[data-name="David"] {
        background-image: -webkit-image-set(
            url('assets/images/David-768.webp') 1x,
            url('assets/images/David-1200.webp') 2x
        );
        background-image: image-set(
            url('assets/images/David-768.webp') 1x,
            url('assets/images/David-1200.webp') 2x,
            url('assets/images/David-768.jpg') 1x,
            url('assets/images/David-1200.jpg') 2x
        );
    }
}

@media (min-width: 1200px) {
    .menu-section[data-name="David"] {
        background-image: -webkit-image-set(
            url('assets/images/David-1200.webp') 1x,
            url('assets/images/David-1600.webp') 2x
        );
        background-image: image-set(
            url('assets/images/David-1200.webp') 1x,
            url('assets/images/David-1600.webp') 2x,
            url('assets/images/David-1200.jpg') 1x,
            url('assets/images/David-1600.jpg') 2x
        );
    }
}

.menu-section.active {
    width: 70%;
    z-index: 2;
}

.menu-section .page {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.text-row {
    margin-bottom: 2rem;
}

.sideways {
    transform: rotate(-90deg) translateX(-100%);
    transform-origin: top left;
    white-space: nowrap;
    font-size: 3rem;
    margin: 0;
    padding: 0;
}

.content {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 8px;
    margin-top: auto;
    max-width: 600px;
}

.menu-section:not(.active) {
    cursor: pointer;
}

.menu-section.active {
    cursor: default;
}

.page {
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

h1 {
    margin: 0;
}

.text-row {
    font-size: 3em;
    display: flex;
    align-items: flex-start;
    padding-right: 4em;
    text-align: end;
}

.sideways {
    transform: rotate(-90deg) translateX(-90%);
    white-space: nowrap;
    transform-origin: top left;
    position: relative;
    left: -1.25rem; /* nudge left so it peeks out when overlapped */
    z-index: 3; /* ensure heading sits above the overlay */
}

/* Mobile-friendly stacked layout for team page */
@media (max-width: 700px) {
    .app {
        position: static;
        top: 0;
        min-height: auto;
    }
    .menu {
        position: static;
        flex-direction: column;
    }
    .menu-section {
        position: relative !important;
        width: 100% !important;
        height: auto;
        min-height: 65vh;
    }
    .menu-section.active { width: 100% !important; }
    .text-row { font-size: 2rem; padding-right: 0; text-align: left; }
    .sideways { transform: none; left: 0; }
    /* Reserve space for the bottom content overlay */
    .menu-section .page { position: relative; height: 100%; padding-bottom: 7rem; }
    /* Pin content box to the bottom, full-width, with a soft gradient */
    .menu-section .content {
        position: absolute;
        left: 0; right: 0; bottom: 0;
        margin: 0;
        max-width: 100%;
        border-radius: 0;
        padding: 1rem 1.25rem;
        background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 30%, rgba(0,0,0,0.75) 100%);
        box-shadow: none;
    }
}
