/* ==========================================================================
   1. VARIABLES DE DISEÑO: IDENTIDAD ALAS BLANCAS
   ========================================================================== */

:root {
    /* Paleta de Colores: Pastel Oscuro y Descanso Visual en Móvil */
    --bg-principal: #191521;       /* Berenjena místico profundo para el fondo */
    --bg-superficie: #231931;      /* Tono para menús, tarjetas y módulos */
    --borde-sutil: rgba(255, 255, 255, 0.05); /* Líneas finas divisorias */
    
    /* Acentos de Luz Angelical */
    --acento-oro: #dfb76c;         /* Dorado celestial para guiar el clic del usuario */
    --texto-primario: #f4f0fa;     /* Blanco suave con matiz lavanda */
    --texto-secundario: #aaa0ba;   /* Gris pastel apagado para párrafos largos */
}

/* ==========================================================================
   2. CONFIGURACIÓN GENERAL Y RESET MOBILE-FIRST
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Elimina el molesto recuadro azul al tocar elementos en Android e iOS */
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-principal);
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--texto-primario);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* 95px arriba garantiza que el menú flotante superior no tape el contenido */
    padding: 95px 14px 40px 14px; 
}

/* Contenedor que emula el ancho de un smartphone */
.app-mobile-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Separación perfecta entre tarjetas */
}

/* ==========================================================================
   3. EFECTOS DE ILUMINACIÓN EN MOVIMIENTO (GLOBAL EN TÍTULOS)
   ========================================================================== */

/* Títulos Aurorales Globales: El degradado de luz fluye automáticamente en h1, h2 y h3 */
h1, h2, h3 {
    font-family: Georgia, serif;
    background: linear-gradient(
        120deg, 
        #ffffff 0%, 
        #dfb76c 25%, 
        #ffffff 50%, 
        #bca2e1 75%, 
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brilloCelestial 7s linear infinite;
    text-shadow: 0 0 25px rgba(223, 183, 108, 0.15);
    letter-spacing: 0.5px;
}

h1 {
    font-size: 1.85rem;
    margin-bottom: 12px;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

@keyframes brilloCelestial {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Halo de luz mística en el fondo de la pantalla */
.halo-angelical {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(223, 183, 108, 0.07) 0%, rgba(25, 21, 33, 0) 75%);
    border-radius: 50%;
    z-index: 1;
    animation: expansionLuz 6s infinite ease-in-out;
    pointer-events: none;
}

@keyframes expansionLuz {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-50%) scale(1.15);
        opacity: 0.4;
    }
}

/* Pequeñas estrellas con parpadeo asíncrono */
.estrella-guia {
    color: var(--acento-oro);
    display: inline-block;
    font-size: 1rem;
    margin: 0 4px;
    animation: parpadeoMistico 3s infinite ease-in-out;
}

.estrella-guia.retraso {
    animation-delay: 1.5s;
}

@keyframes parpadeoMistico {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(0.8); 
        text-shadow: none; 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.1); 
        text-shadow: 0 0 8px var(--acento-oro); 
    }
}

/* ==========================================================================
   4. MENÚ SUPERIOR FLOTANTE TÁCTIL (5 ITEMS)
   ========================================================================== */

.mobile-navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px); /* Aprovechamos más los bordes de la pantalla */
    max-width: 430px;
    background-color: #1b102b;
    border: 1px solid var(--borde-sutil);
    backdrop-filter: blur(12px);
    padding: 8px 2px; /* Reducimos acolchado superior/inferior */
    border-radius: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--texto-secundario);
    text-decoration: none;
    font-size: 0.52rem; /* Tamaño óptimo para que 6 palabras quepan sin romperse */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1px; /* Espaciado de letras milimétrico */
    flex: 1;
    text-align: center;
    transition: all 0.23s ease;
}

.mobile-nav-link span {
    font-size: 1.1rem; /* Emojis sutilmente más compactos */
    margin-bottom: 1px;
    transition: all 0.23s ease;
}

.mobile-nav-link:hover, 
.mobile-nav-link.active {
    color: var(--acento-oro);
}

.mobile-nav-link:hover span, 
.mobile-nav-link.active span {
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(223, 183, 108, 0.5);
}

/* ==========================================================================
   5. SECCIONES Y MÓDULOS DE CONTENIDO (ESTILO CARTA DE TAROT)
   ========================================================================== */

.seccion-tarjeta {
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-sutil);
    border-radius: 0; /* Estrictamente cuadrado */
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Reacción vibrante cuando el usuario interactúa o mantiene presionado el módulo */
.seccion-tarjeta:active,
.seccion-tarjeta:hover {
    border-color: rgba(223, 183, 108, 0.2);
    box-shadow: 0 12px 35px rgba(223, 183, 108, 0.08), 0 0 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.seccion-tarjeta p {
    font-size: 0.92rem;
    color: var(--texto-secundario);
    font-weight: 300;
    margin-bottom: 20px;
}

/* Listas optimizadas para leer y pulsar cómodamente en móviles */
.lista-mistica {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.item-mistico {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--borde-sutil);
    border-left: 3px solid var(--acento-oro);
    padding: 12px 14px;
    font-size: 0.88rem;
    color: var(--texto-primario);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   6. BOTONES CON DESTELLO DE ALTA CONVERSIÓN (CTAs)
   ========================================================================== */

.btn-cuadrado-mistico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: 1px solid var(--acento-oro);
    color: var(--acento-oro);
    text-decoration: none;
    border-radius: 0; /* Estrictamente cuadrado */
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn-cuadrado-mistico:active {
    transform: scale(0.98);
    background: rgba(223, 183, 108, 0.05);
}

/* Barrido de luz veloz sobre el botón que incentiva el clic sin saturar la vista */
.btn-cuadrado-mistico::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255, 255, 255, 0.22) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(25deg);
    animation: destelloAngelical 4.5s infinite ease-in-out;
}

@keyframes destelloAngelical {
    0% { left: -65%; }
    15% { left: 135%; }
    100% { left: 135%; }
}

/* ==========================================================================
   7. GRILLA DE NAVEGACIÓN INFERIOR (TABLA DE CONTENIDO EN MALLA)
   ========================================================================== */

.grilla-navegacion {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas uniformes en mobile */
    gap: 8px;
    margin-top: 5px;
}

.grilla-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--borde-sutil);
    border-radius: 0; /* Cuadrado */
    padding: 14px 6px;
    color: var(--texto-primario);
    text-decoration: none;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.grilla-item span {
    font-size: 1.2rem;
}

.grilla-item:hover, 
.grilla-item:active {
    border-color: var(--acento-oro);
    color: var(--acento-oro);
    background: rgba(223, 183, 108, 0.04);
}
