/* ─────────────────────────────────────────────────────────────────
   game-style.css — SustainAbility Challenge Microsite
   SOPRA STERIA
   Estilos específicos adaptados al concepto visual y demo light-theme
   ───────────────────────────────────────────────────────────────── */

@import url('../../fonts.css');

/* ── TOKENS DE DISEÑO ────────────────────────────────────────── */
:root {
    --game-bg: #f9fbfb;
    --game-white: #ffffff;
    --game-dark: #0f172a;
    --game-text: #334155;
    --game-gray: #475569;
    --game-border: #e2e8f0;
    
    /* Sopra Steria Eco Green */
    --game-accent: #007e4a;
    --game-accent-rgb: 0, 126, 74;
    --game-accent-hover: #00663c;
    --game-accent-light: rgba(0, 126, 74, 0.05);
    
    /* ESG Indicator Colors */
    --color-e: #3f7e44;
    --color-s: #a21942;
    --color-g: #19486a;
    
    --f-trans: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-brand: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-concrete: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 126, 74, 0.08);
}

/* ── RESET / BASE ────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--game-bg);
    color: var(--game-text);
    font-family: var(--font-brand);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow-x: hidden;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.game-header {
    width: 100%;
    height: 90px;
    padding: 0 8vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--game-white);
    border-bottom: 1px solid var(--game-border);
    position: relative;
    z-index: 10;
}

.header-logo img {
    height: 38px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo img:hover {
    transform: scale(1.02);
}

/* Menú de navegación simulado */
.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-nav-link {
    font-family: var(--font-concrete);
    font-size: 16px;
    font-weight: 500;
    color: var(--game-text);
    text-decoration: none;
    transition: color 0.3s;
}

.header-nav-link:hover {
    color: var(--game-accent);
}

.header-nav-link.active {
    color: var(--game-accent);
    font-weight: bold;
    border-bottom: 2px solid var(--game-accent);
    padding-bottom: 2px;
}

/* ── LANG SWITCH ─────────────────────────────────────────────── */
.lang-switch {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 30px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--game-gray);
    font-family: var(--font-concrete);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 20px;
}

.lang-btn.active {
    color: var(--game-white);
    background: var(--game-accent);
}

.lang-btn:hover:not(.active) {
    color: var(--game-dark);
}

/* ── LANG HIDDEN RULES ───────────────────────────────────────── */
[data-lang="es"] .lang-en, [data-lang="es"] .lang-fr { display: none !important; }
[data-lang="en"] .lang-es, [data-lang="en"] .lang-fr { display: none !important; }
[data-lang="fr"] .lang-es, [data-lang="fr"] .lang-en { display: none !important; }

/* ── HERO AREA (MAIN CONTAINER) ──────────────────────────────── */
.game-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 8vw;
    position: relative;
    z-index: 5;
}

/* Dos columnas para el inicio */
.landing-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    align-items: center;
}

.landing-left {
    text-align: left;
}

.landing-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ilustración Premium del Eco-diseño */
.landing-illustration {
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--game-white);
    transition: transform 0.5s ease;
}

.landing-illustration:hover {
    transform: translateY(-4px) scale(1.01);
}

/* ── ESTILOS DEL TEXTO ────────────────────────────────────────── */
.game-kicker {
    font-family: var(--font-concrete);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--game-accent);
    margin-bottom: 16px;
    display: inline-block;
}

.game-title {
    font-family: var(--font-concrete);
    font-size: clamp(2.4rem, 5.4vw, 3.8rem);
    line-height: 1.15;
    font-weight: normal;
    letter-spacing: -0.02em;
    color: var(--game-dark);
    margin-bottom: 20px;
}

.title-glow {
    color: var(--game-accent);
}

.game-subtitle {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    line-height: 1.5;
    color: var(--game-dark);
    margin-bottom: 24px;
    font-weight: 500;
}

.game-description {
    font-size: clamp(1.1rem, 1.7vw, 1.3rem);
    line-height: 1.65;
    color: var(--game-gray);
    margin-bottom: 36px;
}

/* ── BOTONES ─────────────────────────────────────────────────── */
.btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-concrete);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.15rem;
    color: var(--game-white);
    background-color: var(--game-accent);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 126, 74, 0.25);
}

.btn-start:hover {
    background-color: var(--game-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 126, 74, 0.35);
}

.btn-start:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-concrete);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    color: var(--game-accent);
    background-color: transparent;
    border: 2px solid var(--game-accent);
    border-radius: 50px;
    padding: 16px 36px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--game-accent-light);
    transform: translateY(-2px);
}

/* ── FILA DE CARACTERÍSTICAS INFERIOR (MEDIMOS...) ────────────── */
.features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 48px auto 0 auto;
    border-top: 1px solid var(--game-border);
    padding-top: 48px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
}

