/* =========================================
   1. TIPOGRAFÍAS CORPORATIVAS
   (Gotham para Títulos / DIN 2014 para Párrafos)
   ========================================= */
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham/Gotham Book.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham/Gotham Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham/Gotham Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham/Gotham Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

/* =========================================
   2. DESIGN TOKENS (PALETA DEL MANUAL PÁG. 31)
   ========================================= */
:root {
    /* Paleta Oficial Susfinanzas */
    --sf-dark-blue: #0c2340;
    --sf-primary-blue: #11448f;
    --sf-cyan: #009ee2;
    --sf-light-cyan: #caf1f9;
    --sf-primary-yellow: #fdc400;
    --sf-light-yellow: #ffe65a;
    
    /* Colores Neutros y de Utilidad */
    --white: #ffffff;
    --text-main: #0c2340; 
    --text-muted: #4a5d73;
    --bg-light: #f8fafc;
    
    /* Alertas estándar UX */
    --success: #059669; 
    --danger: #b42318;
    
    /* UI Corporativa Fintech */
    --radius: 8px; 
    --radius-lg: 16px;
    --shadow-solid: 0 12px 35px rgba(12, 35, 64, 0.08); 
    
    /* Configuración Tipográfica */
    --font-titles: 'Gotham', sans-serif;
    --font-body: 'DIN 2014', 'Gotham', sans-serif; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-main);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { 
    font-family: var(--font-titles); 
    font-weight: 700; 
    line-height: 1.2; 
    color: var(--sf-dark-blue);
    letter-spacing: -0.5px;
}
strong, b { font-weight: 700; color: var(--sf-dark-blue); }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* =========================================
   3. NAVEGACIÓN Y BOTONES
   ========================================= */
.container { width: min(1140px, 90%); margin: 0 auto; }

.topbar {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 3px solid var(--sf-primary-yellow);
    box-shadow: 0 4px 20px rgba(12, 35, 64, 0.05);
}

.nav { height: 85px; display: flex; align-items: center; justify-content: space-between; }
.logo { max-height: 55px; object-fit: contain; }

/* Botones Premium (Píldora interactiva con brillo) */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50px; padding: 15px 32px;
    font-family: var(--font-titles); font-size: 1rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    text-decoration: none; cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sf-primary-yellow) 0%, #ffda40 100%);
    color: var(--sf-dark-blue);
    box-shadow: 0 6px 15px rgba(253, 196, 0, 0.3);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 25px rgba(253, 196, 0, 0.5);
    border-color: var(--white);
}

.btn-blue { background: var(--sf-primary-blue); color: var(--white); }
.btn-blue:hover { background: var(--sf-dark-blue); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(12, 35, 64, 0.2); }

/* =========================================
   4. HERO / PORTADA
   ========================================= */
.hero {
    background-color: var(--sf-dark-blue);
    background-image: linear-gradient(135deg, rgba(12, 35, 64, 0.95) 0%, rgba(17, 68, 143, 0.85) 100%), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    position: relative;
}

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 60px; }

.eyebrow {
    display: inline-block; 
    background: transparent;
    color: var(--sf-primary-yellow); 
    padding: 6px 14px; 
    border-radius: 4px;
    font-family: var(--font-titles);
    font-weight: 700; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 20px; 
    border: 1px solid var(--sf-primary-yellow);
}

.hero h1 { font-size: clamp(2.3rem, 4vw, 3.8rem); margin-bottom: 24px; color: var(--white); text-wrap: balance; }
.hero p { font-size: 1.15rem; line-height: 1.7; color: var(--sf-light-cyan); margin-bottom: 40px; max-width: 95%; font-family: var(--font-body); }
.hero p strong { color: var(--sf-primary-yellow); font-weight: 700; }

.hero-card {
    background: var(--white);
    color: var(--sf-dark-blue);
    padding: 50px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-solid);
    text-align: center;
    border-top: 6px solid var(--sf-primary-yellow);
}

.hero-card p { color: var(--text-muted); font-weight: 500; font-size: 1.1rem; }
.hero-card strong {
    display: block; font-size: 6.5rem; font-weight: 900; line-height: 1; margin: 15px 0;
    color: var(--sf-primary-blue);
    font-family: var(--font-titles);
    letter-spacing: -3px;
}

/* =========================================
   5. COMPONENTES Y TARJETAS INSTITUCIONALES
   ========================================= */
section { padding: 90px 0; background: var(--white); }
.muted-bg { background: var(--bg-light); border-top: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; }

.section-title { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section-title h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); color: var(--sf-dark-blue); margin-bottom: 15px; }
.section-title p { font-size: 1.15rem; color: var(--text-muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-solid);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border-top: 4px solid transparent; 
}

.card:hover { 
    transform: translateY(-8px); 
    border-top: 4px solid var(--sf-primary-blue); 
    border-color: var(--sf-primary-blue) transparent #e2e8f0 #e2e8f0;
    box-shadow: 0 20px 40px rgba(12, 35, 64, 0.12); 
}

