/* Ice Freestyle Teams Showroom — reusable section styles */

.showroom {
    --showroom-bg: #eef2f7;
    --showroom-surface: #ffffff;
    --showroom-ink: #0f172a;
    --showroom-muted: #64748b;
    --showroom-border: rgba(15, 23, 42, 0.08);
    --showroom-accent: #0f172a;
    --showroom-accent-hover: #1e293b;
    --showroom-radius: 16px;
    --showroom-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --showroom-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 3rem;
}

.showroom__intro {
    margin-bottom: 1.75rem;
}

.showroom__title {
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--showroom-ink);
    margin: 0 0 0.35rem;
}

.showroom__lede {
    color: var(--showroom-muted);
    font-size: 0.95rem;
    max-width: 42rem;
    margin: 0;
    line-height: 1.55;
}

.showroom__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    align-items: stretch;
}

.team-card-wrap {
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 640px) {
    .showroom__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .showroom__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .showroom__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.team-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--showroom-surface);
    border-radius: var(--showroom-radius);
    border: 1px solid var(--showroom-border);
    box-shadow: var(--showroom-shadow);
    overflow: hidden;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--showroom-shadow-hover);
    border-color: rgba(15, 23, 42, 0.12);
}

.team-card[data-card-url] {
    cursor: pointer;
}

.team-card[data-team-index] {
    cursor: pointer;
}

.team-card:focus-within {
    outline: none;
    box-shadow:
        var(--showroom-shadow-hover),
        0 0 0 3px rgba(59, 130, 246, 0.35);
    border-color: rgba(59, 130, 246, 0.35);
}

.team-card[tabindex="0"]:focus-visible {
    outline: none;
    box-shadow:
        var(--showroom-shadow-hover),
        0 0 0 3px rgba(59, 130, 246, 0.45);
    border-color: rgba(59, 130, 246, 0.45);
}

.team-card__header {
    position: relative;
    min-height: 88px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
}

.team-card__header--cover {
    background: #e2e8f0 center / cover no-repeat;
}

.team-card__header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.45) 0%,
        rgba(248, 250, 252, 0.92) 72%,
        #ffffff 100%
    );
    pointer-events: none;
}

.team-card__logo-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 1rem 1rem 0.5rem;
}

.team-card__logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--showroom-border);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    padding: 0.35rem;
}

.team-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0 1.15rem 1.15rem;
    min-height: 0;
}

.team-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--showroom-ink);
    text-align: center;
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.team-card__location {
    font-size: 0.8125rem;
    color: var(--showroom-muted);
    text-align: center;
    margin: 0 0 0.65rem;
    line-height: 1.4;
}

.team-card__tagline {
    font-size: 0.875rem;
    color: #334155;
    text-align: center;
    margin: 0 0 0.85rem;
    line-height: 1.5;
    flex-shrink: 0;
}

.team-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin: 0 0 0.75rem;
    list-style: none;
    padding: 0;
}

.team-card__tags > li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.team-card__tag {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    line-height: 1.3;
}

.team-card__stat {
    font-size: 0.78rem;
    color: var(--showroom-muted);
    text-align: center;
    margin: 0 0 1rem;
}

.team-card__stat strong {
    color: var(--showroom-ink);
    font-weight: 600;
}

.team-card__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-top: 0.25rem;
}

.team-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0.62rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    color: #fff !important;
    background: var(--showroom-accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.team-card__cta:hover {
    background: var(--showroom-accent-hover);
}

.team-card__cta:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.team-card__cta[disabled],
.team-card__cta[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.team-card__social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1rem;
}

.team-card__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.team-card__social-link:hover {
    color: var(--showroom-ink);
    background: #f1f5f9;
}

.team-card__social-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Team Modal */
.team-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1200;
}

.team-modal.is-open {
    display: block;
}

.team-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(7px);
}

