/* =======================================================
   🎨 PARTE 1: CONFIGURACIÓN RAÍZ, BASE Y ANIMACIONES
======================================================= */

/* Estilos Relajantes Base */
:root {
    --fondo-noche: #0a0e14;
    --azul-relajante: #1e3a5f;
    --dorado-suave: #d4af37;
    --blanco-tenue: #e0e0e0;
}

body {
    background-color: var(--fondo-noche);
    color: var(--blanco-tenue);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch; 
    justify-content: space-between;  
    min-height: 100vh;          
    overflow-y: auto;            
    overflow-x: hidden;          
    text-align: center;
}

/* 🛠️ Añade o asegura esta regla para tu footer */
footer {
    width: 100%;
    padding: 20px 0;
    margin-top: auto; /* Empuje final de seguridad hacia abajo */
    background-color: rgba(0, 0, 0, 0.2); /* Un toque sutil para diferenciarlo del fondo */
}

header h1 {
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0;
}

header span {
    color: var(--dorado-suave);
    font-weight: bold;
}

/* Animación del Círculo de Respiración */
.breath-circle {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--azul-relajante), transparent);
    border-radius: 50%;
    margin: 40px auto;
    box-shadow: 0 0 20px var(--azul-relajante);
    animation: breathe 8s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* =======================================================
   🎮 PARTE 2: CONTROLES DE AUDIO, NAVBAR Y DROPDOWNS
======================================================= */

.controls {
    width: 80%;
    max-width: 400px;
}

.audio-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

button.audio-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--azul-relajante);
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

button.audio-btn:hover, button.audio-btn.active {
    background: var(--azul-relajante);
}

.timer-section {
    margin: 20px 0;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
}

.play-footer {
    margin-top: 20px;
}

#start-btn {
    background-color: var(--dorado-suave);
    color: black;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ==============================
    🧭 NAVBAR
================================ */
.navbar {
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%; 
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--blanco-tenue); 
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--dorado-suave); 
}

/* ==============================
    📂 DROPDOWN
================================ */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 120%;
    left: 0;
    background: #0b0b0b;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    display: none;
}

.dropdown-content li a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* =======================================================
   📖 PARTE 3: OPTIMIZACIÓN DEL SUEÑO Y FOOTER RESPONSIVO
======================================================= */

.header-banner {
    background-color: #1a2b4c;
    color: #ffffff;
    margin: 25px auto;
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    width: 90%;
    max-width: 800px; 
}

.subtitle {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin: 0;
}

h2 {
    font-size: 1.4rem;
    color: var(--dorado-suave);
    border-left: 4px solid var(--azul-relajante);
    padding-left: 10px;
    margin-top: 35px;
    margin-bottom: 12px;
    text-align: left;
}

h3 {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-top: 22px;
    margin-bottom: 8px;
    text-align: left;
}

p {
    margin: 0 0 12px 0;
    text-align: justify;
    line-height: 1.6; 
}

ul, ol {
    margin: 0 0 15px 0;
    padding-left: 20px;
    text-align: left;
}

li {
    margin-bottom: 6px;
}

.strong-term {
    color: var(--dorado-suave);
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 20px 0;
    font-size: 0.95rem;
    color: var(--blanco-tenue);
}

th {
    background-color: var(--azul-relajante);
    color: #ffffff;
    font-weight: bold;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

td {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(255,255,255,0.02);
    vertical-align: top;
    text-align: left;
}

tr:nth-child(even) td {
    background-color: rgba(255,255,255,0.05);
}

.callout-box {
    background-color: rgba(30, 58, 95, 0.3);
    border-left: 4px solid var(--azul-relajante);
    padding: 12px 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    text-align: left;
}

.callout-box p {
    margin: 0;
    color: #cbd5e1;
}

.food-grid {
    margin-top: 10px;
    text-align: left;
}

.food-item {
    background-color: rgba(255,255,255,0.02);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.food-title {
    font-weight: bold;
    color: var(--dorado-suave);
    margin-bottom: 6px;
}

.math {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-weight: bold;
    color: var(--dorado-suave);
}

.source-tag {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

/* ==========================================
    FOOTER (Verde Bosque / Relajante)
========================================== */
.footer{

    background: linear-gradient(
        180deg,
        #111111 0%,
        #0c0c0c 50%,
        #050505 100%
    );

    color:#ffffff;

    border-top:2px solid rgba(212,175,55,.35);

}

.footer-container {
    width: min(1200px, 92%); 
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 50px;
    padding: 40px 0;
}

.footer-col h3 {
    color: #86efac; 
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: 600;
    margin-top: 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #cbd5e1; 
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #ffffff;
    padding-left: 6px; 
}

.footer-col p {
    color: #cbd5e1;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-col p i {
    color: #86efac; 
    font-size: 1.1rem;
    width: 20px; 
    text-align: center;
}

.footer-bottom {
    max-width: 1200px;
    margin: 50px auto 0 auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0 0 6px 0;
    font-size: 0.95rem;
}

.footer-bottom small {
    color: #64748b;
    font-size: 0.85rem;
}

/* ==========================================
    MEDIA QUERIES (Ajustes Responsivos)
========================================== */
@media (max-width: 850px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr); 
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 35px;
    }

    .footer-col p {
        justify-content: center; 
    }

    .footer-col ul li a:hover {
        padding-left: 0; 
    }
}