/* =========================================
   APPLE EXPERIENCE SECTION (Master Version)
   ========================================= */

/* --- CONFIGURACIÓN PRINCIPAL --- */
.apple-experience-section {
    background-color: #000;
    /* Fondo negro puro estilo Apple */
    padding: 60px 0 0;
    /* Eliminado padding inferior para conectar con sección siguiente */
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
    min-height: auto;
    /* Removido min-height: 100vh para permitir ajuste */
    max-height: 100vh;
    /* Forzar que no exceda viewport */
    display: flex;
    flex-direction: column;
}

.apple-header {
    text-align: center;
    margin-bottom: 25px;
    /* Reducido de 40px */
    color: #fff;
    flex-shrink: 0;
}

.apple-title {
    font-family: 'Inter', sans-serif;
    /* Premium Tony Robbins style */
    font-weight: 800;
    /* Extra Bold */
    letter-spacing: -0.04em;
    /* EL SECRETO: Letras pegaditas para look premium */
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    /* Fluido y optimizado para móvil */
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
}

.apple-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
    letter-spacing: 1px;
}

.apple-subtitle .arrow-icon {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #c5a059;
}

.apple-header:hover .arrow-icon {
    transform: translateX(5px);
}

/* --- CARRUSEL MAGNÉTICO (REEL) --- */
.apple-reel-wrapper {
    position: relative;
    /* For absolute positioning of arrows */
}

.apple-reel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 20px 5vw;
    scroll-snap-type: x mandatory;
    /* MAGIA: Se detiene en el centro */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    scroll-behavior: smooth;
    /* Smooth scrolling for arrow navigation */
}

.apple-reel:active {
    cursor: grabbing;
}

.apple-reel::-webkit-scrollbar {
    display: none;
}

/* --- NAVIGATION ARROWS (Desktop Only) --- */
.apple-nav-arrow {
    display: none;
    /* Hidden by default (mobile) */
}

@media (min-width: 992px) {
    .apple-nav-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        cursor: pointer;
        z-index: 100;
        transition: all 0.3s ease;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .apple-reel-wrapper:hover .apple-nav-arrow {
        opacity: 1;
        pointer-events: auto;
    }

    .apple-nav-arrow:hover {
        background: #fff;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .apple-nav-arrow.prev {
        left: 20px;
    }

    .apple-nav-arrow.next {
        right: 20px;
    }

    .apple-nav-arrow svg {
        width: 24px;
        height: 24px;
        fill: #000;
    }

    .apple-nav-arrow:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* TARJETAS */
.apple-card {
    flex: 0 0 auto;
    width: 380px;
    /* Reducido de 500px para caber en viewport */
    height: 480px;
    /* Reducido de 650px */
    border-radius: 24px;
    /* Antes: 18px - Más redondeado */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: center;
    /* Alineación magnética */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #222;
}

.apple-card:hover {
    transform: scale(1.02);
    border-color: #c5a059;
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.2);
}

/* Radial overlay para legibilidad del texto */
.apple-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    z-index: 1;
    pointer-events: none;
}

.card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    /* Sin grayscale - full color siempre */
    transition: transform 0.5s ease;
    border-radius: 20px;
    /* Ensure video matches card rounding */
    margin: 0;
    padding: 0;
    border: none;
}

.apple-card:hover .card-bg {
    filter: none;
    /* Mantener full color */
    transform: scale(1.05);
    /* Solo zoom */
}

.card-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Centrado perfecto */
    width: 90%;
    text-align: center;
    padding: 30px 25px;
    /* Reducido de 40px 30px */
    z-index: 2;
}

.card-tag {
    display: block;
    color: #c5a059;
    font-size: 0.75rem;
    /* Reducido de 0.9rem */
    font-weight: 800;
    /* Antes: 700 */
    letter-spacing: 2px;
    /* Reducido de 3px */
    margin-bottom: 12px;
    /* Reducido de 15px */
}

.card-overlay h3 {
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    /* Reducido de 4rem para viewport */
    font-weight: 700;
    margin: 12px 0;
    /* Reducido de 15px */
    line-height: 0.95;
    text-transform: uppercase;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Nuevo: Descripción de la card */
.card-description {
    font-size: 1rem;
    /* Reducido de 1.2rem */
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    font-family: 'Montserrat', sans-serif;
    margin-top: 12px;
    /* Reducido de 15px */
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* --- PROGRAM CARDS (Link Wrappers) --- */
.program-card {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 0 0 auto;
    width: 380px;
    height: 480px;
    border-radius: 20px;
    /* Rounded corners like reference */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    /* Remove border for seamless look */
}

.program-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    /* Subtle shadow on hover */
}

/* Enhanced dark overlay for better text readability (especially over videos) */
.program-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: 1;
    pointer-events: none;
}

