/* ==========================================================================
   RESPIRA MEJOR - SISTEMA DE DISEÑO VISUAL (LIGHT & DARK MODE)
   Concepto: Respiración, calma, ciencia, profundidad, aire y claridad mental
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- 1. TOKENS VISUALES SEMÁNTICOS --- */
:root {
    --page-bg: #f5f8fc;
    --page-bg-subtle: #ebf2f8;
    --surface: #ffffff;
    --surface-soft: #f0f5fa;
    --surface-elevated: rgba(255, 255, 255, 0.88);
    --surface-card: #ffffff;
    
    --text-primary: #0e1e2e;
    --text-secondary: #4f6378;
    --text-muted: #7d8f9f;
    --text-inverse: #ffffff;
    
    --border: rgba(14, 30, 46, 0.08);
    --border-subtle: rgba(14, 30, 46, 0.04);
    --border-hover: rgba(30, 110, 220, 0.25);
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.2);
    
    --secondary: #0d9488;
    --secondary-hover: #0f766e;
    --secondary-light: #f0fdfa;
    
    --accent: #7c3aed;
    --accent-light: #f5f3ff;
    
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    
    --shadow-sm: 0 2px 8px rgba(14, 30, 46, 0.04);
    --shadow-md: 0 8px 24px rgba(14, 30, 46, 0.06);
    --shadow-lg: 0 16px 40px rgba(14, 30, 46, 0.08);
    --shadow-floating: 0 24px 60px rgba(14, 30, 46, 0.12);
    
    --header-bg: rgba(255, 255, 255, 0.82);
    --header-border: rgba(14, 30, 46, 0.07);
    --player-bg: rgba(255, 255, 255, 0.94);
    --pill-bg: #e9f0f7;
    --pill-text: #415569;
}

.dark {
    --page-bg: #07111c;
    --page-bg-subtle: #0a1827;
    --surface: #0e1e2f;
    --surface-soft: #122438;
    --surface-elevated: rgba(14, 30, 47, 0.9);
    --surface-card: #0f2033;
    
    --text-primary: #f1f6fa;
    --text-secondary: #9cb1c5;
    --text-muted: #647d94;
    --text-inverse: #07111c;
    
    --border: rgba(180, 210, 240, 0.1);
    --border-subtle: rgba(180, 210, 240, 0.05);
    --border-hover: rgba(96, 165, 250, 0.35);
    
    --primary: #4d8df5;
    --primary-hover: #6ea4f9;
    --primary-light: rgba(77, 141, 245, 0.15);
    --primary-glow: rgba(77, 141, 245, 0.25);
    
    --secondary: #2dd4bf;
    --secondary-hover: #5eead4;
    --secondary-light: rgba(45, 212, 191, 0.12);
    
    --accent: #a78bfa;
    --accent-light: rgba(167, 139, 250, 0.15);
    
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-floating: 0 24px 60px rgba(0, 0, 0, 0.6);
    
    --header-bg: rgba(9, 21, 35, 0.85);
    --header-border: rgba(180, 210, 240, 0.08);
    --player-bg: rgba(11, 24, 40, 0.95);
    --pill-bg: #13273c;
    --pill-text: #a8bfd3;
}

/* --- 2. BASE & TIPOGRAFÍA --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--page-bg);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Fondo de luz ambiental sutil */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.08) 0%, rgba(13, 148, 136, 0.04) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.dark body::before {
    background: radial-gradient(circle at center, rgba(77, 141, 245, 0.12) 0%, rgba(45, 212, 191, 0.05) 50%, transparent 75%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

/* --- 3. ANIMACIONES Y EFECTO RESPIRACIÓN --- */
@keyframes breatheCycle {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.35);
    }
    40%, 60% {
        transform: scale(1.12);
        box-shadow: 0 0 50px rgba(37, 99, 235, 0.65), 0 0 80px rgba(13, 148, 136, 0.35);
    }
}

