/* =========================================
   1. VARIABLES & THEME
   ========================================= */
:root {
    color-scheme: dark;
    
    --bg-dark: #0a0a0a;
    --text-main: #cbd5e1;   
    --text-white: #f1f5f9;  
    
    --accent-cyan: #22d3ee; 
    --accent-color: var(--accent-cyan);
    --accent-teal: #14b8a6; 
    --accent-white: #f1fdfe; 
    
    --accent-danger: #ef4444;           
    --accent-danger-soft: rgba(239, 68, 68, 0.05);
    --accent-warning: #ec4899;          
    --accent-ghost: #a855f7;            
    --accent-ghost-soft: rgba(168, 85, 247, 0.15);
    --accent-ghost-hover: rgba(168, 85, 247, 0.3);
    --accent-ghost-text: #d8b4fe;
    
    --accent-soft: rgba(34, 211, 238, 0.1);       
    --accent-dim: rgba(34, 211, 238, 0.05);       
    --accent-border: rgba(34, 211, 238, 0.25);    
    --accent-glow: rgba(34, 211, 238, 0.12);      
    --accent-hover: #06b6d4;                      
    
    --surface-glass: rgba(20, 20, 20, 0.7);       
    --surface-card: rgba(25, 25, 25, 0.4);        
    --surface-light: rgba(255, 255, 255, 0.04);   
    --surface-hover: rgba(255, 255, 255, 0.08);   
    
    --bg-navbar: rgba(10, 10, 10, 0.85);          
    --bg-footer: #050505;                         
    --bg-overlay: rgba(20, 20, 20, 0.8);            
    --border-color: rgba(255, 255, 255, 0.08);    
    --button-next-shadow: rgba(34, 211, 238, 0.25); 
    
    --text-muted: #94a3b8;  
    --text-dim: #64748b;    
    --text-on-accent: #000000; 

    --summary-border: rgba(255, 255, 255, 0.05);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-dark); 
    color: var(--text-main); 
    line-height: 1.6; 
}

.fixed-glow { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
    background: radial-gradient(circle at 50% -10%, var(--accent-glow), var(--bg-dark) 80%); 
    z-index: 0; pointer-events: none; 
}

section, footer { position: relative; z-index: 1; padding: clamp(60px, 8vw, 100px) 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.text-center { text-align: center; }

h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 300; margin-bottom: clamp(15px, 2vw, 25px); line-height: 1.2; color: var(--text-white); }
.highlight { color: var(--accent-cyan); font-weight: 400; }
.lead-text { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-muted); max-width: 800px; margin: 0 auto clamp(30px, 5vw, 60px); font-weight: 300; }

/* =========================================
   3. COMPONENTES GLOBALES
   ========================================= */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 40px);
    background: var(--bg-navbar); backdrop-filter: blur(20px); 
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000; 
}

.nav-container { width: 100%; max-width: 1200px; display: flex; justify-content: space-between; align-items: center; margin: 0 auto; }
.logo-wrapper { display: flex; align-items: center; gap: 12px; position: relative; }
.logo-symbol { width: 40px; height: 40px; color: var(--accent-cyan); }
.logo-text { font-weight: 500; font-size: 1rem; color: var(--text-white); letter-spacing: 1px; }

.status-indicator { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--surface-light); border-radius: 50px; border: 1px solid var(--border-color); }
.status-led { width: 8px; height: 8px; border-radius: 50%; background: #333; transition: background 0.5s ease, box-shadow 0.5s ease; }
.status-indicator.calibrating .status-led { background: var(--accent-cyan); animation: ledBlink 1s infinite alternate; }
.status-indicator.active .status-led { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.status-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 1.5px; color: var(--text-white); }
@keyframes ledBlink { from { opacity: 0.3; } to { opacity: 1; } }

header.hero { padding-top: clamp(80px, 10vw, 140px); position: relative; z-index: 1;}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 300; line-height: 1.1; margin: 0 auto 25px; color: var(--text-white); }
.hero h1 span { display: block; }
.subtitle { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 750px; margin: 0 auto 40px; font-weight: 300; }
.badge { display: inline-block; background: var(--accent-dim); color: var(--accent-cyan); padding: 6px 16px; border-radius: 50px; font-size: 0.75rem; font-weight: 500; letter-spacing: 1.5px; margin-bottom: 25px; border: 1px solid var(--accent-border); text-transform: uppercase; }

