/* Band Section Background - Lucha Libre Style */
.band-section {
    position: relative;
    background-color: var(--dark-bg);
    text-align: center;
    padding-top: 140px;
    /* Ensure title clears fixed header */
    padding-bottom: 4rem;
}

/* Update text colors for white background */
.band-section .section-title {
    color: var(--primary-color);
    text-shadow: 2px 2px 0 #000;
}

.member-info h3 {
    color: var(--primary-color);
    /* Changed from Yellow to Pink for readability on white */
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* Member Role */
.member-info .role {
    color: #fff;
    /* Changed to White for dark background */
    font-family: var(--font-body);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}




/* Title Enhancement for Band Section */
.band-section .section-title {
    font-size: 4.5rem;
    color: var(--secondary-color);
    text-shadow:
        4px 4px 0 #000,
        8px 8px 0 var(--primary-color);
    /* Deep Shadow/Block effect */
    transform: rotate(-3deg) translateY(-10px);
    display: inline-block;
    padding: 0.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.3);
    /* Slight dim to help contrast */
    border: 3px solid var(--primary-color);
    box-shadow: 5px 5px 0 #000;
}

@media (max-width: 768px) {
    .band-section {
        overflow-x: hidden;
        /* Force hide overflow */
        padding: 140px 1rem 4rem 1rem !important;
        /* Increase top padding for header */
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        /* Reduced gap */
        padding: 0;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .band-section .section-title {
        font-size: 2rem;
        /* Even smaller */
        transform: none;
        margin: 0 auto 3rem auto;
        width: auto;
        max-width: 100%;
        display: inline-block;
        padding: 0.5rem 1rem;
        box-sizing: border-box;
        white-space: normal;
        /* Allow wrapping */
        word-break: break-word;
    }

    .member-img {
        width: 180px;
        /* Reduced further */
        height: 180px;
        max-width: 70%;
    }

    .member-card {
        margin: 0 auto;
        width: 100%;
        max-width: 320px;
        /* Strict max width */
        padding: 1.5rem 1rem;
        box-sizing: border-box;
    }
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    /* 12 column grid */
    gap: 3rem;
    /* Increased gap for glow */
    padding: 2rem 0;
    justify-items: center;
    /* Center items in their cells */
}

.member-card {
    background: #2a2a2a;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;

    /* Neon Glow Effect */
    box-shadow:
        0 0 10px var(--primary-color),
        0 0 20px rgba(255, 0, 153, 0.4),
        inset 0 0 15px rgba(255, 0, 153, 0.1);
}

/* Specific Grid Layout: 2 columns mostly */
.member-card {
    grid-column: span 6;
    opacity: 0;
    /* Hidden initially for entrance animation */
}

/* Center the last one if odd count (7 members) */
.member-card:last-child {
    grid-column: 4 / span 6;
}

/* --- Entrance Animations (Tag Team Style) --- */
.band-section.start-animations .member-card:nth-child(odd) {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.band-section.start-animations .member-card:nth-child(even) {
    animation: slideInRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.band-section.start-animations .member-card:last-child {
    animation: slideInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    /* Override odd rule */
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Reponsive fallback */
@media (max-width: 992px) {
    .member-card:nth-child(n) {
        grid-column: span 6;
        /* 2 per row on tablets */
    }
}

@media (max-width: 600px) {
    .member-card:nth-child(n) {
        grid-column: span 12;
        /* 1 per row on mobile */
    }
}

.member-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 10px 20px rgba(255, 0, 153, 0.5);
    border-color: var(--accent-color);
    z-index: 10;
}

.member-img {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--secondary-color);
    transition: transform 0.5s;
    background: #fff;
}

.member-card:hover .member-img {
    transform: scale(1.1) rotate(-5deg);
    border-color: var(--primary-color);
}

.mask-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h3 {
    color: var(--primary-color);
    /* Changed from Yellow to Pink for readability on white */
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* Member Role */
/* Member Role */
.member-info .role {
    color: #fff;
    font-family: var(--font-body);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.bio-description {
    font-family: var(--font-body);
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
}

/* Animation Delays */
.member-card:nth-child(1) {
    animation-delay: 0.1s;
}

.member-card:nth-child(2) {
    animation-delay: 0.2s;
}

.member-card:nth-child(3) {
    animation-delay: 0.3s;
}

.member-card:nth-child(4) {
    animation-delay: 0.4s;
}

.member-card:nth-child(5) {
    animation-delay: 0.5s;
}

.member-card:nth-child(6) {
    animation-delay: 0.6s;
}

.member-card:nth-child(7) {
    animation-delay: 0.7s;
}

/* ensure content stays above effects */

/* Ensure content stays above effects */
.band-section .container {
    position: relative;
    z-index: 1;
}

/* FINAL MOBILE OVERRIDE - To ensure grid breaks correctly */
@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .member-card {
        grid-column: auto !important;
        width: 100% !important;
        max-width: 320px !important;
        margin-bottom: 2rem !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    .member-img {
        margin: 0 auto 1rem auto !important;
        width: 180px;
        height: 180px;
    }
}