html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
    overflow-y: auto;
}

#poster {
    width: 100%;
    background: #000;
    height: 400px;

    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
}

#poster>.image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#poster>.image-wrapper>div {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#poster>.image-wrapper>.poster-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    filter: blur(5rem);
    background-position: 50%;
    background-color: #000;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('images/poster.jpg');
    background-size: calc(100% + 20%);
    background-repeat: no-repeat;
}

#poster>.image-wrapper>div>img:not(.poster-background) {
    height: 100%;
    cursor: pointer;
    transition-property: height;
    transition-duration: 1s;
    object-fit: cover;
    z-index: 30;
}

#poster>.image-wrapper>div>img:not(.poster-background):hover {
    height: calc(100% + 10px);
}

#next-event {
    width: 100%;
}

#group-photo {
    width: 100%;
}

#group-photo>div {
    width: 100%;
    height: 400px;
    background-position: -10px -610px;
    background-size: calc(100% + 20px);
    box-shadow: inset 0 0 10px 2px rgb(0 0 0 / 0.5);
}

/* ==========================================================================
   PARALLAX BACKGROUND (about-us section)
   
   Strategy: isolated parallax using background-attachment: fixed on ::before.
   The ::before is sized larger than the section and positioned to always cover
   it. background-attachment: fixed pins the image to the viewport, so as you
   scroll the section moves over the fixed image — giving a natural parallax
   feel without touching html/body overflow or transform-style, which break
   stacking contexts and z-index across the entire page.
   ========================================================================= */
#about-us {
    width: 100%;
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    /* overflow: hidden here would clip the fixed background — leave it out */
}

#about-us::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0; /* sits behind all children */

    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75)), url('images/band3-2.jpeg');
    background-size: cover;
    /* JS writes --parallax-y on the parent; ::before reads it here.
       Falls back to center if JS hasn't run yet. */
    background-position: center var(--parallax-y, 50%);
    background-repeat: no-repeat;
    background-attachment: scroll; /* must be scroll so JS offset actually moves it */
}

#about-us>h3 {
    color: #fff;
    margin-top: 0;
    position: relative;
    z-index: 1; /* above ::before (z-index: 0) */
}

#about-us>div {
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
    font-weight: 400;
    max-width: 48rem;
    padding: 0 30px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    word-spacing: 1px;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* above ::before (z-index: 0) */
}

/* ==========================================================================
   BAND MEMBERS CARDS SECTION
   ========================================================================= */
#band-members {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 80px;
}

#band-members>.member-list {
    max-width: 48rem;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

#band-members>.member-list>* {
    display: flex;
    background-color: rgb(255 255 255);
    border-radius: 0.75rem;
    overflow: hidden;
    width: 100%;
    margin-left: auto;
    margin-right: auto;

    --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    transition-property: transform;
    transition-duration: 500ms;
}

#band-members>.member-list>*:nth-child(even) {
    flex-direction: row-reverse;
}

#band-members>.member-list>*:nth-child(odd)>*>.photo-credit {
    text-align: right;
}

#band-members>.member-list>*:hover {
    transform: scale(101%);
}

#band-members>.member-list>*>.band-member-image {
    flex-shrink: 0;
}

#band-members>.member-list>*>.band-member-image>img {
    width: 14rem;
    object-fit: cover;
    object-position: 50% 50%;
    height: 100%;
    max-width: 100%;
    display: block;
}

#band-members>.member-list>*>.band-member-description {
    padding: 2rem;
}

/* --- FIXED TYPOGRAPHY SELECTORS --- */
#band-members .member-list .band-member-description .member-name {
    --text-color: rgb(17 24 39);
    color: var(--text-color);
    line-height: 1.25;
    font-weight: 700;
    font-size: 2.25rem;
    display: block;
    margin-top: 0.25rem;
}

#band-members .member-list .band-member-description .member-flair {
    font-size: 1.25rem;
    color: rgb(75, 85, 99);
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

#band-members .member-list .band-member-description .member-description-full {
    color: rgb(55 65 81);
    font-size: 1.125rem;
    line-height: 1.75rem;
    margin: 0;
    margin-top: 1rem;
}

/* ==========================================================================
   BAND MEMBER TITLE ROW & RIGHT-ALIGNED SOCIALS
   ========================================================================= */
.member-title-row {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    width: 100%;
}

.member-text-group {
    display: flex;
    flex-direction: column;
}

.member-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    background-color: #f3f4f6;
    color: #4b5563;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.social-icon.instagram:hover {
    background-color: #e1306c;
    color: #ffffff;
    transform: translateY(-2px);
}

.social-icon.facebook:hover {
    background-color: #1877f2;
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- PHOTOGRAPHER CREDIT DESIGN (DESKTOP & MOBILE BASIC) --- */
.photo-credit {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #6b7280; 
    width: 100%;
}

.photo-credit a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-block;
}

.photo-credit a:hover {
    color: #d4af37; 
}

.credit-arrow {
    display: inline-block;
    position: relative;
    width: 8px;
    height: 8px;
    vertical-align: middle;
}