.feature-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--game-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--game-accent);
}

.feature-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.feature-title {
    font-family: var(--font-concrete);
    font-size: 19px;
    font-weight: bold;
    color: var(--game-dark);
}

.feature-desc {
    font-size: 16px;
    color: var(--game-gray);
    line-height: 1.5;
}

/* ── CONTAINER DE PREGUNTAS (GLASS PANEL WHITE) ───────────────── */
.glass-panel {
    background: var(--game-white);
    border: 1px solid var(--game-border);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 720px;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* ── PUNTOS Y BARRA DE PROGRESO DE PREGUNTAS ──────────────────── */
.quiz-progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}

.progress-text {
    font-family: var(--font-concrete);
    font-size: 18px;
    color: var(--game-dark);
    font-weight: bold;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background-color: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--game-accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-exit {
    background: transparent;
    border: none;
    color: var(--game-gray);
    font-family: var(--font-concrete);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.btn-exit:hover {
    color: #ef4444;
}

.btn-exit svg {
    width: 14px;
    height: 14px;
}

/* Círculo del icono central en preguntas */
.scenario-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: var(--game-accent-light);
    border: 1px solid rgba(var(--game-accent-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 39px;
    margin: 0 auto 24px auto;
    color: var(--game-accent);
    box-shadow: 0 4px 12px rgba(0,126,74,0.05);
}

/* ── OPCIONES DE RESPUESTA MODERNA (RADIO CARDS) ──────────────── */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 28px 0 36px 0;
    text-align: left;
}

.option-card {
    background: var(--game-white);
    border: 1px solid var(--game-border);
    border-radius: 14px;
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--game-text);
    font-family: var(--font-brand);
    font-size: 20px;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    width: 100%;
}

.option-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.option-card.selected {
    border-color: var(--game-accent);
    background-color: var(--game-accent-light);
    color: var(--game-dark);
}

/* Radio Button Circular */
.option-radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.option-card:hover .option-radio-indicator {
    border-color: var(--game-accent);
}

.option-card.selected .option-radio-indicator {
    border-color: var(--game-accent);
    background-color: var(--game-white);
}

.option-radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--game-accent);
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-card.selected .option-radio-dot {
    transform: scale(1);
}

.option-text {
    flex: 1;
}

/* Navegación inferior (Anterior / Siguiente) */
.quiz-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 16px;
}

/* ── PANTALLA DE RESULTADOS / SCORE ── */
.results-header-text {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--game-gray);
    margin-bottom: 8px;
}

.results-level-highlight {
    font-family: var(--font-concrete);
    font-size: clamp(2.4rem, 4.8vw, 3.4rem);
    font-weight: bold;
    color: var(--game-accent);
    margin-bottom: 24px;
}

/* Sendero horizontal de progreso de nivel */
.results-nodes-trail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 520px;
    margin: 36px auto 44px auto;
    padding: 0 10px;
}

/* Línea de fondo del sendero */
.results-nodes-trail::before {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    top: 14px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.results-trail-fill {
    position: absolute;
    left: 20px;
    top: 14px;
    height: 3px;
    background-color: var(--game-accent);
    z-index: 2;
    transition: width 0.8s ease;
}

.results-trail-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 3;
}

.results-node-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--game-white);
    border: 3px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: var(--font-concrete);
    color: var(--game-gray);
    box-shadow: var(--shadow-sm);
    transition: all 0.5s ease;
}

.results-trail-node.active .results-node-dot {
    border-color: var(--game-accent);
    background-color: var(--game-accent);
    color: var(--game-white);
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(0, 126, 74, 0.4);
}

.results-trail-node.completed .results-node-dot {
    border-color: var(--game-accent);
    background-color: var(--game-accent-light);
    color: var(--game-accent);
}

.results-node-label {
    font-size: 13px;
    font-family: var(--font-concrete);
    color: var(--game-gray);
}

.results-trail-node.active .results-node-label {
    color: var(--game-accent);
    font-weight: bold;
}

