/* === SISTEMA DE DISEÑO: TIPOGRAFÍA FLUIDA DE ALTA GAMA === */
/* Auditado para Responsive Design & Cross-Browser Compatibility */

:root {
    /* --- PALETA CROMÁTICA --- */
    --bg-body: #FAFAFA;       
    --bg-white: #FFFFFF;
    --input-bg: #F3F4F6;
    
    --text-main: #1F2937;     
    --text-muted: #4B5563;
    --text-hero-editorial: #627d98; 
    
    --accent-blue: #0F172A;   
    --accent-gold: #D4AF37;   
    --accent-gold-dark: #bfa035; 

    /* --- ESPACIADO MATEMÁTICO --- */
    --radius: 8px; 
    --radius-soft: 16px;
    --radius-pill: 100px;     
    
    /* Sombras Premium */
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 30px 60px -12px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 0 4px rgba(212, 175, 55, 0.15); 
    --border-light: #E5E7EB;

    /* --- ESCALA TIPOGRÁFICA FLUIDA --- */
    /* H1: Heroico. */
    --fs-h1: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    
    /* H2: Autoridad (Base global). */
    --fs-h2: clamp(2rem, 4vw + 0.5rem, 3rem);
    
    /* H4/Titulares Cards. */
    --fs-h4: clamp(1.25rem, 2vw, 1.5rem);
    
    /* Cuerpo General. */
    --fs-body: clamp(1rem, 1vw + 0.5rem, 1.125rem);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    font-size: 16px; /* Base para REMs */
    scroll-behavior: smooth; 
    -webkit-text-size-adjust: 100%; /* Evita cambio de tamaño automático en iOS apaisado */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7; 
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Evita scroll horizontal indeseado en móviles */
}

/* === TIPOGRAFÍA GLOBAL === */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-blue);
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: var(--fs-h1); margin-bottom: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); margin-bottom: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-h4); margin-bottom: 1rem; }

p {
    color: var(--text-muted);
    font-size: var(--fs-body);
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

strong { color: var(--text-main); font-weight: 600; }

/* === CLASES DE UTILIDAD === */
.text-center { text-align: center; } 
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Margen seguro laterales móvil */
}

/* Padding base para escritorio */
section { padding: 8rem 0; }

/* === BOTONES (Optimizado Táctil) === */
.btn {
    display: inline-block;
    padding: 1.1em 2.5em; 
    background-color: var(--accent-blue);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1.125rem; 
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Elimina flash gris en tap */
}

.btn:hover { transform: translateY(-2px); opacity: 0.95; box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-white);
}
.btn-primary:hover { background-color: var(--accent-gold-dark); }

/* === HERO SECTION === */
.hero {
    padding: 8rem 0 6rem;
    background-color: var(--bg-white);
    text-align: center;
}

.hero-subtitle { 
    font-family: 'Playfair Display', serif;
    color: var(--text-main); 
    font-size: 1.45rem; 
    font-weight: 400; 
    font-style: normal; 
    line-height: 1.7; 
    letter-spacing: 0.02em;
    margin-top: 2rem;
    margin-bottom: 3rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Botón Hero: Restauración de la Física Original */
.hero .btn {
    background-color: transparent; 
    border: 1px solid var(--accent-gold); 
    color: var(--text-main);
    font-size: 1rem; 
    font-weight: 600; 
    padding: 0.8em 2.2em;
    letter-spacing: 0.03em;
    box-shadow: none; 
    margin-top: 1rem;

    /* === CLAVE DEL EFECTO SUAVE === */
    transition: all 0.3s ease; 
}

.hero .btn:hover {
    background-color: var(--accent-gold);
    color: white;
    
    /* El movimiento de "un milímetro" exacto */
    transform: translateY(-1px);
    
    /* Tu sombra suave original */
    box-shadow: 0 10px 20px -5px rgba(212, 175, 55, 0.3);
}

/* === SECCIÓN DIAGNÓSTICO Y TÍTULOS GENERALES === */
.bg-body { background-color: var(--bg-body); } 
#diagnostico { padding-top: 5rem; position: relative; }

/* Título de Sección Ajustado (Compacto) */
.section-title { 
    font-size: clamp(1.75rem, 3vw, 2.5rem); 
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem; 
}

.section-intro { 
    margin-bottom: 4rem;
    opacity: 0.95; 
}

/* Configuración de Subtítulos Playfair */
.section-intro, .hero-subtitle { 
    font-family: 'Playfair Display', serif;
    color: var(--text-main); 
    font-size: 1.45rem; 
    font-weight: 400; 
    font-style: normal; 
    line-height: 1.7; 
    letter-spacing: 0.02em;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    .section-intro, .hero-subtitle {
        font-size: 1.35rem; 
        line-height: 1.6;
    }
}

/* === DISEÑO EDITORIAL "IVY LEAGUE" === */
.editorial-grid {
    display: grid;
    /* Ajuste de minmax para asegurar que no se rompa en pantallas de 320px */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    column-gap: 4rem; 
    row-gap: 5rem; 
    margin-bottom: 7rem; 
    text-align: center; 
}

.symptom-editorial {
    position: relative;
    padding: 0 1rem; 
}

.symptom-num {
    display: block;
    font-family: 'Inter', sans-serif; 
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-gold); 
    letter-spacing: 0.25em; 
    margin-bottom: 1.5rem; 
    text-transform: uppercase;
}