.btn-primary { 
    display: inline-flex; justify-content: center; align-items: center; gap: 10px;
    background: var(--accent-cyan); color: var(--text-on-accent); 
    padding: clamp(14px, 2vw, 18px) clamp(24px, 4vw, 36px); 
    font-weight: 500; letter-spacing: 1px; text-decoration: none; 
    border-radius: 8px; transition: all 0.3s ease; cursor: pointer; border: none; 
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); }

.btn-idling { background: var(--surface-light) !important; border: 1px solid var(--border-color) !important; color: var(--text-white) !important; box-shadow: inset 0 0 10px var(--accent-soft), 0 0 15px var(--bg-dark) !important; }
.btn-idling:hover { background: var(--surface-hover) !important; border-color: var(--accent-cyan) !important; box-shadow: inset 0 0 15px var(--accent-glow), 0 5px 20px var(--accent-glow) !important; }
.idle-gooey { display: flex; gap: 6px; align-items: center; }
.idle-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); animation: simplePulse 0.8s infinite alternate ease-in-out; }
.idle-dot:nth-child(2) { animation-delay: 0.2s; background: var(--accent-teal); }
.idle-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes simplePulse { 0% { transform: scale(1); opacity: 0.5; box-shadow: 0 0 0px var(--accent-cyan); } 100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px var(--accent-cyan); } }

.grid-layout { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 30px); }
.card { background: var(--surface-card); backdrop-filter: blur(20px); padding: clamp(30px, 4vw, 48px) clamp(20px, 3vw, 24px); border-radius: 16px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; transition: 0.4s ease; }
.card:hover { transform: translateY(-8px); border-color: var(--accent-cyan); }
.card h3 { font-size: 1.2rem; font-weight: 400; margin-bottom: 15px; text-align: center; color: var(--text-white); }
.card p { font-size: 0.95rem; line-height: 1.6; color: var(--text-main); }
.card-icon, .card-icon-num { background: var(--accent-soft); color: var(--accent-cyan); width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; border: 1px solid var(--accent-dim); }
.card-icon-num { font-size: 1.6rem; font-weight: 300; }
.quote { font-size: clamp(1.2rem, 3vw, 1.4rem); font-style: italic; color: var(--accent-cyan); max-width: 800px; margin: 60px auto 0; padding-left: 25px; border-left: 3px solid var(--accent-cyan); text-align: left; font-weight: 300; }

.trust-badges { margin-top: 70px; }
.trust-badges p { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.logos { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; opacity: 0.6; }
.logos span { color: var(--text-main); font-weight: 500; font-size: 0.9rem; }

/* =========================================
   4. LAYOUT DEL QUIZ
   ========================================= */
#quiz-container { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; width: 100%; transition: opacity 0.3s ease; min-height: 450px; overflow-anchor: none;}
.quiz-section { scroll-margin-top: 0; }

.quiz-card { 
    background: var(--surface-glass); backdrop-filter: blur(20px); 
    border: 1px solid var(--border-color); border-radius: 24px; 
    padding: clamp(30px, 5vw, 50px) clamp(20px, 4vw, 40px); 
    max-width: 700px; margin: 0 auto; 
    position: relative; display: flex; flex-direction: column; overflow: hidden; 
    scroll-margin-top: 120px;
}

.progress-container { position: absolute; top: 0; left: 0; width: 100%; background: var(--surface-light); z-index: 10; height: 6px; }
.progress-bar { height: 100%; background: var(--accent-cyan); width: 0%; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 10px var(--accent-cyan); }

.quiz-step-header { margin-bottom: clamp(20px, 3vw, 30px); }
.slide-title { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 400; margin-bottom: 10px; color: var(--text-white); line-height: 1.2; }
.quiz-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 30px; font-weight: 300; }
.intro-lead { font-size: 0.9rem; margin-bottom: 30px; color: var(--text-muted); font-weight: 300;}

.intro-privacy-box { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.privacy-icon { color: var(--accent-cyan); display: flex; justify-content: center;}
.privacy-icon svg { width: 24px; height: 24px; display: block; }
.privacy-title { color: var(--text-white); display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem;}
.privacy-desc { color: var(--text-muted); line-height: 1.4; font-size: 0.8rem; font-weight: 300; max-width: 400px; margin: 0 auto;}

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.check-box-card { background: var(--surface-light); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 12px; text-align: left; }
.check-box-card:hover { background: var(--surface-hover); border-color: var(--accent-cyan); transform: translateY(-2px); }
.check-box-card.selected { background: var(--accent-soft); border-color: var(--accent-cyan); box-shadow: 0 0 15px var(--accent-dim); }
.check-box-card .icon-box { color: var(--accent-cyan); flex-shrink: 0; margin: 0; }
.check-box-card .content { display: flex; flex-direction: column; }
.check-box-card .title { font-weight: 500; color: var(--text-white); font-size: 0.95rem; margin-bottom: 2px; }
.check-box-card .desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; font-weight: 300;}

