﻿/* ================================================
   SprintIA — CSS GLOBAL
   Variables, reset y estilos base compartidos
   ================================================ */

/* ================================================
   VARIABLES CSS — PALETA SprintIA
   ================================================ */
:root {
    /* === COLORES PRINCIPALES === */
    --primary: #0F2547; /* Navy oscuro — autoridad, confianza */
    --primary-dark: #091A35;
    --primary-light: #1E3F6B;
    --secondary: #00A86B; /* Verde SprintIA — progreso, eficiencia */
    --secondary-dark: #007A4D;
    --secondary-light: #33C98A;
    /* === FONDOS === */
    --bg-white: #FFFFFF;
    --bg-light: #F4F7FB; /* Gris azulado muy suave */
    --bg-navy-soft: #EEF2F8; /* Navy muy suave para secciones alternadas */
    --bg-dark: #091A35; /* Footer y secciones de contraste */
    /* === TEXTOS === */
    --text-dark: #0F2547; /* Navy — títulos */
    --text-body: #374151; /* Gris oscuro — cuerpo */
    --text-muted: #6B7280; /* Gris medio — subtítulos */
    --text-white: #FFFFFF;
    /* === GRADIENTES === */
    --gradient-hero: linear-gradient(135deg, #0F2547 0%, #091A35 100%); /* Fondos hero */
    --gradient-cta: linear-gradient(135deg, #00A86B 0%, #007A4D 100%); /* Botones CTA */
    --gradient-card: linear-gradient(135deg, #0F2547 0%, #1E3F6B 100%); /* Cards destacadas */
    --gradient-accent: linear-gradient(135deg, #F4F7FB 0%, #EEF2F8 100%); /* Fondos suaves */
    /* === SOMBRAS (tinte navy) === */
    --shadow-sm: 0 1px 2px 0 rgba(15, 37, 71, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(15, 37, 71, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(15, 37, 71, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(15, 37, 71, 0.18);
    /* === BORDES === */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    /* === TRANSICIONES === */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================
   RESET Y BASE
   ================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ================================================
   SCROLLBAR PERSONALIZADA (tinte navy)
   ================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 37, 71, 0.30);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(15, 37, 71, 0.55);
    }

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(15,37,71,0.30) transparent;
}

/* ================================================
   TIPOGRAFÍA BASE
   ================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: var(--secondary-dark);
    }

/* ================================================
   BOTONES CTA GLOBALES
   ================================================ */

/* CTA Principal — verde, para conversión */
.btn-cta-primary {
    background: var(--gradient-cta);
    border: none;
    border-radius: 50px;
    padding: 14px 36px;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

    .btn-cta-primary:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 168, 107, 0.40);
    }

/* CTA Secundario — borde verde, sin fondo */
.btn-cta-secondary {
    background: transparent;
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    color: var(--secondary);
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

    .btn-cta-secondary:hover {
        background: var(--secondary);
        color: #fff;
        transform: translateY(-2px);
    }

/* CTA Hero — verde grande, sobre fondos navy */
.btn-cta-hero {
    background: var(--gradient-cta);
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

    .btn-cta-hero:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0, 168, 107, 0.45);
    }

/* ================================================
   SECCIÓN BASE — padding estándar
   ================================================ */
.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 48px 0;
}

/* ================================================
   UTILIDADES DE TEXTO
   ================================================ */
.text-primary-sia {
    color: var(--primary) !important;
}

.text-secondary-sia {
    color: var(--secondary) !important;
}

.text-muted-sia {
    color: var(--text-muted) !important;
}

/* ================================================
   FONDOS DE SECCIÓN
   ================================================ */
.bg-navy {
    background: var(--gradient-hero);
}

.bg-light-sia {
    background: var(--bg-light);
}

.bg-soft-navy {
    background: var(--bg-navy-soft);
}

/* ================================================
   NAVBAR — SprintIA
   ================================================ */
.sia-navbar {
    background: #fff;
    border-bottom: 1px solid rgba(15, 37, 71, 0.10);
    box-shadow: var(--shadow-sm);
    padding: 14px 0;
    transition: var(--transition);
}

    /* Efecto scroll — clase añadida por utils.js */
    .sia-navbar.scrolled {
        padding: 8px 0;
        box-shadow: var(--shadow-md);
    }

/* ================================================
   LOGO
   ================================================ */
.sia-navbar__logo {
    text-decoration: none;
}

.sia-navbar__logo-text {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.sia-navbar__logo-sprint {
    color: var(--primary);
}

.sia-navbar__logo-ia {
    color: var(--secondary);
    margin-left: 2px;
}

/* ================================================
   LINKS
   ================================================ */
.sia-navbar__link {
    color: var(--text-dark) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 7px 13px !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

    .sia-navbar__link:hover {
        color: var(--primary) !important;
        background: var(--bg-light);
    }

    .sia-navbar__link.active {
        color: var(--primary) !important;
        font-weight: 700;
    }

        /* Subrayado activo (solo desktop) */
        .sia-navbar__link.active::after {
            content: '';
            position: absolute;
            bottom: 2px;
            left: 13px;
            right: 13px;
            height: 2px;
            background: var(--secondary);
            border-radius: 2px;
        }

/* ================================================
   DROPDOWN RECURSOS
   ================================================ */
.sia-navbar__dropdown {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 240px;
    margin-top: 6px;
}

.sia-navbar__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

    .sia-navbar__dropdown-item:hover,
    .sia-navbar__dropdown-item.active {
        background: var(--bg-light);
        color: var(--secondary);
    }

/* ================================================
   ICONO LUCIDE EN NAV
   ================================================ */
.sia-nav-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke-width: 2px;
}

/* ================================================
   CTA NAVBAR
   ================================================ */
.sia-navbar__cta {
    font-size: 0.9rem;
    padding: 10px 22px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-left: 12px;
    text-decoration: none;
}

/* ================================================
   TOGGLE HAMBURGUESA PERSONALIZADO
   ================================================ */
.sia-navbar__toggler {
    border: none;
    padding: 6px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

    .sia-navbar__toggler:focus {
        box-shadow: none;
        outline: none;
    }

.sia-toggler-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Animación X al abrir */
.sia-navbar__toggler[aria-expanded="true"] .sia-toggler-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.sia-navbar__toggler[aria-expanded="true"] .sia-toggler-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.sia-navbar__toggler[aria-expanded="true"] .sia-toggler-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   RESPONSIVE — MOBILE ( < 992px )
   ================================================ */
@media (max-width: 991.98px) {

    #siaNavMenu {
        padding: 16px 0 8px;
        border-top: 1px solid var(--bg-light);
        margin-top: 12px;
    }

    /* Ocultar subrayado activo en mobile */
    .sia-navbar__link.active::after {
        display: none;
    }

    .sia-navbar__link.active {
        background: var(--bg-light);
    }

    /* Dropdown sin sombra en mobile — se integra en el menú */
    .sia-navbar__dropdown {
        box-shadow: none;
        background: var(--bg-light);
        padding: 4px 8px;
        margin-top: 2px;
    }

    /* CTA full-width en mobile */
    .sia-navbar__cta {
        margin: 12px 0 4px;
        justify-content: center;
        width: 100%;
        border-radius: 12px;
    }
}

/* ================================================
   FOOTER — SprintIA
   ================================================ */
.sia-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.70);
    margin-top: auto;
}

/* ================================================
   FRANJA SUPERIOR
   ================================================ */
.sia-footer__top {
    padding: 64px 0 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Marca ── */
.sia-footer__brand {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.sia-footer__logo-sprint {
    color: #fff;
}

.sia-footer__logo-ia {
    color: var(--secondary);
    margin-left: 2px;
}

.sia-footer__tagline {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.60);
    margin-bottom: 20px;
    max-width: 300px;
}

/* ── Badges de prueba social ── */
.sia-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sia-footer__badge {
    background: rgba(0, 168, 107, 0.15);
    border: 1px solid rgba(0, 168, 107, 0.30);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--secondary-light);
    white-space: nowrap;
}

/* ── Headings de columna ── */
.sia-footer__heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.40);
    margin-bottom: 16px;
}

