/* ==========================================================================
   1. VARIABLES Y RESET
   ========================================================================== */
:root {
    --primary-dark: #608052;   
    --accent-green: #7ca36b;     
    --soft-green: #b5c99a;       
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Poppins', sans-serif; background-color: var(--white); color: var(--text-main); line-height: 1.4; overflow-x: hidden; 

    /* AÑADE ESTO: */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Fuerza al body a medir el alto de la pantalla */
    margin: 0;
}

/* --- 2. HEADER & NAVEGACIÓN ESTILO APP (COPIA EXACTA) --- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100px;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.281)), 
                url('../img/descarga (6).jfif') center/cover no-repeat;
    padding: 0 8%;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    z-index: 10;
}

.logo img {
    height: 80px;
    filter: brightness(0) invert(1);
}

/* MENÚ DE ICONOS CON SEPARACIÓN DE 35PX */
.nav-links {
    display: flex;
    list-style: none;
    gap: 35px; /* Separación idéntica al original */
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-size: 1.0rem;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.95;
}

/* Botones de icono (Home, Talleres, Login, FAQ) */
.nav-icon-btn, .back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12); /* Fondo traslúcido */
    color: var(--white) !important;
    border-radius: 15px; /* Bordes estilo App */
    font-size: 1.6rem !important;
    transition: var(--transition);
    text-decoration: none;
    backdrop-filter: blur(8px); /* Efecto cristal */
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-icon-btn:hover, .back-arrow:hover {
    background: var(--primary);
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   3. CURSOS Y BANNERS (cursos.php)
   ========================================================================== */
.workshops-main { padding: 40px 8%; }
/* Esto hará que esta sección crezca y empuje al footer al fondo */
main, .workshops-main, .maintenance-container {
    flex: 1;
}
.section-title { text-align: center; margin-bottom: 30px; }
.section-title h2 { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--primary-dark); font-weight: 700; letter-spacing: -1px; }
.divider { width: 60px; height: 4px; background: var(--soft-green); margin: 15px auto; }

.special-program-banner {
    position: relative; padding: 70px 40px; border-radius: 40px;
    color: var(--white); text-align: center; overflow: hidden;
    transition: var(--transition); margin-bottom: 25px;
    display: flex; justify-content: center; align-items: center; background-size: cover;
}

/* ==========================================================================
   4. PÁGINA TEMPORAL Y JUEGO (CENTRALIZADO)
   ========================================================================== */
.maintenance-container { padding: 40px 8%; text-align: center; display: flex; flex-direction: column; align-items: center; }

.maintenance-icon { font-size: 6rem; color: var(--primary-dark); margin-bottom: 10px; display: inline-block; }

.game-wrapper {
    width: 100%;
    max-width: 600px; /* Ancho fijo para centrado perfecto */
    margin: 20px auto; 
    display: flex;
    flex-direction: column;
}

.game-header { width: 100%; display: flex; justify-content: flex-end; margin-bottom: 10px; }

.score-container {
    font-weight: 700; font-size: 1.1rem; color: var(--primary-dark);
    background: var(--soft-green); padding: 5px 18px; border-radius: 20px;
}

#game-container {
    width: 100%; height: 200px; background-color: #f9fbf7;
    border-bottom: 4px solid var(--primary-dark); border-radius: 15px;
    overflow: hidden; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

#gameCanvas { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   5. BOTONES PREMIUM
   ========================================================================== */
.btn-primary {
    display: inline-block; background: var(--white); color: var(--primary-dark);
    padding: 14px 45px; border-radius: 50px; text-decoration: none;
    font-weight: 700; font-size: 0.9rem; text-transform: uppercase;
    transition: var(--transition); border: 2px solid var(--white);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.btn-primary:hover { background: transparent; color: var(--white); transform: scale(1.05); }

.btn-back { background: var(--primary-dark); color: white; border-color: var(--primary-dark); margin-top: 20px; }
.btn-back:hover { color: var(--primary-dark); background: transparent; }

.site-footer {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.281)), 
                url('../img/descarga (6).jfif') center/cover no-repeat;
    color: var(--white);
    padding: 70px 8% 30px;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo img {
    height: 80px;
    filter: brightness(0) invert(1);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1.8rem;
    transition: 0.3s;
}


/* ==========================================================================
   6. RESPONSIVO
   ========================================================================== */

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 20px; }
    /* Se mantiene el gap de 35px para la separación de iconos en móvil */
    .nav-links { gap: 35px; flex-wrap: wrap; justify-content: center; }
    .nav-icon-btn, .back-arrow { width: 42px; height: 42px; font-size: 1.4rem !important; }
    .footer-container { flex-direction: column; text-align: center; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-actions { flex-direction: column; align-items: flex-start; }
}