/* ============================================
   FENGÁRI - Academia de Gimnasia
   Design System — Paleta basada en logo oficial
   Navy + Blanco + Azul acento
   ============================================ */

:root {
    /* Colors - Fengári Brand */
    --color-primary: #1a2744;
    --color-primary-dark: #0f1a2e;
    --color-primary-darker: #0a1220;
    --color-secondary: #2a3f66;
    --color-accent: #3b6cb5;
    --color-accent-light: #5a8fd4;
    --color-accent-glow: rgba(59, 108, 181, 0.15);

    /* Backgrounds */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f4f7fb;
    --color-bg-dark: #1a2744;
    --color-bg-card: #ffffff;

    /* Text */
    --color-text-primary: #1a2744;
    --color-text-secondary: #4a5c7a;
    --color-text-muted: #7a8ba5;
    --color-text-light: #ffffff;
    --color-text-on-dark: #e8edf5;

    /* Utility */
    --color-border: #d4dce8;
    --color-border-light: #e8edf5;
    --color-overlay: rgba(26, 39, 68, 0.85);

    /* Typography */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sizing */
    --container-max: 1200px;
    --section-padding: 5rem;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 39, 68, 0.08);
    --shadow-md: 0 4px 20px rgba(26, 39, 68, 0.12);
    --shadow-lg: 0 8px 40px rgba(26, 39, 68, 0.16);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* --- Container & Section --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section--light {
    background-color: var(--color-bg-secondary);
}

.section--accent {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.section--accent .section__tag {
    color: var(--color-accent-light);
    border-color: rgba(90, 143, 212, 0.3);
}

.section--accent .section__title {
    color: var(--color-text-light);
}

.section--accent .section__description {
    color: var(--color-text-on-dark);
}

/* --- Divisores curvos entre secciones (motivo luna, on-brand) ---
   Las secciones oscuras "invaden" con una curva orgánica la sección
   vecina, arriba y abajo. Reemplaza los fundidos borrosos que se veían
   lodosos sobre el navy. Los divisores son absolutos, así que el orden
   en el DOM no importa. */
.section__wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    line-height: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
    /* Delineación sutil para fronteras entre tonos claros parecidos. */
    filter: drop-shadow(0 -2px 3px rgba(26, 39, 68, 0.07));
}

.section__wave svg {
    display: block;
    /* Más ancha que el contenedor (recortada por overflow:hidden) para
       que la ola pueda desplazarse en horizontal (ligado al scroll)
       sin dejar huecos. 8 crestas en el viewBox × (100/400) = 2
       crestas visibles; el gran ancho da recorrido para que las
       crestas "marchen" al scrollear. */
    width: 400%;
    height: 100%;
    margin-left: -150%;
    will-change: transform;
}

.section__wave--top { top: -60px; }

/* Color de la ola = color de la propia sección (sube hacia la anterior) */
.section__wave-fill { fill: var(--color-bg-primary); }
.section--light .section__wave-fill { fill: var(--color-bg-secondary); }
.section--accent .section__wave-fill { fill: var(--color-bg-dark); }
.footer .section__wave-fill { fill: var(--color-primary-darker); }

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    padding: 0.35rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 50px;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
}

.section__title em {
    color: var(--color-accent);
    font-style: normal;
}

.section__description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn--primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    border: 2px solid var(--color-text-light);
    color: var(--color-text-light);
    background: transparent;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn--outline {
    border: 1.5px solid var(--color-border);
    color: var(--color-text-secondary);
    background: transparent;
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-glow);
}

.btn--sm { padding: 0.6rem 1.25rem; font-size: 0.8rem; }
.btn--lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn--full { width: 100%; }

/* --- Preloader --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-darker);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader__logo { width: 100px; }
.preloader__svg { width: 100%; animation: preloader-pulse 1.5s ease-in-out infinite; }

@keyframes preloader-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* --- Header / Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(26, 39, 68, 0.08);
    border-bottom: 1px solid var(--color-border-light);
}

.header.scrolled .nav__link { color: var(--color-text-secondary); }
.header.scrolled .nav__link:hover,
.header.scrolled .nav__link.active { color: var(--color-primary); }
.header.scrolled .nav__toggle { color: var(--color-primary); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo-svg {
    height: 46px;
    width: auto;
    transition: all var(--transition-base);
}

/* Alternar versiones de color del logo según scroll */
.nav__logo--dark { display: none; }
.header.scrolled .nav__logo--light { display: none; }
.header.scrolled .nav__logo--dark { display: block; }

