/* ============================================================
   TEAM PAGE STYLES  —  css/team.css
   ============================================================ */

/* ============================================================
   TEAM HERO
   ============================================================ */
.team-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    color: var(--color-white);
    padding-top: calc(var(--space-3xl) + 1rem);
    padding-bottom: calc(var(--space-3xl) + 3rem);
    overflow: hidden;
    text-align: center;
}

/* Animated water rings */
.team-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.water-ring {
    position: absolute;
    border: 2px solid rgba(0,194,224,0.15);
    border-radius: 50%;
    animation: ripple 6s ease-out infinite;
}

.water-ring--1 {
    width: 300px;
    height: 300px;
    top: -80px;
    left: -80px;
    animation-delay: 0s;
}

.water-ring--2 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -150px;
    animation-delay: 2s;
}

.water-ring--3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 60%;
    animation-delay: 4s;
}

/* Hero content */
.team-hero__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin-inline: auto;
}

.team-hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    line-height: 1;
}

.team-hero__title span {
    color: var(--color-accent);
    display: block;
}

.team-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-inline: auto;
}

/* Hero stats */
.team-hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.team-hero__stat {
    text-align: center;
}

.team-hero__stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    animation: countUp 0.8s ease both;
}

.team-hero__stat-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
    margin-top: var(--space-xs);
}

.team-hero__stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

/* Wave at bottom of hero */
.team-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.team-hero__wave svg {
    display: block;
    width: 100%;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.team-filter {
    border-bottom: 1px solid var(--color-light-grey);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    background: var(--color-white);
}

.team-filter__tabs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding-block: var(--space-md);
}

.team-filter__tab {
    padding: 0.55em 1.4em;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-text-light);
    background: var(--color-off-white);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-spring);
    white-space: nowrap;
}

.team-filter__tab:hover {
    color: var(--color-primary);
    background: var(--color-light-grey);
}

.team-filter__tab.is-active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,95,153,0.3);
}

/* ============================================================
   TEAM SECTION
   ============================================================ */
.team-section {
    transition: opacity var(--transition-base);
}

.team-section.is-hidden {
    display: none;
}

.team-grid {
    margin-top: var(--space-2xl);
}