.icon-box svg { width: 24px; height: 24px; display: block; stroke-width: 1.5; }
.card-icon svg { width: 32px; height: 32px; display: block; stroke-width: 1.5; }

/* REESCRITURA DE OPCIONES DUALES (BINARY) */
.binary-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Siempre dos columnas */
    gap: 15px; 
    margin-top: 30px; 
}
.binary-grid .mini-card { 
    background: var(--surface-light); border: 1px solid var(--border-color); 
    border-radius: 12px; padding: 20px; 
    cursor: pointer; transition: 0.3s; color: var(--text-white);
    display: flex; flex-direction: column; /* Apilados verticalmente */
    justify-content: center; align-items: center; 
    gap: 12px; text-align: center; min-height: 120px;
}
.mini-card:hover, .mini-card.selected { border-color: var(--accent-cyan); background: var(--accent-soft); box-shadow: 0 0 15px var(--accent-dim); }
.binary-icon { color: var(--accent-cyan); display: flex; justify-content: center; align-items: center;}
.binary-icon-svg svg { width: 36px; height: 36px; display: block; stroke-width: 1.2;}
.binary-label { font-weight: 500; font-size: 1.1rem; line-height: 1.3;}

/* CHIPS */
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; min-height: 130px; align-content: flex-start; }
.chip-item { background: var(--surface-card); border: 1px solid var(--border-color); padding: 10px 18px; border-radius: 50px; font-size: 0.85rem; color: var(--text-main); font-weight: 400; cursor: pointer; transition: 0.2s; }
.chip-item:hover, .chip-item.selected { border-color: var(--accent-cyan); background: var(--accent-soft); color: var(--text-white); }
.chip-search-container { margin-top: 25px; }
.chip-search { width: 100%; padding: 14px 18px; margin-bottom: 12px; background: var(--surface-card); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-white); outline: none; transition: 0.3s; font-family: 'Inter', sans-serif;}
.chip-search:focus { border-color: var(--accent-cyan); background: var(--surface-hover); }

.search-intro-text { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
.input-helper { font-size: 0.75rem; color: var(--text-dim); margin-top: -8px; margin-bottom: 15px; font-style: italic; }
.brands-summary { font-size: 0.85rem; color: var(--accent-cyan); margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); }

.chip-item.is-preview { background: var(--accent-ghost-soft) !important; border: 1px dashed var(--accent-ghost) !important; color: var(--accent-ghost-text) !important; padding: 10px 20px !important; text-align: center; line-height: 1.2; animation: pulseGhost 2s infinite; }
.chip-item.is-preview small { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; opacity: 0.8; }
@keyframes pulseGhost { 0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); } 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); } }

/* =========================================
   5. FORMULARIOS UNIFICADOS
   ========================================= */
.final-form input[type="text"],
.final-form input[type="email"],
.final-form input[type="tel"],
.contact-textarea {
    width: 100%; background-color: var(--surface-card); border: 1px solid var(--border-color);
    padding: 15px; border-radius: 8px; color: var(--text-white); font-family: 'Inter', sans-serif;
    font-size: 1rem; outline: none; transition: all 0.3s ease; margin-bottom: 15px; color-scheme: dark; 
}
.final-form input:focus, .contact-textarea:focus { border-color: var(--accent-cyan); background: var(--surface-hover); }
::placeholder { color: var(--text-muted); opacity: 0.6; font-weight: 300; }
.contact-textarea { min-height: 120px; resize: vertical; }

.form-row { display: flex; gap: 15px; }
.form-row .input-half { flex: 1; }

.checkbox-container { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--text-muted); text-align: left; margin-bottom: 15px; cursor: pointer; line-height: 1.4;}
.checkbox-container input[type="checkbox"] { width: auto; margin-top: 3px; accent-color: var(--accent-cyan); }