.nav__logo:hover .nav__logo-svg {
    transform: scale(1.05);
    opacity: 0.85;
}

.header.scrolled .nav__logo-svg { 
    height: 40px;
}

.nav__list {
    display: flex;
    gap: 1.75rem;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
    position: relative;
    padding: 0.25rem 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-light);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav__link:hover,
.nav__link.active { color: #ffffff; }

.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__toggle, .nav__close {
    display: none;
    color: #ffffff;
}

@media (max-width: 1024px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-primary-dark);
        padding: 5rem 2rem 2rem;
        transition: right var(--transition-base);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 1001;
    }

    .nav__menu.active { right: 0; }
    .nav__list { flex-direction: column; gap: 1.5rem; }
    .nav__link { font-size: 1.1rem; color: rgba(255, 255, 255, 0.85); }
    .nav__toggle, .nav__close { display: block; }
    .nav__close { position: absolute; top: 1.5rem; right: 1.5rem; color: #fff; }
    .nav__actions .btn { display: none; }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__overlay {
    background: linear-gradient(180deg, rgba(10, 18, 32, 0.7) 0%, rgba(26, 39, 68, 0.4) 50%, rgba(10, 18, 32, 0.6) 100%);
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Logo centrado en el hero (siempre visible sobre el video) */
.hero__logo-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.hero__logo {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(10, 18, 32, 0.5));
}

@media (max-width: 768px) {
    .hero__logo { max-width: 280px; }
    .hero__logo-wrap { padding: 2rem; }
}

.hero__cta-btn {
    backdrop-filter: blur(8px);
    background: rgba(26, 39, 68, 0.85);
    border: 1px solid rgba(255,255,255,0.15);
}

.hero__logo-animated { margin-bottom: 1.5rem; perspective: 800px; }

.hero__logo-svg {
    width: 380px;
    height: 175px;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .hero__content { text-align: center; padding: 6rem 0 3rem; }
    .hero__cta { justify-content: center; }
    .hero__logo-animated { display: flex; justify-content: center; }
    .hero__logo-svg { width: 280px; height: 130px; }
}
/* Hero moon entrance — handled by GSAP in logo-animation.js */

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.hero__title-line { display: block; transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

.hero__title-line--accent {
    color: var(--color-accent-light);
}

.hero__description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.hero__tagline {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-accent-light);
    margin-bottom: 2rem;
    font-style: italic;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__scroll {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero__scroll-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- About Section --- */
.section--fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Padding vertical para que el contenido (título, coverflow,
       counters) nunca quede debajo de la ola divisoria. */
    padding: 5rem 0;
}

.about__grid--fullscreen {
    display: grid;
    grid-template-columns: 0.35fr 0.65fr;
    gap: 1rem;
    align-items: center;
    min-height: 80vh;
}

.about__grid--fullscreen .about__story {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about__grid--fullscreen .section__tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    font-weight: 600;
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: 50px;
    width: fit-content;
}

.about__grid--fullscreen .section__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
}

.about__quote {
    padding: 1.5rem 2rem;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-accent);
    margin-bottom: 1.5rem;
}

.about__quote p {
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.about__quote cite {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    font-style: normal;
}

.about__text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.about__highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.about__highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.about__highlight-icon { font-size: 1.1rem; }

.about__visual { position: relative; }

.about__visual--full {
    height: 80vh;
    max-height: 700px;
    min-height: 480px;
    overflow: hidden;
}

/* Stats inline variant */
.about__stats--inline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.about__stats--inline .about__stat {
    padding: 0.8rem 0.4rem;
}

.about__stats--inline .about__stat-number {
    font-size: 1.5rem;
}

.about__stats--inline .about__stat-label {
    font-size: 0.65rem;
}

/* === 3D COVERFLOW (tasteskill.dev style) === */
.coverflow3d {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    perspective: 900px;
    cursor: grab;
    user-select: none;
}

.coverflow3d:active {
    cursor: grabbing;
}

.coverflow3d__scene {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.coverflow3d__card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    margin: 0;
    /* White matte frame — unifies images of different aspect ratios
       into a consistent "framed photo" look (like the reference) and
       softens the hard rectangular edge of each source image. */
    padding: 10px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(26, 39, 68, 0.20), 0 4px 12px rgba(0, 0, 0, 0.08);
    will-change: transform, opacity;
    pointer-events: none;
}

.coverflow3d__card img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;      /* fixed ratio + cover => every image shows same size */
    object-fit: cover;
    display: block;
    border-radius: 10px;
    /* Hairline inner edge so the photo doesn't meet the white frame
       with a harsh line — gentle, feathered transition. */
    box-shadow: inset 0 0 0 1px rgba(26, 39, 68, 0.06);
}