/* Coaches use a slightly wider column */
.team-grid--coaches {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ============================================================
   TEAM MEMBER WRAP — for filtering
   ============================================================ */
.team-member-wrap {
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.team-member-wrap.is-hidden {
    display: none;
}

/* ============================================================
   SWIMMER CARD  (enhanced for team page)
   ============================================================ */
.swimmer-card {
    height: 100%;
}

.swimmer-card__photo,
.swimmer-card__photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Photo wrap link */
.swimmer-card__photo-wrap {
    display: block;
    overflow: hidden;
}

.swimmer-card__photo-wrap .swimmer-card__photo {
    transition: transform 0.4s ease;
    display: block;
}

.swimmer-card:hover .swimmer-card__photo-wrap .swimmer-card__photo {
    transform: scale(1.04);
}

/* Placeholder — base */
.swimmer-card__photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

/* Role-specific placeholder backgrounds */
.swimmer-card__photo-placeholder--coaches     { background: linear-gradient(135deg, #7b0000 0%, #cc0000 100%); }
.swimmer-card__photo-placeholder--pool-helpers{ background: linear-gradient(135deg, #0a3d6b 0%, #1565c0 100%); }
.swimmer-card__photo-placeholder--swimmers    { background: linear-gradient(135deg, #1a1a1a 0%, #444 100%); }
.swimmer-card__photo-placeholder--volunteers  { background: linear-gradient(135deg, #1b5e20 0%, #388e3c 100%); }
.swimmer-card__photo-placeholder--committee   { background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%); }

/* Diagonal stripe overlay — subtle texture */
.swimmer-card__photo-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.04) 10px,
        rgba(255,255,255,0.04) 20px
    );
    pointer-events: none;
}

/* Large role icon */
.swimmer-card__icon {
    font-size: 3rem;
    line-height: 1;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.swimmer-card:hover .swimmer-card__icon {
    transform: scale(1.15);
}

/* Initials shown below icon */
.swimmer-card__initials {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    line-height: 1;
}

/* Overlay badge on hover */
.swimmer-card {
    position: relative;
}

.swimmer-card__overlay {
    position: absolute;
    inset: 0 0 auto 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0,30,60,0.6));
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.swimmer-card:hover .swimmer-card__overlay {
    opacity: 1;
}

/* Name link */
.swimmer-card__name a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.swimmer-card__name a:hover {
    color: var(--color-primary);
}

/* ============================================================
   VOLUNTEER CTA BANNER
   ============================================================ */
.volunteer-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.volunteer-cta__card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2xl);
    align-items: center;
    overflow: hidden;
    position: relative;
}

.volunteer-cta__card::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,194,224,0.15), transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.volunteer-cta__content .section-label {
    background: rgba(255,255,255,0.15);
    color: var(--color-white);
    border-color: rgba(255,255,255,0.3);
}

.volunteer-cta__content h2 {
    color: var(--color-white);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: var(--space-md);
}

.volunteer-cta__content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: var(--space-xl);
}

.volunteer-cta__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Floating emoji graphic */
.volunteer-cta__graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    position: relative;
    min-width: 100px;
}

.cta-emoji {
    font-size: 3rem;
    line-height: 1;
    animation: waveFloat 3s ease-in-out infinite;
    display: block;
}

.cta-emoji--2 {
    animation-delay: -1s;
    font-size: 2.2rem;
    margin-left: 20px;
}

.cta-emoji--3 {
    animation-delay: -2s;
    font-size: 2.6rem;
    margin-left: -10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .team-hero__stats {
        gap: var(--space-lg);
    }

    .volunteer-cta__card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .volunteer-cta__graphic {
        flex-direction: row;
        justify-content: center;
    }

    .volunteer-cta__content p {
        max-width: 100%;
    }

    .volunteer-cta__actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .team-hero {
        padding-bottom: calc(var(--space-2xl) + 3rem);
    }

    .team-hero__stat-divider {
        display: none;
    }

    .team-filter__tabs {
        gap: var(--space-xs);
    }

    .team-filter__tab {
        font-size: 0.8rem;
        padding: 0.45em 1em;
    }
}

/* ============================================================
   HOME PAGE STYLES  —  css/home.css (included here)
   ============================================================ */

/* Hero */
.home-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
    overflow: hidden;
    color: var(--color-white);
    padding-block: var(--space-3xl);
}

.home-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.home-hero__bg::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    bottom: -40%;
    left: -10%;
    background-image:
        radial-gradient(ellipse 80% 40% at 50% 100%, rgba(0,194,224,0.2), transparent),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400'%3E%3Cpath fill='rgba(255,255,255,0.03)' d='M0 200 C360 100 720 300 1080 200 C1260 150 1380 250 1440 200 L1440 400 L0 400Z'/%3E%3Cpath fill='rgba(255,255,255,0.03)' d='M0 300 C360 200 720 400 1080 300 C1260 250 1380 350 1440 300 L1440 400 L0 400Z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: bottom;
}

.home-hero__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(0,194,224,0.12);
    border: 1px solid rgba(0,194,224,0.3);
    padding: 0.4em 1em;
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeInUp 0.6s 0.2s ease forwards;
}

.home-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--color-white);
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeInUp 0.6s 0.35s ease forwards;
}

.home-hero__title span {
    color: var(--color-accent);
}

.home-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: var(--space-2xl);
    opacity: 0;
    animation: fadeInUp 0.6s 0.5s ease forwards;
}

.home-hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s 0.65s ease forwards;
}

.home-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.home-hero__wave svg {
    display: block;
    width: 100%;
}

/* Stats bar */
.stats-bar {
    background: var(--color-primary);
    padding-block: var(--space-xl);
}

.stats-bar .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.stats-bar__item {
    text-align: center;
    padding: var(--space-md);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.stats-bar__item:last-child {
    border-right: none;
}

.stats-bar__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
}

.stats-bar__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
    margin-top: var(--space-xs);
}

@media (max-width: 768px) {
    .stats-bar .container {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-bar__item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}