.phone-group { display: flex; align-items: stretch; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--surface-card); transition: all 0.3s ease; }
.phone-group:focus-within { border-color: var(--accent-cyan); background: var(--surface-hover); }
.phone-group input[type="tel"] { flex-grow: 1; background: transparent; border: none; margin-bottom: 0; padding: 15px; border-radius: 0; }
.phone-group .custom-select-container { width: 120px; flex-shrink: 0; border: 0; border-right: 1px solid var(--border-color); margin-bottom: 0; }
.phone-group .custom-select-trigger { border: none !important; background: transparent !important; height: 100%; border-radius: 0; }

select { display: none !important; }
.custom-select-container { position: relative; width: 100%; margin-bottom: 15px; }
.custom-select-trigger { width: 100%; background: var(--surface-card); border: 1px solid var(--border-color); padding: 15px; border-radius: 8px; color: var(--text-white); font-family: 'Inter', sans-serif; font-size: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.custom-select-trigger.is-placeholder .select-text { color: var(--text-muted); opacity: 0.6; font-weight: 300;}
.custom-select-trigger:hover, .custom-select-trigger.open { border-color: var(--accent-cyan); background: var(--surface-hover); }
.custom-select-trigger::after { content: ''; width: 14px; height: 14px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: center; transition: transform 0.3s ease; }
.custom-select-trigger.open::after { transform: rotate(180deg); }

.custom-select-container.is-prefix { width: 120px; margin-bottom: 0; border-right: 1px solid var(--border-color); }
.custom-select-container.is-prefix .custom-select-trigger { background: transparent; border: none; color: var(--accent-cyan); padding: 0 10px 0 15px; font-size: 0.9rem; height: 100%; border-radius: 0; }
.custom-select-container.is-prefix .custom-select-trigger:hover { background: transparent; border-color: transparent; }

.custom-select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--bg-dark); border: 1px solid var(--accent-border); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8); z-index: 999; max-height: 250px; overflow-y: auto; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.3s ease; }
.custom-select-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.custom-option { padding: 12px 15px; color: var(--text-white); font-size: 0.9rem; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.custom-option:hover { background: var(--surface-hover); color: var(--accent-cyan); }
.custom-select-dropdown::-webkit-scrollbar { width: 6px; }
.custom-select-dropdown::-webkit-scrollbar-track { background: var(--bg-dark); border-radius: 8px; }
.custom-select-dropdown::-webkit-scrollbar-thumb { background: var(--accent-border); border-radius: 8px; }

/* =========================================
   6. INTERFACES DE RESULTADOS Y SCORE
   ========================================= */
.opt-score-card { background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 16px; padding: 25px; margin-bottom: 25px; text-align: center; }
.score-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-cyan); margin-bottom: 10px; font-weight: 500; }
.score-value { font-size: 3rem; font-weight: 300; color: var(--text-white); line-height: 1; }
.score-unit { font-size: 1.2rem; color: var(--accent-cyan); font-weight: 500; }
.score-bar-track { width: 100%; height: 6px; background: var(--border-color); border-radius: 10px; margin: 20px 0; position: relative; overflow: hidden; }
.score-bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--accent-cyan); box-shadow: 0 0 15px var(--accent-cyan); transition: width 1s ease-out; }
.score-potential { font-size: 0.9rem; color: var(--text-white); margin-bottom: 0; }
.score-potential span { color: var(--accent-cyan); font-weight: 600; }

.analysis-summary { background: var(--surface-light); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin: 20px 0; }
.summary-list { list-style: none; padding: 0; margin: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--summary-border); font-size: 0.85rem; }
.summary-list li:last-child { border-bottom: none; }
.summary-list li span:first-child { color: var(--text-muted); }
.summary-list li span:last-child { color: var(--text-white); text-align: right; font-weight: 500; }
.empty-value { color: var(--text-muted) !important; font-style: italic; font-weight: 300 !important; }

.btn-modify { background: none; border: none; color: var(--text-muted); text-decoration: none; cursor: pointer; font-size: 0.85rem; padding: 5px; font-weight: 500;}
.btn-modify:hover { color: var(--text-white); }
.action-links-row { display: flex; justify-content: center; gap: 20px; margin-top: -10px; margin-bottom: 25px; }
.btn-modify.danger { color: var(--accent-danger); }
.btn-modify.danger:hover { background: var(--accent-danger-soft); border-radius: 4px; color: var(--accent-danger); }