/* Active card gets pointer events for click */
.coverflow3d__card--active {
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .coverflow3d {
        perspective: 700px;
    }
    .coverflow3d__card {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .coverflow3d {
        height: 340px;
        min-height: 300px;
        perspective: 600px;
    }
    .coverflow3d__card {
        width: 65%;
        padding: 7px;
        border-radius: 14px;
    }
    .coverflow3d__card img {
        border-radius: 8px;
    }
}

.about__image {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.about__img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.about__stat {
    text-align: center;
    padding: 1.25rem 0.5rem;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-light);
}

.about__stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.about__stat-plus { font-size: 1.5rem; color: var(--color-accent); }

.about__stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .about__grid, .about__grid--fullscreen { grid-template-columns: 1fr; gap: 2rem; }
    .about__grid--fullscreen { min-height: auto; }
    .about__visual { order: -1; }
    .about__visual--full { height: 50vh; min-height: 320px; max-height: 400px; }
    .about__img { height: 280px; }
    .section--fullscreen { min-height: auto; padding: 3rem 0; }
}

/* --- Disciplines Section --- */
.disciplines__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.discipline-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.discipline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.discipline-card__icon {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.discipline-card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.discipline-card__description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* --- Programs Section --- */
/* --- Programs Section: Stacked Carousel --- */
.programs__carousel {
    position: relative;
    height: 380px;
    max-width: 900px;
    margin: 0 auto;
    cursor: grab;
    perspective: 1000px;
    /* Permite scroll vertical de la página pero deja el gesto horizontal
       para el carrusel (clave en touch / iPad). */
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.programs__carousel.is-dragging {
    cursor: grabbing;
}

.programs__carousel .program-card {
    position: absolute;
    width: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border-light);
}

.programs__carousel .program-card[data-position="center"] {
    transform: translate(-50%, -50%) scale(1) rotateY(0deg);
    opacity: 1;
    z-index: 4;
    filter: none;
}

.programs__carousel .program-card[data-position="left"] {
    transform: translate(-130%, -50%) scale(0.85) rotateY(8deg);
    opacity: 0.7;
    z-index: 3;
    filter: brightness(0.9);
}

.programs__carousel .program-card[data-position="right"] {
    transform: translate(30%, -50%) scale(0.85) rotateY(-8deg);
    opacity: 0.7;
    z-index: 3;
    filter: brightness(0.9);
}

.programs__carousel .program-card[data-position="far-left"] {
    transform: translate(-180%, -50%) scale(0.7) rotateY(12deg);
    opacity: 0.4;
    z-index: 2;
    filter: brightness(0.8);
}

.programs__carousel .program-card[data-position="far-right"] {
    transform: translate(80%, -50%) scale(0.7) rotateY(-12deg);
    opacity: 0.4;
    z-index: 2;
    filter: brightness(0.8);
}

.programs__carousel .program-card[data-position="hidden"] {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .programs__carousel { height: 360px; }
    .programs__carousel .program-card { width: 260px; }
    .programs__carousel .program-card[data-position="left"] { transform: translate(-110%, -50%) scale(0.8); }
    .programs__carousel .program-card[data-position="right"] { transform: translate(10%, -50%) scale(0.8); }
    .programs__carousel .program-card[data-position="far-left"],
    .programs__carousel .program-card[data-position="far-right"] { opacity: 0; }
}

.program-card {
    position: relative;
    padding: 2rem;
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.program-card--featured {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(59, 108, 181, 0.15);
}

.program-card__badge {
    position: absolute;
    top: -10px;
    right: 1.5rem;
    background: var(--color-accent);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.program-card__phase {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.program-card__moon-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    display: block;
}

.program-card__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.program-card__age {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.program-card__description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.program-card__features {
    flex-grow: 1;
}

.program-card__features li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.25rem;
    position: relative;
    border-bottom: 1px solid var(--color-border-light);
}

.program-card__features li:last-child { border-bottom: none; }

.program-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    transform: translateY(-50%);
}

/* --- Events Section --- */
.events__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.event-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent-light);
    box-shadow: 0 8px 30px rgba(59, 108, 181, 0.2);
}