/* Bloque Recomendado (Fichas del Servicio) */
.recommended-services-title {
    font-family: var(--font-concrete);
    font-size: 18px;
    color: var(--game-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-card-recommendation {
    background: var(--game-white);
    border: 1px solid var(--game-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.service-card-recommendation:hover {
    border-color: var(--game-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-rec-left {
    flex: 1;
}

.service-rec-tag {
    font-family: var(--font-concrete);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--game-accent);
    background: var(--game-accent-light);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.service-rec-title {
    font-family: var(--font-concrete);
    font-size: 19px;
    font-weight: bold;
    color: var(--game-dark);
    margin-bottom: 6px;
}

.service-rec-desc {
    font-size: 16px;
    color: var(--game-gray);
    line-height: 1.5;
}

.service-rec-chevron {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--game-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--game-accent);
    margin-left: 20px;
    transition: all 0.3s;
}

.service-card-recommendation:hover .service-rec-chevron {
    background-color: var(--game-accent);
    color: var(--game-white);
}

/* ── RESULTADOS GRID LAYOUT & SIDEBAR ── */
.results-grid-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.results-sidebar {
    background-color: #f8fafc;
    border: 1px solid var(--game-border);
    padding: 32px 28px;
    border-radius: 16px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 900px) {
    .results-grid-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ── CIERRE EMOCIONAL PRE-FOOTER (CALLOUT CARD EN RESULTADOS) ── */
.emotional-closing-panel {
    background: #f1f6f4;
    border: 1px solid rgba(0, 126, 74, 0.12);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    margin-top: 48px;
    width: 100%;
}

.emotional-closing-content {
    max-width: 680px;
    margin: 0 auto;
}

.emotional-copy {
    font-size: 17.5px;
    color: var(--game-text);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.game-footer {
    width: 100%;
    padding: 24px 8vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--game-gray);
    background: var(--game-white);
    border-top: 1px solid var(--game-border);
    position: relative;
    z-index: 10;
}

.footer-back {
    color: var(--game-dark);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    font-family: var(--font-concrete);
}

.footer-back svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.footer-back:hover {
    color: var(--game-accent);
}

.footer-back:hover svg {
    transform: translateX(-4px);
}

.footer-copy {
    text-align: right;
}

/* ── RESPONSIVO ADAPTATIONS ──────────────────────────────────── */
@media (max-width: 990px) {
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .landing-left {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .features-row {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 36px;
        padding-top: 36px;
    }
}

@media (max-width: 768px) {
    .game-header {
        height: 80px;
        padding: 0 6vw;
    }
    
    .header-nav {
        display: none; /* Oculta navegación de cabecera en móvil */
    }
    
    .game-main {
        padding: 32px 6vw;
    }
    
    .glass-panel {
        padding: 32px 20px;
        border-radius: 18px;
    }
    
    .results-nodes-trail::before,
    .results-trail-fill {
        display: none; /* Escondemos barra del sendero en móvil */
    }
    
    .results-nodes-trail {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
        margin-bottom: 28px;
    }
    
    .results-trail-node {
        flex-direction: row;
        gap: 6px;
    }
    
    .results-node-dot {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .game-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 20px 6vw;
    }
    
    .footer-copy {
        text-align: center;
    }
}

/* ── BACKGROUND IMAGE WATERMARK (HILO CONDUCTOR) ── */
.game-bg-image {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../assets/sustainability_road_vector.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
    opacity: 0.03;
}

/* ── SVG THEMED GRAPHICS ANIMATIONS ── */
.themed-graphic {
    animation: graphic-bob 4s ease-in-out infinite alternate;
}

@keyframes graphic-bob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* 1. Estrategia (Raíces / Suelo) */
.svg-estrategia .anim-root-down-1,
.svg-estrategia .anim-root-down-2,
.svg-estrategia .anim-root-down-3 {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: grow-roots 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.svg-estrategia .anim-root-down-1 { animation-delay: 0.2s; }
.svg-estrategia .anim-root-down-2 { animation-delay: 0.5s; }
.svg-estrategia .anim-root-down-3 { animation-delay: 0.7s; }

.svg-estrategia .anim-leaf {
    transform: scale(0);
    transform-origin: 50px 50px;
    animation: bloom-leaves 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 1.2s;
}

@keyframes grow-roots {
    to { stroke-dashoffset: 0; }
}
@keyframes bloom-leaves {
    to { transform: scale(1); }
}

/* 2. SustainTech (Naturaleza + Tech) */
.svg-sustaintech .anim-leaf-outline {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    animation: draw-path 2.5s ease-out forwards;
}
.svg-sustaintech .anim-circuit-line {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: draw-path 2s ease-out forwards;
    animation-delay: 0.8s;
}
.svg-sustaintech .anim-circuit-dot {
    transform: scale(0);
    transform-origin: center;
    animation: pop-dot 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.svg-sustaintech .anim-circuit-dot-1 { animation-delay: 1.5s; }
.svg-sustaintech .anim-circuit-dot-2 { animation-delay: 1.8s; }
.svg-sustaintech .anim-circuit-dot-3 { animation-delay: 2.1s; }

@keyframes draw-path {
    to { stroke-dashoffset: 0; }
}
@keyframes pop-dot {
    to { transform: scale(1); }
}

/* 3. TechSustain (Ciudad Inteligente) */
.svg-techsustain .anim-building {
    transform: scaleY(0);
    transform-origin: bottom;
    animation: rise-building 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.svg-techsustain .anim-building-1 { animation-delay: 0.1s; }
.svg-techsustain .anim-building-2 { animation-delay: 0.3s; }
.svg-techsustain .anim-building-3 { animation-delay: 0.5s; }

.svg-techsustain .anim-window {
    opacity: 0;
    animation: blink-window 2s ease-in-out infinite alternate;
}
.svg-techsustain .anim-window-1 { animation-delay: 1.2s; }
.svg-techsustain .anim-window-2 { animation-delay: 1.7s; }
.svg-techsustain .anim-window-3 { animation-delay: 2.2s; }

.svg-techsustain .anim-antenna-signal {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: grow-roots 2s linear infinite;
    animation-delay: 1s;
}

@keyframes rise-building {
    to { transform: scaleY(1); }
}
@keyframes blink-window {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* 4. Formacion (Personas) */
.svg-formacion .anim-person-head {
    transform: scale(0);
    transform-origin: center;
    animation: pop-dot 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.svg-formacion .anim-person-head-1 { animation-delay: 0.1s; }
.svg-formacion .anim-person-head-2 { animation-delay: 0.3s; }
.svg-formacion .anim-person-head-3 { animation-delay: 0.5s; }

.svg-formacion .anim-person-body {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw-path 1.5s ease-out forwards;
}
.svg-formacion .anim-person-body-1 { animation-delay: 0.3s; }
.svg-formacion .anim-person-body-2 { animation-delay: 0.5s; }
.svg-formacion .anim-person-body-3 { animation-delay: 0.7s; }

.svg-formacion .anim-connection {
    stroke-dasharray: 8;
    animation: dash-flow 4s linear infinite;
}

@keyframes dash-flow {
    to { stroke-dashoffset: -20; }
}

/* 5. Results (Ecosistema completo) */
.svg-results .anim-ring {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    animation: draw-path 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.svg-results .anim-gear {
    transform-origin: 50px 50px;
    animation: spin-gear 12s linear infinite;
}
.svg-results .anim-leaf-grow {
    transform: scale(0);
    transform-origin: 38px 70px;
    animation: bloom-leaves 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 1.2s;
}

@keyframes spin-gear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6. CTA (Camino iluminado) */
.svg-cta .anim-sun {
    transform: scale(0.6);
    transform-origin: 50px 28px;
    animation: glow-sun 3s ease-in-out infinite alternate;
}
.svg-cta .anim-road-sides {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-path 2s ease-out forwards;
}
.svg-cta .anim-road-stripes {
    stroke-dasharray: 6;
    animation: road-flow 1.5s linear infinite;
}

@keyframes glow-sun {
    0% { transform: scale(0.85); filter: drop-shadow(0 0 2px rgba(234,179,8,0.2)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(234,179,8,0.6)); }
}
@keyframes road-flow {
    to { stroke-dashoffset: 12; }
}

/* 7. Feedback (Chispas) */
.svg-feedback .anim-sparkle {
    transform: scale(0);
    animation: twinkle-sparkle 2.5s ease-in-out infinite alternate;
}
.svg-feedback .anim-sparkle-1 { transform-origin: 50px 37.5px; animation-delay: 0.1s; }
.svg-feedback .anim-sparkle-2 { transform-origin: 68px 62.5px; animation-delay: 0.5s; }
.svg-feedback .anim-sparkle-3 { transform-origin: 28px 62.8px; animation-delay: 0.9s; }

@keyframes twinkle-sparkle {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1) rotate(90deg); opacity: 1; }
    100% { transform: scale(0.8) rotate(180deg); opacity: 0.7; }
}

/* ── ACCESIBILIDAD: FOCUS VISIBLE EN EL JUEGO ── */
button:focus-visible,
a:focus-visible,
[role="radio"]:focus-visible,
[role="link"]:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 3px solid var(--game-accent) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 10px rgba(0, 126, 74, 0.4) !important;
}

/* ── MODAL DE CONTACTO INTERACTIVO PREMIUM ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.modal-overlay.active .modal-window {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid var(--game-border);
    color: var(--game-gray);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--game-dark);
    transform: rotate(90deg);
}

.modal-heading {
    font-family: var(--font-concrete);
    font-size: clamp(20px, 4vw, 24px);
    color: var(--game-dark);
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1.25;
}

.modal-subheading {
    font-size: 13px;
    color: var(--game-gray);
    line-height: 1.55;
    margin-bottom: 24px;
}

/* Campos de Formulario Premium */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    font-family: var(--font-concrete);
    font-size: 10.5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--game-dark);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--game-border);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--game-dark);
    background: rgba(255, 255, 255, 0.5);
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-brand);
}

.form-group input:focus {
    border-color: var(--game-accent);
    background: var(--game-white);
    box-shadow: 0 0 0 4px var(--game-accent-light);
}

/* Pantalla de Éxito */
.modal-success-view {
    animation: success-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes success-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .modal-window {
        padding: 32px 24px;
        border-radius: 20px;
    }
}