.required-legend { font-size: 0.75rem; color: var(--text-white); margin-bottom: 15px; text-align: left; font-weight: 500; opacity: 0.8; }
.legal-box { font-size: 0.75rem; color: var(--text-dim); margin: 20px 0; line-height: 1.6; text-align: left; padding: 15px; background: var(--surface-light); border-radius: 8px; border: 1px dashed var(--border-color); font-weight: 300;}

/* =========================================
   7. CONTROLES Y ANIMACIONES QUIZ
   ========================================= */
.quiz-controls { margin-top: 40px; display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.btn-next { background: var(--accent-cyan); color: var(--text-on-accent); padding: 14px 40px; border-radius: 50px; font-weight: 600; border: none; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 0 15px var(--button-next-shadow); }
.btn-next:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; transform: scale(0.98); }
.btn-next:not(:disabled):hover { transform: scale(1.02); box-shadow: 0 0 20px var(--button-next-shadow); }
.btn-back { background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size: 0.95rem; font-weight: 500; transition: 0.3s; }
.btn-back:hover { color: var(--text-white); }

.fade-in-up { animation: fadeInUp 0.5s ease forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.gooey-container { filter: url('#goo'); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-overlay); z-index: 100; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 24px; }
.loader-text { margin-top: 40px; font-family: monospace; font-size: 1.1rem; color: var(--accent-cyan); opacity: 0.8; text-align: center;}

/* =========================================
   8. MODAL ALERTAS Y ÉXITO
   ========================================= */
.modal-overlay { opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--surface-glass); backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { 
    background: var(--surface-card); border: 1px solid var(--border-color); 
    padding: 30px; border-radius: 20px; max-width: 500px; width: 90%; 
    box-shadow: 0 20px 40px var(--bg-overlay);
    max-height: 85vh; display: flex; flex-direction: column; 
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-shrink: 0; }
.modal-body { overflow-y: auto; padding-right: 15px; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
.modal-body p { font-size: 0.95rem; color: var(--text-white); margin-bottom: 15px; line-height: 1.6; font-weight: 300;}
.close-btn { background: none; border: none; color: var(--text-white); font-size: 2rem; cursor: pointer; line-height: 1;}

.system-alert-overlay { z-index: 10000; background: var(--bg-overlay); }
.system-alert-content { text-align: center; max-width: 420px; padding: 40px 30px; height: auto; display: block;}
.alert-icon-box { margin: 0 auto 20px; }
.alert-icon-danger { color: var(--accent-danger); }
.alert-icon-success { color: var(--accent-cyan); }
.alert-icon-text { font-size: 26px; line-height: 1; font-weight: 600; }
.alert-title { margin-bottom: 15px; font-size: 1.3rem; color: var(--text-white); font-weight: 400;}
.alert-message { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; line-height: 1.6; font-weight: 300;}
.alert-actions { display: flex; justify-content: center; gap: 15px; align-items: center; }
.btn-alert { margin: 0; padding: 12px 24px; min-width: 140px; flex: none; font-weight: 500;}
.btn-alert-cancel { margin: 0; padding: 12px 20px; }

/* ARREGLO BOTÓN DESTRUIR */
.btn-danger { 
    background: transparent; color: var(--text-muted); 
    border: 1px solid var(--border-color); border-radius: 8px; 
    font-weight: 500; font-family: inherit; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.3s ease; font-size: 0.9rem; padding: 12px 24px;
}
.btn-danger:hover { color: var(--accent-danger); border-color: var(--accent-danger); background: var(--accent-danger-soft); }
.btn-danger-large { width: 100%; max-width: 300px; margin: 0 auto; padding: 14px 24px; font-size: 0.95rem; }

.success-box { padding: 40px 0; }
.success-icon-box { margin: 0 auto 25px; color: var(--accent-cyan); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-dim); }
.success-icon-box svg { width: 30px; height: 30px; }
.success-margin { margin-top: 15px; }

.btn-submit-main { flex: 1.5; opacity: 0.5; pointer-events: none; }
.btn-submit-full { width: 100%; margin-top: 25px; opacity: 0.5; pointer-events: none; }

/* =========================================
   9. FOOTER & META BAR
   ========================================= */