.event-card__badge {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.event-card__title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.event-card__subtitle {
    font-size: 1rem;
    color: var(--color-accent-light);
    margin-bottom: 1.25rem;
}

.event-card__details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.event-card__detail {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--color-text-on-dark);
}

.event-card__detail-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.event-card .btn--primary {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
}

.event-card .btn--primary:hover {
    background: #ffffff;
}

/* --- Gallery Section --- */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 1rem;
}

.gallery__item {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

.gallery__item--large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery__item--tall {
    grid-row: span 2;
}

.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery__item:hover .gallery__img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .gallery__item--large { grid-column: span 2; grid-row: span 1; }
    .gallery__item--tall { grid-row: span 1; }
}

/* --- Products Section --- */
.products__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.products__showcase {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.products__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.products__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.products__desc {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.products__features {
    margin-bottom: 2rem;
}

.products__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding: 0.6rem 0;
}

.products__features li svg {
    flex-shrink: 0;
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .products__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Contact Section --- */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.contact__card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-light);
    margin-bottom: 1rem;
    transition: all var(--transition-base);
}

.contact__card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.contact__card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: var(--color-accent-glow);
    color: var(--color-accent);
}

.contact__card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.contact__card p, .contact__card small {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.contact__link {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact__link:hover { text-decoration: underline; }

/* Contact Form */
.contact__form-wrapper {
    padding: 2.5rem;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border-light);
}

.form__group { margin-bottom: 1.25rem; }

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
}

.form__input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background: #ffffff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    outline: none;
}

.form__input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form__input::placeholder { color: var(--color-text-muted); }

.form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8ba5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form__textarea { resize: vertical; min-height: 80px; }