.card .num {
    width: 48px; height: 48px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center;
    background: var(--sf-primary-yellow); 
    color: var(--sf-dark-blue);
    font-family: var(--font-titles); font-size: 1.4rem; font-weight: 900; 
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(253, 196, 0, 0.35);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover .num { transform: scale(1.1); background: var(--sf-light-yellow); }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--sf-dark-blue); }
.card p { color: var(--text-muted); line-height: 1.6; font-size: 1.05rem; }

@media (min-width: 1025px) {
    .grid-4 .card:not(:last-child)::after {
        content: '→'; position: absolute; top: 45px; right: -18px; 
        font-size: 1.5rem; color: #cbd5e1; font-family: var(--font-titles); z-index: 10;
    }
}

.money {
    font-family: var(--font-titles); font-size: 2.2rem; font-weight: 900; margin: 10px 0; 
    color: var(--sf-primary-blue) !important;
}
.money small { color: var(--text-muted) !important; }

.checklist { list-style: none; padding: 0; }
.checklist li { padding: 14px 0 14px 35px; position: relative; font-size: 1.05rem; color: var(--text-main); border-bottom: 1px solid #e2e8f0; }
.checklist li:last-child { border-bottom: none; }
.checklist li:before { content: "✓"; position: absolute; left: 0; top: 14px; color: var(--sf-cyan) !important; font-weight: 900; font-size: 1.3rem; }

/* =========================================
   6. FORMULARIO CORPORATIVO
   ========================================= */
.form-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }

.form-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 45px;
    box-shadow: var(--shadow-solid); border: 1px solid #e2e8f0; border-top: 6px solid var(--sf-primary-blue);
}

.form-card h2 { color: var(--sf-dark-blue); margin-bottom: 8px; }
.form-card p { color: var(--text-muted); margin-bottom: 25px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--sf-dark-blue); font-size: 0.9rem; }
.field input {
    width: 100%; border: 1px solid #cbd5e1; background: var(--white);
    border-radius: var(--radius); padding: 14px 16px; 
    font-family: var(--font-body); font-size: 16px; /* OPTIMIZACIÓN: 16px mínimo evita auto-zoom en iPhone */
    color: var(--text-main); transition: border-color 0.2s;
}
.field input:focus { outline: none; border-color: var(--sf-primary-blue); box-shadow: 0 0 0 3px var(--sf-light-cyan); }

.checkbox { display: flex; gap: 12px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-top: 15px; }
.checkbox input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--sf-primary-blue); }

.alert { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 500; font-family: var(--font-body); }
.alert-error { background: #fff1f0; color: var(--danger); border-left: 4px solid var(--danger); }
.alert-success { background: #ecfdf3; color: var(--success); border-left: 4px solid var(--success); }

/* =========================================
   7. FOOTER Y COBERTURA
   ========================================= */
.trust { background: var(--sf-dark-blue); color: var(--white); padding: 80px 0; }
.trust h2 { color: var(--white); }
.trust p { color: var(--sf-light-cyan); }

.footer { background: #071526; color: rgba(255,255,255,0.6); padding: 30px 0; text-align: center; font-size: 0.9rem; }
.footer a { color: var(--sf-primary-yellow); text-decoration: none; font-weight: 500; }

/* =========================================
   8. ESTRUCTURA COMPLETA STICKY MÓVIL (OPCIÓN 3)
   ========================================= */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    box-shadow: 0 -8px 30px rgba(12, 35, 64, 0.12);
    z-index: 100;
    display: none; /* Oculto en computadoras por defecto */
    border-top: 1px solid rgba(12, 35, 64, 0.05);
}
.sticky-mobile-cta .btn {
    width: 100%; margin: 0; text-align: center;
    box-shadow: 0 4px 15px rgba(253, 196, 0, 0.35);
}

/* =========================================
   9. RESPONSIVE DESIGN (OPTIMIZACIÓN MÓVIL)
   ========================================= */
@media (max-width: 1024px) {
    .hero-grid, .form-wrap { grid-template-columns: 1fr; gap: 40px; }
    .hero-grid { text-align: center; }
    .hero p { margin: 0 auto 30px auto; }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    /* Activar barra flotante inferior en móviles */
    .sticky-mobile-cta { display: block; }
    
    /* Prevenir que la barra flotante cubra el footer al final */
    body { padding-bottom: 75px; }

    /* Reducción estratégica de espaciados muertos para agilizar lectura */
    section { padding: 55px 0; }
    .hero { padding: 60px 0; }
    .nav { height: 75px; }
    
    /* Ocultar botón estático del menú superior en móvil para limpiar interfaz */
    .nav .btn { display: none; }
    
    /* Adaptación de títulos pesados */
    .hero h1 { font-size: 2.1rem; line-height: 1.2; }
    .hero-card { padding: 35px 20px; }
    .hero-card strong { font-size: 5rem; }
    
    /* Colapsar grillas a filas de una sola columna */
    .grid-4, .grid-3 { grid-template-columns: 1fr; gap: 16px; }
    .card { padding: 30px 20px; }
    .form-card { padding: 30px 20px; }
}

.text-center {
  text-align: center;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}