@keyframes calmFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes slowAtmospherePulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes subtleFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-breathe {
    animation: breatheCycle 5s ease-in-out infinite;
}

.animate-float-calm {
    animation: calmFloat 4s ease-in-out infinite;
}

.animate-fade-in {
    animation: subtleFadeIn 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- 4. HEADER FLOTANTE & NAVEGACIÓN --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}

.site-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 60%, #0d9488 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    font-size: 1.15rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.site-brand:hover .site-brand-mark {
    transform: scale(1.05);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.site-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.site-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.site-brand-tag {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.site-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 40px;
    padding: 0 1.1rem;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--surface-soft);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    background: var(--primary);
    border-radius: 999px;
}

.site-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.header-icon-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.account-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 1.25rem;
    border-radius: 999px;
    border: 0;
    background: var(--text-primary);
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.account-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    opacity: 0.92;
}

.account-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 40px;
    padding: 0 0.85rem 0 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-user-chip:hover {
    border-color: var(--border-hover);
    background: var(--surface);
}

.account-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.site-mobile-toggle {
    display: inline-flex;
}

.site-mobile-menu {
    display: none;
    border-top: 1px solid var(--header-border);
    background: var(--header-bg);
    backdrop-filter: blur(25px);
    padding: 1rem 1.5rem 1.5rem;
}

.site-mobile-menu.is-open {
    display: block;
}

.site-mobile-nav {
    display: grid;
    gap: 0.35rem;
}

.site-mobile-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.site-mobile-link:hover,
.site-mobile-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.site-mobile-auth {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 1080px) {
    .site-nav { display: flex; }
    .site-mobile-toggle { display: none; }
    .site-mobile-menu,
    .site-mobile-menu.is-open { display: none !important; }
}

/* --- 5. COMPONENTES VISUALES: CARDS, BOTONES & PILLS --- */
.card-wellness {
    background-color: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.card-wellness:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-wellness-interactive {
    cursor: pointer;
}

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

/* Iconos de tarjetas con halo suave */
.icon-halo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.card-wellness:hover .icon-halo {
    transform: scale(1.08);
}

.icon-halo--teal {
    background: var(--secondary-light);
    color: var(--secondary);
}

.icon-halo--purple {
    background: var(--accent-light);
    color: var(--accent);
}

/* Botones principales de la plataforma */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--primary-glow);
    transition: all 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--primary-glow);
    opacity: 0.96;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--surface-soft);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Filtros y pills unificados */
.filter-btn, .audio-filter-btn, .learn-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover, .audio-filter-btn:hover, .learn-nav-btn:hover {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.filter-btn.active, .audio-filter-btn.active, .learn-nav-btn.active {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* --- 6. CÍRCULO DE RESPIRACIÓN HERO --- */
.breathing-circle-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle-aura {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(13, 148, 136, 0.15) 50%, transparent 70%);
    animation: slowAtmospherePulse 6s ease-in-out infinite;
    pointer-events: none;
}

.breathing-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #60a5fa 0%, #2563eb 50%, #0f172a 100%);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    z-index: 10;
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .breathing-circle {
    background: radial-gradient(circle at 35% 30%, #93c5fd 0%, #3b82f6 45%, #071321 100%);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.45);
}

.breathing-circle:hover {
    transform: scale(1.04);
}

.breathing-circle.active {
    animation: breatheCycle 5s ease-in-out infinite;
}

/* --- 7. CORRECCIÓN INTEGRAL DE CONTENEDORES Y FONDOS --- */
/* Sección educativa & Aprender */
.learn-container {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
}

.quote-highlight-box {
    background-color: var(--surface-soft);
    border-left: 4px solid var(--primary);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.badge-benefit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

/* ==========================================================================
   SECCIÓN AUDIOS & SABIDURÍA DE LOS MAESTROS (REFINAMIENTO PROFESIONAL)
   ========================================================================== */

/* Contenedor general de Audios con ancho uniforme y ritmo visual */
.audio-content-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    position: relative;
}

@media (min-width: 768px) {
    .audio-content-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Transición elegante entre Audios Guiados y Sabiduría de los Maestros */
.wisdom-section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.wisdom-section-divider::before,
.wisdom-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.wisdom-chapter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: #d97706;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dark .wisdom-chapter-badge {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
}

/* Flujo vertical secuencial para las Lecciones de Sabiduría (sin solapamiento) */
.wisdom-lessons-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    margin-top: 2rem;
    position: relative;
}

/* Tarjeta principal de lección (article full-width) */
.wisdom-lesson-card {
    position: relative;
    width: 100%;
    min-width: 0;
    height: auto;
    background-color: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 1.75rem;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.22s ease;
    overflow: hidden;
}

@media (min-width: 768px) {
    .wisdom-lesson-card {
        padding: 2.5rem 2.25rem;
        border-radius: 2rem;
    }
}

/* Hover de elevación seguro (translateY sin scale) estrictamente para punteros finos */
@media (hover: hover) and (pointer: fine) {
    .wisdom-lesson-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        border-color: var(--border-hover);
    }
    
    .wisdom-subcard-interactive:hover {
        transform: translateY(-2px);
        border-color: var(--border-hover);
    }
}