.credit-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: currentColor;
    transform: translateY(-50%) rotate(-45deg);
    transform-origin: center;
}

.credit-arrow::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 4px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}

.calendar-button-shows {
    width: 100% !important;
    margin-left: auto;
    position:absolute;
}

.calendar-button-shows > div {
    position: absolute;
    top: 0;
    right: 0;
}

/* ==========================================================================
   MOBILE RESPONSIVE UPDATES (< 900px)
   ========================================================================= */
@media (max-width: 899px) {

    /* Disable parallax on mobile — background-attachment: fixed is broken
       in iOS Safari and causes the image to disappear entirely */
    #about-us::before {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }

    #band-members {
        padding-bottom: 36px;
    }
    
    /* 1. Top Poster Banner - Natural Aspect Scaling */
    #poster {
        height: auto !important; 
        width: 100% !important;
    }
    #poster .image-wrapper {
        width: 100% !important;
        height: auto !important;
    }
    #poster .image-wrapper > div {
        width: 100% !important;
        height: auto !important;
        display: block !important; 
    }
    #poster .image-wrapper > div > img:not(.poster-background) {
        width: 100% !important;   
        height: auto !important;
        object-fit: contain !important; 
        display: block;
    }
    #poster .image-wrapper .poster-background {
        display: none; 
    }

    /* 2. Content Spacing */
    #about-us {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    #about-us div {
        padding: 0 20px;
        font-size: 1.05rem;
        line-height: 1.6;
    }

    h3 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* 3. Vertical Card Layout Framework */
    #band-members .member-list {
        display: flex;
        flex-direction: column;
        gap: 32px; 
        padding: 0 16px !important;
        padding-top: 24px !important;
        width: auto !important; 
        overflow: hidden;
    }

    #band-members .member-list > *,
    #band-members .member-list > *:nth-child(even) {
        box-sizing: border-box !important; 
        display: flex !important;
        flex-direction: column !important; 
        align-items: stretch !important;    
        
        width: 100% !important; 
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;

        background: #ffffff !important; 
        border-radius: 12px !important;     
        overflow: hidden !important;        
        padding: 0 !important;              
        transform: none !important;          
        transition: none !important;
    }

    /* Full Width Top Cover Image Section */
    #band-members .member-list > * .band-member-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;  
        overflow: hidden !important;
        flex-shrink: 0 !important;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
    }

    #band-members .member-list > * .band-member-image img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
        object-position: center 30% !important; 
    }

    /* Card Text Block Content Container */
    #band-members .member-list > * .band-member-description {
        padding: 24px !important; 
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Left-Aligned Profile Title Block */
    #band-members .member-list .band-member-description .member-name {
        text-align: left !important;
        font-size: 1.5rem !important;
        font-weight: 700;
        margin-top: 0 !important;
        margin-bottom: 2px !important;
        color: rgb(17, 24, 39);
    }

    #band-members .member-list .band-member-description .member-flair {
        text-align: left !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important; 
        color: rgb(55, 65, 81) !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        letter-spacing: 0.3px;
    }

    /* Left-Aligned Bio Content Paragraphs */
    #band-members .member-list .band-member-description .member-description-full {
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 16px !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    #band-members .member-list .band-member-description .member-description-full p {
        color: rgb(55, 65, 81);
        margin: 0 0 12px 0 !important;
        word-wrap: break-word; 
    }
    
    #band-members .member-list .band-member-description .member-description-full p:last-child {
        margin-bottom: 0 !important; 
    }

    /* 4. Next Event Framework Polish (Fixes Layout Overlaps) */
    #next-event .event {
        position: relative;
        display: flex !important;
        flex-direction: column !important;
    }

    #next-event .event-view {
        margin-top: 1.5rem;
        display: block;
        width: 100%;
    }
    
    #next-event .event-view > a {
        display: inline-block;
        text-align: center;
        width: calc(100% - 3rem); 
    }

    .calendar-button-shows {
        width: 0;
        margin-left: auto;
    }

    .calendar-button-shows > div {
        width: max-content;
        float: right;
    }

    /* --- SIDE-BY-SIDE MOBILE TITLE ALIGNMENT --- */
    .member-title-row {
        display: flex !important;
        flex-direction: row !important; 
        justify-content: space-between !important; 
        align-items: center !important; 
        width: 100% !important;
        gap: 12px; 
    }

    .member-text-group {
        display: flex;
        flex-direction: column;
        flex: 1; 
    }

    .member-socials {
        display: flex !important;
        justify-content: flex-end !important; 
        margin-top: 0 !important; 
        margin-bottom: 0 !important;
        gap: 12px !important; 
        flex-shrink: 0; 
    }
    
    .social-icon {
        width: 40px; 
        height: 40px;
        font-size: 1.3rem;
    }

    /* --- CLEAN MOBILE BOTTOM POSITIONING FOR PHOTO CREDITS --- */
    #band-members .member-list > * .band-member-description .photo-credit {
        order: initial !important;
        margin-top: 1rem !important; 
        margin-bottom: 0 !important; 
        font-size: 0.8rem;
        text-align: right;
    }
}