/* Editorial Typography (Mixed Serif/Sans) */
.editorial-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 12px 0;
}

.editorial-title .font-serif {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 900;
    font-size: 1.8rem;
    /* Optimized for desktop readability */
    line-height: 1;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.editorial-title .font-sans {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.8rem;
    /* Optimized for desktop readability */
    letter-spacing: 2px;
    /* Reducido de 3px */
    line-height: 1;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Variaciones editoriales únicas por programa */
.editorial-title.style-mentoria .font-serif {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 300;
    /* Light weight */
    letter-spacing: 8px;
}

.editorial-title.style-mentoria .font-sans {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 900;
    text-transform: none;
    letter-spacing: 0;
}

.editorial-title.style-talleres .font-serif {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 1px;
}

.editorial-title.style-talleres .font-sans {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    /* Light weight para contraste */
    letter-spacing: 6px;
}

.card-benefit {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    margin-top: 15px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* --- MODAL DE LUJO CON ANIMACIÓN Y SOPORTE MÓVIL (MASTER CSS) --- */

/* 1. EL FONDO (OVERLAY) */
.pro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;

    /* Configuración Flex para centrado en escritorio */
    display: flex;
    align-items: center;
    justify-content: center;

    /* ESTADO INICIAL (Cerrado) */
    background: rgba(0, 0, 0, 0);
    /* Empieza transparente */
    backdrop-filter: blur(0px);
    /* Sin desenfoque */
    visibility: hidden;
    /* No interactuable */
    opacity: 0;

    /* TRANSICIÓN SUAVE (Curva Apple) */
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. LA TARJETA (CARD) */
.pro-modal-card {
    background: #0a0a0a;
    border: 1px solid #333;
    width: 90%;
    max-width: 800px;
    padding: 60px;
    position: relative;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    /* Bordes técnicos en escritorio */

    /* ESTADO INICIAL (Cerrado) */
    transform: scale(0.95) translateY(30px);
    /* Un poco más pequeño y abajo */
    opacity: 0;

    /* TRANSICIÓN */
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.05s;
    /* Pequeño retraso para que primero oscurezca el fondo */
}

/* --- ESTADO ACTIVO (ABIERTO) --- */
.pro-modal-overlay.active {
    visibility: visible;
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    /* Desenfoque progresivo */
}

.pro-modal-overlay.active .pro-modal-card {
    transform: scale(1) translateY(0);
    /* Posición final perfecta */
    opacity: 1;
}

/* 3. ANIMACIÓN EN CASCADA DEL CONTENIDO */
/* Esto hace que el texto entre "flotando" después de la tarjeta */
.pro-modal-overlay.active .analysis-step,
.pro-modal-overlay.active .analysis-result {
    opacity: 0;
    animation: contentFadeUp 0.6s ease forwards;
}

.pro-modal-overlay.active .analysis-step:nth-child(1) {
    animation-delay: 0.2s;
}

.pro-modal-overlay.active .analysis-step:nth-child(2) {
    animation-delay: 0.3s;
}

.pro-modal-overlay.active .analysis-result {
    animation-delay: 0.4s;
}

@keyframes contentFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 4. ADAPTACIÓN MÓVIL (BOTTOM SHEET) --- */
@media (max-width: 768px) {
    .pro-modal-overlay {
        align-items: flex-end;
        /* Alineamos al fondo */
        padding: 0;
    }

    .pro-modal-card {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 85vh;
        /* Ocupa 85% de la pantalla */
        overflow-y: auto;
        /* Scroll interno si es necesario */

        /* ESTILO "SHEET" */
        border-radius: 24px 24px 0 0;
        /* Redondeado solo arriba */
        border-bottom: none;
        padding: 40px 25px;

        /* ESTADO INICIAL MÓVIL (Escondido abajo) */
        transform: translateY(100%);
        opacity: 1;
        /* Opacidad siempre 1 para que no parpadee al subir */
    }

    /* ESTADO ACTIVO MÓVIL (Sube) */
    .pro-modal-overlay.active .pro-modal-card {
        transform: translateY(0);
    }

    /* BOTÓN CERRAR MÁS ACCESIBLE */
    .pro-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        /* Círculo de contraste */
        backdrop-filter: blur(5px);
        border: none;
    }

    /* Tipografía ajustada para móvil */
    .pro-title {
        font-size: 2.2rem;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- ESTILOS GENERALES DEL INTERIOR (Ya los tenías, mantenlos igual) --- */
.pro-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
    font-weight: 700;
}

.pro-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    color: #fff;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
}

.gold-plus {
    color: #c5a059;
    margin: 0 5px;
}

.pro-divider-modal {
    width: 100%;
    height: 1px;
    background: #222;
    margin: 40px 0;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.step-icon {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1;
}

.step-label {
    display: block;
    font-size: 0.8rem;
    color: #c5a059;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.step-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #ddd;
    font-weight: 300;
}

.analysis-result {
    background: #111;
    padding: 25px;
    border-left: 3px solid #c5a059;
}

.result-label {
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.result-text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pro-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 200;
}

.pro-close:hover {
    background: #fff;
    color: #000;
}

/* --- PAGINATION DOTS --- */
.apple-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    /* Reducido de 30px */
    padding: 15px 0;
    /* Reducido de 20px */
    flex-shrink: 0;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.pagination-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* MÓVIL */
@media (max-width: 768px) {
    .apple-experience-section {
        padding: 40px 0 30px;
        /* Más compacto en móvil */
        max-height: 100vh;
    }

    .apple-header {
        margin-bottom: 20px;
        padding: 0 20px;
        /* Add horizontal padding for mobile */
    }

    .apple-title {
        font-size: 1.8rem;
        line-height: 1.1;
        /* Allow title to wrap naturally for two-line podcast style */
    }

    /* Two-line title for mobile - both lines equally prominent */
}


/* --- TONY STATS SECTION (RECOVERY) --- */
.tony-stats-section {
    padding: 80px 5%;
    background: #000;
    color: #fff;
    position: relative;
    border-top: 1px solid #222;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
}

.stats-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #aeaeae;
    max-width: 800px;
    margin: 0 auto 50px auto;
    text-align: center;
    line-height: 1.6;
}

/* CAROUSEL GRID */
.stats-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 30px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.stats-grid::-webkit-scrollbar {
    display: none;
}

.evidence-card {
    background: #111;
    border: 1px solid #222;
    padding: 30px;
    border-radius: 8px;
    min-width: 280px;
    flex: 0 0 auto;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.evidence-card:hover {
    transform: translateY(-5px);
    border-color: #c5a059;
}

.card-number {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: #c5a059;
    margin: 0 0 10px 0;
    line-height: 1;
}

.card-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 60px;
    /* Aligner */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 15px;
}

.source-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-typo {
    font-family: serif;
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

/* Dots helper (reuse apple pagination styles or override) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    border: none;
    cursor: pointer;
    padding: 0;
}

.dot.active {
    background: #c5a059;
    transform: scale(1.2);
}

/* Restored Mobile Styles */
@media (max-width: 768px) {
    .apple-title .title-top {
        display: block;
        font-size: clamp(1.8rem, 7vw, 2.2rem);
        font-weight: 800;
        letter-spacing: -0.04em;
        color: #fff;
        margin-bottom: 5px;
        text-transform: uppercase;
        line-height: 1;
    }

    .apple-title .title-main {
        display: block;
        font-size: clamp(1.8rem, 7vw, 2.2rem);
        font-weight: 800;
        letter-spacing: -0.04em;
        line-height: 1;
        color: #fff;
    }

    .face-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fg-header,
    .full-width {
        grid-column: span 1;
    }

    .face-modal-card {
        padding: 25px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .apple-card {
        width: 75vw;
        /* Reducido de 85vw */
        height: 420px;
        /* Reducido de 550px para caber en viewport */
    }

    .card-overlay h3 {
        font-size: 2rem;
        /* Reducido de 2.5rem */
    }

    .card-description {
        font-size: 0.9rem;
        /* Reducido de 1rem */
    }

    .apple-pagination {
        margin-top: 15px;
        padding: 10px 0;
    }

    .program-card {
        width: 75vw;
        height: 420px;
    }

    .editorial-title .font-serif,
    .editorial-title .font-sans {
        font-size: 1.4rem;
        /* Reducido de 1.7rem para mobile - mejor ajuste */
    }

    .card-tag {
        font-size: 0.65rem;
        /* Reducido para mobile */
    }

    .card-benefit {
        font-size: 0.85rem;
        /* Reducido de 0.95rem */
    }

    /* Mobile: Larger text and lower positioning for all program cards */
    .program-card .card-overlay {
        top: 65%;
        /* Position below center (was 50%) */
    }

    .program-card .editorial-title .font-serif,
    .program-card .editorial-title .font-sans {
        font-size: 2rem !important;
        /* Larger text for mobile - increased from 1.4rem */
    }

    /* Slightly smaller font for Talleres card to prevent overflow */
    .program-card .editorial-title.style-talleres .font-serif,
    .program-card .editorial-title.style-talleres .font-sans {
        font-size: 1.7rem !important;
    }
}