/* Acento suave superior en la tarjeta */
.wisdom-lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: linear-gradient(90deg, #d97706, #3b82f6);
    border-radius: 0 0 4px 4px;
    opacity: 0.7;
}

/* Cabecera de Lección */
.wisdom-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wisdom-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    color: #d97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.dark .wisdom-icon-box {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
}

.wisdom-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .wisdom-title {
        font-size: 1.7rem;
    }
}

.wisdom-author-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.wisdom-author-tag span {
    color: #d97706;
    font-weight: 700;
}

.dark .wisdom-author-tag span {
    color: #fbbf24;
}

/* Cita destacada con tinte muy suave */
.wisdom-quote-box {
    background: var(--surface-soft);
    border-left: 4px solid #d97706;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.dark .wisdom-quote-box {
    background: rgba(251, 191, 36, 0.05);
    border-left-color: #fbbf24;
}

.wisdom-quote-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
}

.wisdom-quote-subtext {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Grid de desarrollo interno (2 columnas robustas en desktop con minmax(0,1fr)) */
.wisdom-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.75rem;
    width: 100%;
}

@media (min-width: 900px) {
    .wisdom-grid-2col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

/* Bloques y subtarjetas internas más ligeras (sin excesivo nesting) */
.wisdom-subcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    padding: 1.25rem;
    height: auto;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.dark .wisdom-subcard {
    background: var(--surface-soft);
    border-color: var(--border);
}

.wisdom-subcard-tint {
    background: var(--surface-soft);
    border-radius: 1.15rem;
    padding: 1.25rem;
    height: auto;
}

.wisdom-highlight-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(217, 119, 6, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    padding: 1.25rem;
    margin-bottom: 1.75rem;
}

.dark .wisdom-highlight-banner {
    background: linear-gradient(135deg, rgba(77, 141, 245, 0.12) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-color: rgba(251, 191, 36, 0.15);
}

/* Práctica guiada con numeración limpia */
.wisdom-practice-box {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.wisdom-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.wisdom-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.wisdom-step-num {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #d97706;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.dark .wisdom-step-num {
    background: #fbbf24;
    color: #07111c;
}

/* Footer de acciones alineado a la derecha con suficiente espacio */
.wisdom-card-footer {
    display: flex;
    flex-direction: column;
    sm-flex-direction: row;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

@media (min-width: 640px) {
    .wisdom-card-footer {
        flex-direction: row;
        align-items: center;
    }
}

.btn-wisdom-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
    transition: all 0.2s ease;
}

.dark .btn-wisdom-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #07111c !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

@media (hover: hover) and (pointer: fine) {
    .btn-wisdom-primary:hover {
        transform: translateY(-2px) scale(1.015);
        box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
        opacity: 0.96;
    }
}

.btn-wisdom-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--surface-soft);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .btn-wisdom-secondary:hover {
        background: var(--surface);
        border-color: var(--border-hover);
        transform: translateY(-2px) scale(1.015);
    }
}

/* Cuestionario y Plan Personal */
.assessment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.assessment-option {
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.assessment-option:hover {
    border-color: var(--primary);
    background: var(--surface-soft);
}

.assessment-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

/* Modal y Reproductor */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(7, 17, 28, 0.65);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.75rem;
    max-width: 600px;
    width: 100%;
    padding: 2.25rem;
    box-shadow: var(--shadow-floating);
    max-height: 90vh;
    overflow-y: auto;
}

#main-audio-player {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 2rem));
    background: var(--player-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.25rem 1.75rem;
    box-shadow: var(--shadow-floating);
    z-index: 70;
    transition: all 0.3s ease;
}

/* Slider de respiración y controles */
.slider-wellness {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--pill-bg);
    outline: none;
}