.symptom-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem; 
    line-height: 1.6; 
    letter-spacing: 0.01em;
    color: #1F2937; 
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}

@media (max-width: 768px) {
    .symptom-text { font-size: 1.25rem; line-height: 1.5; }
    /* Reducimos gap en móvil para que no queden huecos enormes */
    .editorial-grid { row-gap: 3.5rem; margin-bottom: 5rem; }
}

/* === PUENTE LÓGICO MAESTRO === */
.section-bridge-title, .section-bridge-subtitle {
    font-family: 'Playfair Display', serif;
    line-height: 1.25;
}
.section-bridge-title {
    font-size: clamp(2rem, 4vw, 3rem); 
    margin-bottom: 2.5rem; 
    color: var(--accent-blue); 
}
.section-bridge-subtitle {
    font-size: clamp(2rem, 4vw, 3rem); 
    color: var(--text-main);
}
.section-bridge-need {
    font-family: 'Playfair Display', serif; 
    font-size: 1.6rem; 
    font-weight: 400;   
    font-style: normal; 
    color: var(--accent-blue);
    line-height: 1.5; 
    margin-bottom: 2rem; 
}
.section-bridge-solution {
    font-family: 'Playfair Display', serif; 
    font-size: 1.8rem; 
    font-weight: 400;   
    font-style: normal; 
    color: var(--accent-blue);
    line-height: 1.3; 
    margin-top: 3rem;       
    margin-bottom: 2.5rem;  
}

/* === MÉTODO (Caja Fuerte) === */
.method-section { background: #F8FAFC; } 

.method-box {
    background-color: var(--bg-white);
    padding: 4.5rem 3.5rem; 
    border-radius: var(--radius);
    border: 0;
    border-left: 6px solid var(--accent-gold); 
    box-shadow: var(--shadow-lg);
    margin-left: auto;
    margin-right: auto;
    max-width: 900px; 
    margin-top: 1.5rem;
}

.method-box-title { 
    color: var(--accent-blue); 
    margin-bottom: 2.5rem;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.method-list { list-style: none; padding: 0; margin-top: 2rem; }

.method-list li { 
    font-size: 1.05rem; 
    line-height: 1.7; 
    margin-bottom: 1.5rem; 
    padding-left: 2rem; 
    position: relative; 
    color: var(--text-muted); 
    text-align: left;
}

/* Estilo para "Cero Improvisación", etc. - AZUL ORIGINAL */
.method-list-key-title { 
    display: inline;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif; 
    /* VUELVE AL AZUL CORPORATIVO */
    color: var(--accent-blue); 
    margin-right: 0.3rem;
}

.method-list li::before {
    content: ""; width: 8px; height: 8px; 
    background-color: var(--accent-gold);
    border-radius: 50%; position: absolute; left: 0; top: 10px; 
}

@media (max-width: 768px) {
    .method-box { padding: 3rem 1.5rem; border-left-width: 4px; }
    .method-list li { font-size: 1.05rem; padding-left: 1.5rem; margin-bottom: 1.5rem;}
    .method-box-title { font-size: 1.6rem; margin-bottom: 1.5rem; }
}

/* === FAQ === */
#preguntas { 
    padding-top: 0; 
    background-color: var(--bg-body); 
}

#preguntas .section-title {
    margin-bottom: 4rem;
}