@media (max-width: 768px) {
    .contact__grid { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .contact__form-wrapper { padding: 1.5rem; }
}

/* --- Footer --- */
.footer {
    position: relative;
    padding: 4rem 0 2rem;
    background: var(--color-primary-darker);
    color: var(--color-text-on-dark);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo-svg {
    width: auto;
    height: 42px;
    margin-bottom: 1rem;
    opacity: 0.9;
    transition: opacity var(--transition-base);
}

.footer__logo-svg:hover { opacity: 1; }

.footer__tagline {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.footer__meaning {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer__links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.footer__links ul li { margin-bottom: 0.6rem; }

.footer__links ul li a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer__links ul li a:hover { color: var(--color-accent-light); }

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer__coach {
    color: var(--color-accent-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer__brand { grid-column: span 2; }
    .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* --- 3D Model Viewer --- */
.hero__3d {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 35%;
    max-width: 400px;
    z-index: 1;
    opacity: 0.7;
}

.hero__content {
    position: relative;
    z-index: 2;
}

.about__3d {
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-secondary);
}

.model3d-separator model-viewer {
    filter: hue-rotate(220deg) saturate(0.8) brightness(0.95);
}

.model3d-separator {
    padding: 2rem 0;
    background: var(--color-bg-secondary);
    display: flex;
    justify-content: center;
}

.model3d-separator model-viewer {
    max-width: 600px;
}

@media (max-width: 1024px) {
    .hero__3d {
        position: relative;
        width: 100%;
        max-width: 280px;
        margin: 2rem auto 0;
        transform: none;
        right: auto;
        top: auto;
        opacity: 1;
    }
}

/* --- Podcast Section --- */
.podcast__content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
}

.podcast__icon {
    margin-bottom: 1.5rem;
}

.podcast__icon svg {
    margin: 0 auto;
}

.podcast__description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.podcast__player {
    margin-bottom: 0.75rem;
}

.podcast__player audio {
    width: 100%;
    max-width: 450px;
    border-radius: var(--border-radius-sm);
}

.podcast__duration {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* --- Swiper (removed, using circular carousel) --- */

/* --- Smooth scroll body --- */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

/* --- Open Gym Section --- */
.opengym__content {
    max-width: 700px;
    margin: 0 auto;
}

.opengym__desc {
    font-size: 1.05rem;
    color: var(--color-text-on-dark);
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: center;
}

.opengym__features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.opengym__feature {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.opengym__feature strong {
    font-size: 0.9rem;
    color: #ffffff;
    display: block;
    margin-bottom: 0.25rem;
}

.opengym__feature p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.opengym__cta {
    text-align: center;
}

.opengym__aviso {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

/* ============================================
   REVISIÓN v1 — Mejoras adicionales
   ============================================ */

/* --- Perfil del entrenador (About) --- */
.about__coach {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-secondary);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--border-radius-sm);
}

.about__coach-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.about__coach-creds {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.about__coach-creds li {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* --- Podcast: layout en 2 columnas --- */
.podcast__content--split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 940px;
    margin: 0 auto;
    text-align: left;
}

.podcast__content--split .podcast__icon { margin-bottom: 1rem; }
.podcast__content--split .podcast__icon svg { margin: 0; }
.podcast__content--split .podcast__description { margin-bottom: 1.25rem; }
.podcast__content--split .podcast__player { margin-bottom: 0.5rem; }
.podcast__content--split .podcast__duration { text-align: left; }

.podcast__chapters-col {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.podcast__chapters-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

/* Lista de capítulos clicable (salta al minuto:segundo del audio) */
.podcast__chapters {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    text-align: left;
}

.podcast__chapter {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--border-radius-sm);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.podcast__chapter:hover { background: var(--color-bg-secondary); }
.podcast__chapter:active { transform: scale(0.99); }

.podcast__chapter.is-active { background: var(--color-accent-glow); }
.podcast__chapter.is-active .podcast__chapter-num {
    background: var(--color-accent);
    color: #ffffff;
}

.podcast__chapter-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    color: var(--color-accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.podcast__chapter-label {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.3;
}

.podcast__chapter-time {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .podcast__content--split {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .podcast__content--split .podcast__icon svg { margin: 0 auto; }
    .podcast__content--split .podcast__duration { text-align: center; }
    .podcast__chapters-col { text-align: left; }
}

/* --- Botón flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    background: #25d366;
    color: #ffffff;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5);
    color: #ffffff;
}

.whatsapp-float svg {
    flex-shrink: 0;
}

.whatsapp-float__text {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .whatsapp-float {
        padding: 0.85rem;
        border-radius: 50%;
    }
    .whatsapp-float__text {
        display: none;
    }
}

/* --- Conectividad aérea (Contacto) --- */
.contact__airports {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact__airports li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.contact__airports li strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================
   COMUNIDAD — Mapa de gimnastas
   ============================================ */
.community__map-wrap {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(90, 143, 212, 0.25);
}

.community__map {
    width: 100%;
    height: 460px;
    background: #e8edf5;
}

.community__cta {
    text-align: center;
    margin-top: 2rem;
}

/* Marcadores personalizados (Leaflet divIcon) */
.map-pin-wrap { background: transparent; border: none; }

.map-pin {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(10, 18, 32, 0.4);
}

.map-pin--sede {
    width: 22px;
    height: 22px;
    background: #25d366;
    box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.35);
    animation: pinPulse 2s ease-out infinite;
}

@keyframes pinPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 600px) {
    .community__map { height: 340px; }
}

/* ============================================
   MODAL — Agregar pin
   ============================================ */
.pin-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.pin-modal.active {
    opacity: 1;
    visibility: visible;
}

.pin-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 32, 0.7);
    backdrop-filter: blur(3px);
}

.pin-modal__box {
    position: relative;
    background: #ffffff;
    color: var(--color-text-primary);
    max-width: 440px;
    width: 100%;
    padding: 2.5rem 2rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(12px) scale(0.98);
    transition: transform var(--transition-base);
}

.pin-modal.active .pin-modal__box {
    transform: translateY(0) scale(1);
}

.pin-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.pin-modal__close:hover { color: var(--color-primary); }

.pin-modal__title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.pin-modal__text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.pin-modal__steps {
    list-style: decimal;
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pin-modal__steps li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.pin-modal__note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 1rem;
}

.pin-modal__note a {
    color: var(--color-accent);
    font-weight: 600;
}

/* Asegurar que las secciones siguientes a "Nosotros" se pinten por
   encima del coverflow 3D (que crea su propio stacking context con
   perspectiva). Así la ola que sube desde Disciplinas cubre las
   tarjetas del coverflow por debajo. */
#nosotros { position: relative; z-index: 0; }
#disciplinas { position: relative; z-index: 1; }
