/* ==========================================================================
   ENCOMIENDAMI - Estilos Principales (Mobile-First)
   ========================================================================== */

/* Variables de Diseño (Tokens) */
:root {
    /* Colores Principales */
    --color-primary: #EA580C;
    /* Naranja corporativo */
    --color-primary-hover: #C2410C;
    /* Naranja oscuro hover */
    --color-dark-bg: #0B0F19;
    /* Fondo oscuro hero/footer (Premium slate-navy) */
    --color-light-bg: #F9FAFB;
    /* Fondo secciones alternas (Tailwind gray-50) */
    --color-white: #FFFFFF;

    /* Colores de Alerta y Promociones */
    --color-warning-bg: #FEF3C7;
    /* Fondo alerta (amber-100) */
    --color-warning-border: #FDE68A;
    /* Borde alerta (amber-200) */
    --color-warning-text: #78350F;
    /* Texto alerta (amber-900) */
    --color-promo-bg: #FBBF24;
    /* Fondo promo bienvenida (amber-400) */
    --color-promo-dark: #1F2937;
    /* Botón promo bienvenida (gray-800) */
    --color-promo-hover: #313A48;
    /* Botón promo hover */

    /* Tipografía y Textos */
    --color-text: #1F2937;
    /* Texto principal oscuro */
    --color-text-muted: #6B7280;
    /* Texto secundario gris */
    --font-body: 'Lato', sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --font-heading-slab: 'Roboto Slab', serif;

    /* Sombras y Bordes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;

    /* Transiciones */
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Enlaces y Tipografías */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

p {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Clases de Utilidad */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bold-text {
    font-weight: 700;
    color: var(--color-text);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.09);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-dark {
    background-color: var(--color-promo-dark);
    color: var(--color-white);
}

.btn-dark:hover {
    background-color: var(--color-promo-hover);
    color: var(--color-white);
}

.btn-large {
    padding: 14px 30px;
    font-size: 1.05rem;
}

/* ==========================================================================
   Componente: Cabecera (Sticky Header)
   ========================================================================== */
.main-header {
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition-normal);
}

/* Cabecera compacta al hacer scroll */
.main-header.scrolled {
    box-shadow: var(--shadow-md);
    padding: 2px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 52px; /* Ajustado para cabecera móvil */
    width: auto;
    object-fit: contain;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Menú de Navegación */
.nav-menu {
    display: none;
    /* Oculto en móvil */
}

/* Estilos de navegación móvil en cascada */
@media (max-width: 1023px) {
    .nav-menu.active {
        display: block;
        position: absolute;
        top: 100%;
        /* Justo debajo del header */
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        border-bottom: 1px solid #f0f0f0;
        box-shadow: var(--shadow-md);
        padding: 20px 24px;
        z-index: 999;
        opacity: 0;
        transform: translateY(-15px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
        list-style: none;
    }

    .nav-link {
        display: block;
        padding: 10px 0;
        font-family: var(--font-heading);
        font-weight: 500;
        color: var(--color-text);
        font-size: 1.1rem;
    }

    .nav-link-bold {
        font-weight: 700;
        color: var(--color-primary);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 1023px) {
    .header-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 8px 16px;
        font-size: 0.85rem;
        line-height: 1.2;
        max-width: 130px; /* Forzar el salto de línea en móviles */
        white-space: normal;
        border-radius: 16px;
    }
}

/* Botón de Menú Hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   Barra de Alerta Superior (B2B Notice)
   ========================================================================== */
.alert-bar {
    background-color: var(--color-warning-bg);
    border-bottom: 1px solid var(--color-warning-border);
    color: var(--color-warning-text);
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    padding: 12px 24px;
}

.alert-container {
    max-width: 1200px;
    margin: 0 auto;
    font-weight: 500;
}

/* ==========================================================================
   Sección: Hero
   ========================================================================== */
.hero-section {
    background-color: var(--color-dark-bg);
    color: var(--color-white);
    padding: 60px 0;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-b2b {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(124, 45, 18, 0.8);
    border: 1px solid rgba(249, 115, 22, 0.5);
    border-radius: 9px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #FBBF24;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: #f97316;
}

.hero-description {
    font-size: 1.1rem;
    color: #d1d5db;
    /* Gris claro para fondos oscuros */
    margin-bottom: 35px;
    max-width: 650px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-bottom: 35px;
}

.hero-actions .btn {
    width: 100%;
}

.hero-bullets {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
}

.bullet-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.bullet-item svg {
    width: 20px;
    height: 20px;
    color: #16A34A;
    /* Verde para coincidir con el diseño original */
    flex-shrink: 0;
}

/* ==========================================================================
   Sección: Pérdida del 19% de IVA
   ========================================================================== */
.tax-loss-section {
    padding: 60px 0;
    background-color: var(--color-white);
    text-align: center;
}

.tax-title {
    font-size: 1.75rem;
    color: var(--color-text);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.tax-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Sección: Beneficios Grid
   ========================================================================== */
.benefits-section {
    padding: 80px 0;
    background-color: var(--color-light-bg);
}

.section-title {
    font-size: 1.85rem;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.benefit-card {
    background-color: var(--color-white);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: var(--transition-normal);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon {
    width: 28px;
    height: 28px;
}

.card-title {
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: 12px;
}

.card-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Variantes de Iconos en Tarjetas */
.bg-light-blue {
    background-color: #eff6ff;
}

.text-blue {
    color: #2563eb;
}

.bg-light-orange {
    background-color: #fff7ed;
}

.text-orange {
    color: #ea580c;
}

.bg-light-gray {
    background-color: #f3f4f6;
}

.text-dark {
    color: #1f2937;
}

.bg-light-brown {
    background-color: #ffedd5;
}

.text-brown {
    color: #7c2d12;
}

/* ==========================================================================
   Sección: Cómo Funciona (Steps + SVG)
   ========================================================================== */
.how-it-works-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.steps-title {
    font-size: 1.85rem;
    color: var(--color-text);
    margin-bottom: 12px;
}

.steps-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step-item {
    display: flex;
    gap: 20px;
}

.step-number-wrapper {
    flex-shrink: 0;
}

.step-number-circle {
    display: block;
}

.step-header {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 6px;
}

.step-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Columna de la ilustración Mockup */
.mockup-column {
    display: flex;
    justify-content: center;
}

.mockup-wrapper {
    width: 100%;
    max-width: 500px;
    background-color: #f3f4f6;
    border-radius: var(--border-radius-lg);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.mockup-wrapper:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.portal-svg-mockup {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Sección: Caja Promocional de Bienvenida
   ========================================================================== */
.welcome-promo-section {
    padding: 40px 0;
    background-color: var(--color-white);
}

.promo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--color-promo-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.promo-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.promo-icon-wrapper {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background-color: var(--color-white);
    border: 2px solid #fcd34d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-icon {
    width: 26px;
    height: 26px;
    color: #f59e0b;
}

.promo-title {
    font-size: 1.35rem;
    color: var(--color-text);
    margin-bottom: 8px;
}

.promo-description {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.5;
}

.promo-action {
    width: 100%;
}

.promo-action .btn {
    width: 100%;
}

/* ==========================================================================
   Sección: CTA Final (Cierre)
   ========================================================================== */
.final-cta-section {
    background-color: var(--color-dark-bg);
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
}

.final-cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.final-cta-subtitle {
    font-size: 1.1rem;
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto 35px auto;
}

.final-cta-btn-wrapper {
    margin-bottom: 25px;
}

.final-cta-btn-wrapper .btn {
    width: 100%;
    max-width: 280px;
}

.final-cta-btn-wrapper .btn:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.final-cta-legal {
    font-size: 0.85rem;
    color: #9ca3af;
}

.legal-link {
    color: #d1d5db;
    text-decoration: underline;
}

.legal-link:hover {
    color: var(--color-white);
}

/* ==========================================================================
   Sección: Pie de Página (Footer)
   ========================================================================== */
.main-footer {
    background-color: var(--color-white);
    border-top: 1px solid #e5e7eb;
    padding: 10px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-brand {
    display: flex;
    justify-content: center;
}

.footer-logo {
    height: 56px;
    /* Aumentado para coincidir con el original */
    width: auto;
    object-fit: contain;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.footer-socials {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    justify-content: center;
    margin-right: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    /* Aumentado para coincidir con el original */
    height: 35px;
    background-color: #f3f4f6;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.social-link:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.social-icon {
    width: 22px;
    /* Aumentado para coincidir con el original */
    height: 22px;
}

/* ==========================================================================
   Componente: Botón Flotante de WhatsApp
   ========================================================================== */
.whatsapp-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

.whatsapp-float-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: var(--color-white);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition-normal);
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.icon-whatsapp {
    width: 32px;
    height: 32px;
}

/* Anillo pulsante de atención */
.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid #25D366;
    animation: pulse 2.5s infinite;
    pointer-events: none;
    box-sizing: border-box;
}

/* Globo indicador de mensajes */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #EF4444;
    /* Rojo de alerta */
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: var(--shadow-sm);
}

/* Animación de Pulso */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ==========================================================================
   Media Queries - Adaptabilidad Responsive (Tablet/Desktop)
   ========================================================================== */

/* Dispositivos Medianos (Tablets: 768px y más) */
@media (min-width: 768px) {

    /* Cabecera */
    .header-container {
        padding: 10px 24px;
    }

    /* Hero */
    .hero-section {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
        width: auto;
    }

    .hero-actions .btn {
        width: auto;
    }

    .hero-bullets {
        flex-direction: row;
        gap: 30px;
    }

    /* Tarjetas de Beneficios */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Cómo funciona */
    .how-it-works-grid {
        gap: 40px;
    }

    /* Promo Bienvenida */
    .promo-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 40px 50px;
    }

    .promo-action {
        width: auto;
    }

    .promo-action .btn {
        width: auto;
    }

    /* Final CTA */
    .final-cta-btn-wrapper .btn {
        width: auto;
    }
}

/* Dispositivos Grandes (Pantallas de Escritorio: 1024px y más) */
@media (min-width: 1024px) {

    /* Cabecera completa con Menú Horizontal */
    .menu-toggle {
        display: none;
        /* Oculta botón hamburguesa */
    }

    .header-right-group {
        display: flex;
        align-items: center;
        gap: 30px;
        margin-left: auto;
        /* Empuja el menú y acciones a la derecha */
    }

    .header-logo {
        height: 64px; /* Aumentado para desktop */
    }

    .header-actions .btn {
        display: inline-flex;
        max-width: none;
        white-space: nowrap;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .nav-menu {
        display: block;
        /* Muestra menú */
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 30px;
        list-style: none;
    }

    .nav-link {
        color: var(--color-text);
        font-family: var(--font-heading);
        font-weight: 500;
        font-size: 0.95rem;
    }

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

    .nav-link-bold {
        font-weight: 700;
        border-bottom: 2px solid transparent;
        transition: var(--transition-fast);
    }

    .nav-link-bold:hover {
        border-color: var(--color-primary);
    }

    /* Sección Hero */
    .hero-title {
        font-size: 3.75rem;
        /* Aumentado para mayor presencia */
        line-height: 1.15;
    }

    /* Títulos de secciones */
    .section-title {
        font-size: 2.25rem;
        /* Aumentado */
    }

    /* Grid de Beneficios (4 Columnas) */
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Cómo Funciona (2 Columnas perfectas) */
    .how-it-works-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 60px;
    }

    .steps-title {
        font-size: 2.2rem;
    }

    .mockup-wrapper {
        max-width: 100%;
    }

    /* Footer */
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-brand {
        justify-content: flex-start;
    }

    .footer-socials {
        grid-template-columns: repeat(3, 1fr);
        justify-content: end;
        /* Alinear a la derecha en desktop */
    }
}

/* ==========================================================================
   Página: Términos y Condiciones
   ========================================================================== */
.terms-section {
    padding: 60px 0;
    background-color: var(--color-light-bg);
}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
}

.terms-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--color-text);
    line-height: 1.3;
}

.terms-container h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.terms-container h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.terms-container p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--color-text-muted);
}

.terms-container ul, .terms-container ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.terms-container li {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.terms-container hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

.terms-container strong, .terms-container b {
    color: var(--color-text);
    font-weight: 700;
}