.slider-wellness::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--primary-glow);
    transition: transform 0.2s ease;
}

.slider-wellness::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Modales de Auth */
.account-modal-panel {
    position: relative;
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.75rem;
    padding: 2rem 1.75rem 1.5rem;
    box-shadow: var(--shadow-floating);
}

.account-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.account-modal-close:hover {
    background: var(--pill-bg);
    color: var(--text-primary);
}

.account-provider-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 48px;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-provider-btn:hover {
    background: var(--surface-soft);
    border-color: var(--border-hover);
}

.account-provider-btn--email {
    margin-top: 0.75rem;
    background: var(--text-primary);
    color: var(--text-inverse);
    border-color: var(--text-primary);
}

.account-provider-btn--email:hover {
    opacity: 0.92;
}

.account-email-form input {
    width: 100%;
    height: 46px;
    border-radius: 0.9rem;
    border: 1px solid var(--border);
    padding: 0 1rem;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text-primary);
}

.account-email-form input:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

/* Aviso de persistencia local (Fase 1 - R6) */
.account-local-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.25rem 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.account-local-notice.hidden {
    display: none;
}

.account-local-notice i {
    margin-top: 0.15rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Footer limpio y armonioso */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    padding: 4rem 1.5rem 2.5rem;
}

/* Utilitarios para Dark/Light consistentes */
.text-wellness-primary { color: var(--text-primary); }
.text-wellness-secondary { color: var(--text-secondary); }
.text-wellness-muted { color: var(--text-muted); }
.bg-wellness-surface { background-color: var(--surface); }
.bg-wellness-soft { background-color: var(--surface-soft); }
.border-wellness { border-color: var(--border); }

/* --- ACCESIBILIDAD Y FOCUS VISIBLE --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--primary);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    z-index: 9999;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--accent);
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [role="slider"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- REPRODUCTOR DE AUDIO SKELETON Y TRANSICIONES --- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.audio-skeleton {
    background: linear-gradient(90deg, rgba(200,220,240,0.1) 25%, rgba(200,220,240,0.25) 50%, rgba(200,220,240,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* --- PREFERS-REDUCED-MOTION --- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   MODO PRÁCTICA INMERSIVO - ESTILOS Y ANIMACIONES DEL MARCAPASOS
   ========================================================================== */

.immersive-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--page-bg);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.immersive-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 2rem;
    position: relative;
}

@media (min-width: 640px) {
    .immersive-container {
        padding: 2rem 2.5rem;
    }
}

/* Header inmersivo */
.immersive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.immersive-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.immersive-back-btn:hover {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateX(-2px);
}

.immersive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border);
}

/* Visualizador Circular Central */
.immersive-visualizer-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .immersive-visualizer-wrapper {
        width: 320px;
        height: 320px;
        margin: 2rem auto;
    }
}

/* Halo respiratorio difuso */
.immersive-halo {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(13, 148, 136, 0.12) 50%, transparent 75%);
    pointer-events: none;
    transition: transform 0.15s ease-out, opacity 0.3s ease;
    will-change: transform, opacity;
}