.footer { background: var(--bg-footer); border-top: 1px solid var(--border-color); padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin: 60px 0; padding-bottom: 50px; border-bottom: 1px solid var(--border-color); }
.footer-brand .logo { font-weight: 500; letter-spacing: 1px; color: var(--text-white); }
.footer-brand .footer-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; max-width: 300px; font-weight: 300;}
.footer-mail { font-size: 0.95rem; color: var(--accent-cyan); text-decoration: none; font-weight: 500; transition: 0.3s ease; }
.footer-mail:hover { color: var(--text-white); text-shadow: 0 0 10px var(--accent-cyan); }
.footer-links h4 { font-size: 0.9rem; color: var(--text-white); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 500;}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; font-weight: 300;}
.footer-links a:hover { color: var(--accent-cyan); }

.health-disclaimer { max-width: 850px; margin: 0 auto 25px; font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; padding: 25px; background: var(--surface-light); border-radius: 12px; border: 1px solid var(--border-color); font-weight: 300;}
.health-disclaimer strong { color: var(--text-muted); font-weight: 500;}

.footer-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 25px; border-top: 1px dashed var(--border-color); }
.copyright { color: var(--text-dim); font-size: 0.85rem; font-weight: 300;}
.footer-tools { display: flex; align-items: center; gap: 10px; }
.footer-tools .custom-select-container { margin-bottom: 0; }
.footer-tools .custom-select-trigger { border: none !important; background: transparent !important; padding: 8px 12px; color: var(--text-dim); font-size: 0.85rem; font-weight: 500; transition: 0.3s; }
.footer-tools .custom-select-trigger:hover, .footer-tools .custom-select-trigger.open { color: var(--text-white); background: var(--surface-light) !important; border-radius: 8px; }
.footer-tools .custom-select-trigger::after { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); }
.footer-tools .custom-select-trigger:hover::after, .footer-tools .custom-select-trigger.open::after { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); }
.footer-tools .custom-select-dropdown { top: auto; bottom: calc(100% + 5px); transform: translateY(10px); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8); }
.footer-tools .custom-select-dropdown.open { transform: translateY(0); }

/* =========================================
   10. MEDIA QUERIES (Mobile y Responsive)
   ========================================= */
@media (max-width: 768px) { 
    .navbar { padding: 12px 20px; } 
    .logo-text { display: none; }
    
    .hero h1 { font-size: 2.2rem; } 
    .btn-primary { letter-spacing: normal; }
    .btn-primary:hover { transform: none; } 
    
    .grid-layout { grid-template-columns: 1fr; gap: 20px; } 
    
    .quiz-card { padding: 30px 20px; width: 100%; border-radius: 0; border: none; background: transparent; } 
    .card-grid, .form-row { grid-template-columns: 1fr; flex-direction: column; } 
    
    /* MODIFICACIÓN: BINARY CARDS A DOS COLUMNAS CUADRADAS EN MÓVIL */
    .binary-grid { gap: 10px; } 
    .binary-grid .mini-card { padding: 15px 10px; min-height: 100px; gap: 8px;}
    .binary-icon-svg svg { width: 28px; height: 28px; }
    .binary-label { font-size: 0.95rem; }

    .quiz-controls { flex-direction: column-reverse; width: 100%; gap: 15px;} 
    .btn-next, .btn-back { width: 100%; text-align: center; } 
    
    .logos { gap: 15px 25px; } 
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-brand .logo { justify-content: center; }
    .footer-brand .footer-desc { margin: 0 auto 20px; }
    
    .footer-meta { flex-direction: column-reverse; gap: 25px; text-align: center; }
    .footer-tools { justify-content: center; }

    /* REDUCCIÓN DE ALTURA EN CARDS DE OPCIONES (MÓVIL) */
    .check-box-card { padding: 10px 12px; gap: 10px; }
    .check-box-card .card-icon { width: 48px; height: 48px; }
    .check-box-card .icon-box svg { width: 22px; height: 22px; }
    
    /* REDUCCIÓN DE PADDING VERTICAL EN CHIPS (MÓVIL) */
    .chip-item { padding: 6px 14px; }
}

/* =========================================
   BANDERAS Y SVG UTILS
   ========================================= */
.flag-wrapper { display: inline-flex; justify-content: center; align-items: center; width: 26px; height: 18px; border-radius: 4px; overflow: hidden; background: var(--surface-light); margin-right: 10px; border: 1px solid var(--border-color); flex-shrink: 0; }
.flag-wrapper span { font-size: 28px; line-height: 1; }
.flag-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.prefix-text { color: var(--text-white); font-weight: 400; }
.icon-globe { width: 100%; height: 100%; opacity: 0.5; padding: 2px; box-sizing: border-box; }
.is-hidden { display: none !important; }