/* ==========================================================================
   Finanzaz Asesoría - CSS Principal (Mobile First)
   Estilo Premium de Alto Rendimiento (Core Web Vitals Optimized)
   ========================================================================== */

/* 1. Variables de Diseño (Sistema de Diseño 60-30-10) */
:root {
    /* 60% Dominante: Fondo Limpio e Higiénico */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-alt: #F1F5F9;

    /* 30% Estructural: Azul Corporativo Institucional */
    --primary: #0B1B3D;
    --primary-light: #1E40AF;
    --primary-rgb: 11, 27, 61;
    --primary-gradient: linear-gradient(135deg, #0B1B3D 0%, #1E40AF 100%);
    --secondary: #0F172A;

    /* 10% Acento de Urgencia/CTA: Naranja Coral de Alto Contraste */
    --accent: #EA580C;
    --accent-hover: #C2410C;
    --accent-rgb: 234, 88, 12;

    /* Colores del Sistema */
    --text-dark: #0F172A;
    --text-muted: #475569;
    --text-light: #F8FAFC;
    --border-color: #E2E8F0;
    --success: #10B981;
    --error: #EF4444;

    /* Tipografías */
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout & Sombras */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
    
    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Reset y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Botones de Conversión (CRO) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--text-light);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(234, 88, 12, 0.4);
    border-radius: var(--radius-sm);
    transform: translate(-50%, -50%) scale(1);
    animation: btnPulse 2s infinite;
    pointer-events: none;
}

@keyframes btnPulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 120%;
        height: 140%;
        opacity: 0;
    }
}

/* 3. Estructura de Cabecera (Header & Top Bar) */
.top-bar {
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot-blink {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.top-contact {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-contact a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.9;
}

.top-contact a:hover {
    opacity: 1;
    color: var(--accent);
}

.header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-normal);
}

.header.shrink {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header.shrink .header-inner {
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-family: var(--font-title);
    font-weight: 800;
    display: flex;
    align-items: center;
}

.logo-bold {
    color: var(--primary);
}

.logo-accent {
    color: var(--accent);
}

.navbar {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* 4. Sección Hero (Captura CRO - Primer Pantallazo) */
.hero {
    background: var(--primary-gradient);
    color: var(--text-light);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.25rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.benefits-list svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Formulario de Captura Hero */
.lead-form-container {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-dark);
}

.lead-form-container h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.lead-form-container .form-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.lead-form-container .btn {
    width: 100%;
}

.form-privacy-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}

.form-privacy-note a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* 5. Sección de Servicios (Grilla) */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-alt);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.section-tag {
    display: inline-block;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-link:hover {
    color: var(--primary);
}

/* 6. Proceso Técnico */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.process-step {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.step-num {
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 3rem;
    font-family: var(--font-title);
    font-weight: 900;
    color: rgba(234, 88, 12, 0.15);
    line-height: 1;
}

.process-step h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.process-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 7. Cobertura Geográfica */
.coverage-box {
    background: var(--primary-gradient);
    color: var(--text-light);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.coverage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.coverage-info h3 {
    color: var(--text-light);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.coverage-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.coverage-list li {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
}

/* 8. Sección de Contacto Ampliada */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
}

.info-item-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(234, 88, 12, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.info-item p, .info-item a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-map-placeholder {
    margin-top: 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

/* 9. Footer */
.footer {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 5rem 0 2rem 0;
    border-top: 4px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand .footer-logo {
    font-size: 1.75rem;
    font-family: var(--font-title);
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-brand .brand-text {
    opacity: 0.8;
    margin-bottom: 2rem;
}

.fiscal-data p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-title {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    padding-left: 5px;
}

.footer-contact-details li {
    margin-bottom: 1.25rem;
}

.footer-contact-details .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.footer-contact-details .contact-value {
    font-weight: 500;
    font-size: 1.05rem;
}

/* Footer Disclaimer (YMYL Compliance) */
.footer-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-bottom: 2.5rem;
}

.disclaimer-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
}

.disclaimer-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.disclaimer-text {
    font-size: 0.825rem;
    line-height: 1.6;
    color: rgba(248, 250, 252, 0.7);
}

/* Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    font-size: 0.875rem;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-legal-links a {
    opacity: 0.8;
}

.footer-legal-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.dev-credit {
    font-size: 0.8rem;
    opacity: 0.6;
}

.dev-credit a {
    text-decoration: underline;
    opacity: 0.9;
}

.dev-credit a:hover {
    color: var(--accent);
    opacity: 1;
}

/* 10. Páginas Legales, Gracias y 404 */
.legal-content {
    background-color: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.legal-content h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
}

.legal-content p, .legal-content ul {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.legal-content ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

/* Página Gracias */
.thanks-container {
    max-width: 650px;
    margin: 5rem auto;
    text-align: center;
    background-color: var(--bg-card);
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.thanks-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
}

.thanks-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.thanks-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.thanks-urgency-banner {
    background-color: rgba(234, 88, 12, 0.08);
    border: 1px dashed var(--accent);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2.5rem;
}

.thanks-urgency-banner h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.thanks-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Página 404 */
.error-container {
    max-width: 550px;
    margin: 6rem auto;
    text-align: center;
}

.error-code {
    font-size: 6rem;
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.error-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Cookie Banner Consent */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--primary);
    color: var(--text-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(150%);
    transition: transform 0.5s ease-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-text {
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.cookie-actions .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   Media Queries (Responsive Layouts)
   ========================================================================== */

@media (min-width: 768px) {
    /* Header & Nav */
    .menu-toggle {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 6rem 0;
    }
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 4rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    
    /* Grillas */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .coverage-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .cookie-consent-banner {
        left: auto;
        right: 20px;
        width: 420px;
    }
}

@media (min-width: 1024px) {
    /* Servicios */
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Proceso */
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Menú móvil desplegable */
@media (max-width: 767px) {
    .navbar {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding: 3rem 1.5rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    
    .navbar.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-cta {
        display: none;
    }

    .top-bar {
        font-size: 0.75rem;
    }

    .top-bar-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .top-contact {
        justify-content: center;
        gap: 0.75rem;
    }
}