.team-modal__panel {
    position: relative;
    width: min(1120px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
    overflow: auto;
    scroll-behavior: smooth;
    transform: translateY(12px) scale(0.99);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.team-modal.is-open .team-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.team-modal__close {
    position: sticky;
    top: 0.75rem;
    margin-left: auto;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    color: #0f172a;
    cursor: pointer;
    z-index: 2;
}

.team-modal__close:hover {
    background: #f8fafc;
}

.team-modal__close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.team-detail {
    padding: 0 1.2rem 1.2rem;
}

.team-detail__header {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.6rem 0.15rem 0.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.team-detail__logo {
    width: 86px;
    height: 86px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.35rem;
    object-fit: contain;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

.team-detail__title-wrap {
    min-width: 0;
}

.team-detail__title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    color: #0f172a;
    line-height: 1.2;
}

.team-detail__subtitle {
    margin: 0.3rem 0 0;
    color: #475569;
    font-size: 0.92rem;
}

.team-detail__body {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 1rem;
}

.team-detail__main,
.team-detail__side {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.team-pane {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #ffffff;
    padding: 0.9rem;
}

.team-pane h4 {
    margin: 0 0 0.55rem;
    color: #0f172a;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.team-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.team-detail__tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.25rem 0.58rem;
    text-transform: uppercase;
}

.team-detail__description {
    color: #334155;
    line-height: 1.6;
    font-size: 0.92rem;
}

.team-gallery {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
    aspect-ratio: 16 / 9;
    min-height: 220px;
}

.team-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: transform, opacity, filter;
    position: relative;
    z-index: 1;
}

.team-gallery__placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.team-gallery__image--outgoing {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.team-gallery__image.is-slide-in-next {
    animation: teamGallerySlideInNext 420ms cubic-bezier(0.24, 0.78, 0.24, 1);
}

.team-gallery__image.is-slide-in-prev {
    animation: teamGallerySlideInPrev 420ms cubic-bezier(0.24, 0.78, 0.24, 1);
}

.team-gallery__image--outgoing.is-slide-out-next {
    animation: teamGallerySlideOutNext 420ms cubic-bezier(0.24, 0.78, 0.24, 1) forwards;
}

.team-gallery__image--outgoing.is-slide-out-prev {
    animation: teamGallerySlideOutPrev 420ms cubic-bezier(0.24, 0.78, 0.24, 1) forwards;
}

@keyframes teamGallerySlideInNext {
    0% {
        transform: translateX(100%);
        opacity: 0.94;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes teamGallerySlideOutNext {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0.94;
    }
}

@keyframes teamGallerySlideInPrev {
    0% {
        transform: translateX(-100%);
        opacity: 0.94;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes teamGallerySlideOutPrev {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0.94;
    }
}

.team-gallery__controls {
    position: absolute;
    inset: auto 0.55rem 0.55rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-gallery__nav {
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.team-gallery__nav:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.team-gallery__count {
    font-size: 0.78rem;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.team-kpis {
    display: grid;
    gap: 0.5rem;
}

.team-kpis__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: #475569;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.team-kpis__item strong {
    color: #0f172a;
    font-weight: 600;
}

.team-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-links__btn {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    padding: 0.42rem 0.7rem;
    border-radius: 10px;
    background: #fff;
}

.team-links__btn--primary {
    color: #fff;
    background: #0f172a;
    border-color: #0f172a;
}

.team-links__btn:hover {
    background: #f8fafc;
}

.team-links__btn--primary:hover {
    background: #1e293b;
}

.team-links__btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (max-width: 860px) {
    .team-modal__panel {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        margin: 0.5rem auto;
    }

    .team-detail__body {
        grid-template-columns: 1fr;
    }

    .team-detail__header {
        align-items: center;
    }
}

/* Hide empty optional blocks (set via JS with hidden attr or .is-empty) */
.team-card [hidden],
.team-card .is-empty {
    display: none !important;
}