/* ── Links de columna ── */
.sia-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .sia-footer__links a {
        color: rgba(255, 255, 255, 0.65);
        font-size: 0.9rem;
        text-decoration: none;
        transition: var(--transition);
    }

        .sia-footer__links a:hover {
            color: var(--secondary);
            padding-left: 4px;
        }

/* ── CTA columna ── */
.sia-footer__cta-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.60);
    margin-bottom: 16px;
}

.sia-footer__cta-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    padding: 11px 22px;
    text-decoration: none;
}

/* ================================================
   FRANJA INFERIOR
   ================================================ */
.sia-footer__bottom {
    padding: 20px 0;
}

.sia-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Copyright ── */
.sia-footer__copy {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.40);
    margin: 0;
}

    .sia-footer__copy a {
        color: rgba(255, 255, 255, 0.60);
        text-decoration: none;
        font-weight: 600;
        transition: var(--transition);
    }

        .sia-footer__copy a:hover {
            color: var(--secondary);
        }

/* ── Links legales ── */
.sia-footer__legal {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

    .sia-footer__legal a {
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.40);
        text-decoration: none;
        transition: var(--transition);
    }

        .sia-footer__legal a:hover {
            color: rgba(255, 255, 255, 0.80);
        }

/* ================================================
   RESPONSIVE — MOBILE ( < 768px )
   ================================================ */
@media (max-width: 767.98px) {

    .sia-footer__top {
        padding: 48px 0 36px;
    }

    .sia-footer__tagline {
        max-width: 100%;
    }

    .sia-footer__cta-btn {
        width: 100%;
        justify-content: center;
    }

    .sia-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sia-footer__legal {
        gap: 16px;
    }
}

/* ================================================
   iOS — evitar zoom en inputs al hacer foco
   ================================================ */
@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* ================================================
   ENLACES EXTERNOS — prueba social (CrespoLaw et al.)
   Usados en .caso-link (Index) y .rec-link-externo (CasosDeUso)
   ================================================ */

.caso-link,
.rec-link-externo {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: var(--transition);
}

    .caso-link:hover,
    .rec-link-externo:hover {
        color: var(--secondary-dark);
        border-bottom-color: var(--secondary-dark);
    }

    /* Icono externo automático via CSS — sutil, no intrusivo */
    .caso-link::after,
    .rec-link-externo::after {
        content: ' ↗';
        font-size: 0.75em;
        opacity: 0.6;
        transition: var(--transition);
    }

        .caso-link:hover::after,
        .rec-link-externo::after:hover {
            opacity: 1;
        }