.dark .immersive-halo {
    background: radial-gradient(circle, rgba(77, 141, 245, 0.35) 0%, rgba(45, 212, 191, 0.18) 50%, transparent 75%);
}

/* SVG con anillo de progreso */
.immersive-svg-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.immersive-ring-bg {
    stroke: var(--border);
    stroke-width: 6;
    fill: transparent;
}

.immersive-ring-progress {
    stroke-width: 6;
    stroke-linecap: round;
    fill: transparent;
    stroke: var(--primary);
    transition: stroke-dashoffset 0.05s linear, stroke 0.4s ease;
}

.immersive-ring-progress.phase-inhale {
    stroke: var(--primary);
}

.immersive-ring-progress.phase-hold {
    stroke: var(--accent);
}

.immersive-ring-progress.phase-exhale {
    stroke: var(--secondary);
}

.immersive-ring-progress.phase-pause {
    stroke: var(--text-muted);
}

/* Círculo central orgánico */
.immersive-core-circle {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform;
}

@media (min-width: 640px) {
    .immersive-core-circle {
        width: 220px;
        height: 220px;
    }
}

.dark .immersive-core-circle {
    background: linear-gradient(135deg, #122438 0%, #0a1827 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(77, 141, 245, 0.25);
}

.immersive-phase-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.15rem;
    transition: color 0.3s ease;
}

.immersive-phase-title.phase-inhale { color: var(--primary); }
.immersive-phase-title.phase-hold { color: var(--accent); }
.immersive-phase-title.phase-exhale { color: var(--secondary); }
.immersive-phase-title.phase-pause { color: var(--text-muted); }

.immersive-countdown-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

@media (min-width: 640px) {
    .immersive-countdown-number {
        font-size: 4.2rem;
    }
}

.immersive-phase-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

/* Próxima fase preview */
.immersive-next-phase {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.5rem auto 1rem;
}

.immersive-next-phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

/* Barra de progreso de sesión general */
.immersive-session-bar-wrap {
    width: 100%;
    margin-bottom: 1.5rem;
}

.immersive-session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.immersive-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.immersive-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    transition: width 0.3s ease-out;
}

/* Selector de Duración Pre-inicio */
.immersive-duration-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.immersive-duration-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.immersive-duration-pill:hover {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.immersive-duration-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.dark .immersive-duration-pill.active {
    background: var(--primary);
    color: #07111c;
}

/* Botonera de control principal */
.immersive-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.immersive-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0 2rem;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: all 0.25s ease;
    flex: 1;
    max-width: 240px;
}

.immersive-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.immersive-btn-primary:active {
    transform: translateY(0);
}

.immersive-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.immersive-btn-secondary:hover {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Barra de toggles accesorias (Sonido, Vibración, WakeLock) */
.immersive-options-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.immersive-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface-soft);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.immersive-toggle-btn.active {
    background: var(--secondary-light);
    color: var(--secondary);
    border-color: var(--secondary);
}

.immersive-toggle-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.immersive-toggle-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Indicación de seguridad */
.immersive-safety-note {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
}

/* Pantalla de Finalización */
.immersive-completion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.75rem;
    padding: 2.25rem 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-floating);
    max-width: 480px;
    margin: 1.5rem auto;
    animation: subtleFadeIn 0.35s ease-out;
}

.immersive-completion-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
}

.immersive-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.immersive-stat-box {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.85rem;
    text-align: center;
}

.immersive-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.immersive-stat-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

/* Diálogo de Confirmación de Salida */
.immersive-confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(7, 17, 28, 0.65);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.immersive-confirm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-floating);
    text-align: center;
    animation: subtleFadeIn 0.2s ease-out;
}

/* Modo Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .immersive-halo {
        display: none !important;
    }
    .immersive-core-circle {
        transform: scale(1) !important;
        transition: none !important;
    }
    .immersive-ring-progress {
        transition: none !important;
    }
}