details {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

details:hover { border-color: #cbd5e0; }

details[open] {
    background-color: var(--bg-white);
    border-color: #cbd5e0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

summary {
    padding: 1.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    cursor: pointer;
    list-style: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    outline: none; /* Accesibilidad */
}

summary::-webkit-details-marker { display: none; }

summary::after {
    content: "+";
    font-family: 'Inter', sans-serif; font-weight: 300;
    font-size: 1.6rem; color: var(--accent-gold);
    margin-left: 1rem; line-height: 1;
    transition: transform 0.2s ease;
    flex-shrink: 0; /* Evita que el signo + se aplaste en móviles */
}

details[open] summary::after { transform: rotate(45deg); color: var(--text-muted); }

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    animation: simpleFade 0.3s ease-out;
    max-width: 90%; 
}

@keyframes simpleFade { from {opacity:0; margin-top:-10px;} to {opacity:1; margin-top:0;} }

.faq-warranty-link { 
    font-size: 0.95rem; 
    color: var(--accent-blue); 
    text-decoration: none; 
    font-weight: 600; 
    display: inline-block; 
    margin-top: 0.8rem;
}
.faq-warranty-link:hover { text-decoration: underline; }

/* === AGENDA (Inputs Táctiles para iOS/Android) === */
#agenda { background-color: var(--bg-white); text-align: center; padding-top: 4rem; padding-bottom: 4rem;}

/* CORRECCIÓN: Título Agenda IGUAL a Título Sección */
.agenda-title {
    margin-bottom: 0;
    font-size: clamp(1.75rem, 3vw, 2.5rem); 
    font-weight: 600;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
    color: var(--accent-blue);
}

/* CORRECCIÓN: Subtítulo con mayor interespaciado (1.75) */
.agenda-subtitle {
    font-family: 'Playfair Display', serif; 
    font-size: 1.35rem; 
    font-weight: 400;   
    font-style: normal; 
    color: #374151;
    line-height: 1.75;   
    margin-top: 1.5rem; 
    margin-bottom: 3rem; 
}

.form-container {
    background-color: var(--bg-white);
    max-width: 600px;
    margin: 0 auto;
    margin-top: 0; 
    padding: 0 1.5rem; 
}

@media(min-width: 768px) {
     .form-container { padding: 0; }
}

label {
    display: block; text-align: left; 
    font-size: 0.8125rem; 
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 0.8rem; color: var(--accent-blue);
}

/* INPUTS: font-size 1rem evita zoom en iPhone */
input, select {
    width: 100%; padding: 1.2rem;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem; 
    color: var(--text-main);
    outline: none; margin-bottom: 2rem;
    transition: all 0.3s ease;
    -webkit-appearance: none; 
}

input:focus, select:focus {
    background-color: #fff; border-color: rgba(212, 175, 55, 0.5);
    box-shadow: var(--shadow-glow);
}

.btn-agenda-submit { 
    width: 100%; 
    background-color: var(--accent-blue); 
    color: white; 
    margin-top: 2.5rem; 
    letter-spacing: 0.03em;
    font-size: 1.15rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}
.btn-agenda-submit:hover { background-color: var(--accent-blue); } 

.form-privacy-notice { 
    margin-top: 2rem; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 0; 
}

/* === FOOTER === */
footer {
    background-color: var(--accent-blue);
    color: #fff;
    padding: 6rem 0 4rem;
}

footer .container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center;
}

footer h3 { 
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; 
    color: #fff; margin-bottom: 0.8rem; 
}
        
footer p { color: rgba(255,255,255,0.6); margin-bottom: 2.5rem; font-size: 1rem;}

.footer-contact-links { 
    margin-bottom: 2.5rem; 
    margin-top: 1.5rem;
}
.footer-contact-links a { color: white; font-weight: 500; }
.footer-contact-links span { color: rgba(255,255,255,0.3); margin: 0 0.5rem;}

.legal-nav {
    display: flex; gap: 2rem; margin-bottom: 2.5rem;
    flex-wrap: wrap; justify-content: center;
}

footer a {
    color: rgba(255,255,255,0.8); text-decoration: none;
    font-size: 0.9rem; transition: color 0.2s;
}
footer a:hover { color: var(--accent-gold); text-decoration: underline; }

.copyright { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin: 0; }

/* === MEDIA QUERIES FINALES (OVERRIDDES GLOBALES) === */
@media (max-width: 768px) {
    /* Reducción de padding vertical para no desperdiciar espacio en móvil */
    section { padding: 4rem 0; } 
    .hero { padding: 6rem 0 3rem; }
    
    /* Ajustes de tamaño para lectura cómoda en pantallas pequeñas */
    p { font-size: 1rem; } 
    
    /* FAQ: Padding interno ajustado */
    summary { padding: 1.2rem; font-size: 1rem; }
    .faq-content { padding: 0 1.2rem 1.2rem 1.2rem; }
}

/* === Animación de Scroll (Fade-on-scroll) === */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}