/* ES: estilos de templates/frontpage.html. Estaban pegados en el HTML (un bloque <style>) y se
   descargaban sin comprimir en cada visita; aquí van por el CDN, comprimidos y
   con caché (2026-11-22, plan de rapidez, fase 2). El orden de carga es el mismo. */
/* Hero: degradado oscuro a tono con la nueva imagen OG (solo en el frontpage) */
.hero {
    background: linear-gradient(180deg, #000000 0%, #0D2442 55%, #16406E 100%) !important;
}

.hero::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>') !important;
    background-size: cover !important;
}

/* Badge "Certificado y Seguro": estilo glass sobre el fondo oscuro */
.hero-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Ícono decorativo: un poco más visible sobre el fondo oscuro */
.hero-decorative-icon .fa-file-signature {
    opacity: 0.15 !important;
}

/* Banners de mini-tarjetas de seguridad y CTA: mismo degradado del hero */
.stats,
.cta {
    background: linear-gradient(180deg, #000000 0%, #0D2442 55%, #16406E 100%) !important;
}

/* Ocultar el contenedor base en landing page para evitar espacio vacío visible */
body.landing-page .container.mt-4:empty,
body.landing-page .container.mt-4:has(> .alert:only-child),
body.landing-page>.container.mt-4 {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Compacto para landing: reducir padding/espacios y tamaños */
body.landing-page.compact {
    padding-top: 52px !important;
}

body.landing-page.compact .navbar-enterprise.landing {
    padding: 6px 0 !important;
}

body.landing-page.compact .hero {
    padding: 40px 0;
}

body.landing-page.compact .features {
    padding: 40px 0;
}

body.landing-page.compact .services {
    padding: 40px 0;
}

body.landing-page.compact .stats {
    padding: 40px 0;
}

body.landing-page.compact .cta {
    padding: 40px 0;
}

body.landing-page.compact h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

body.landing-page.compact .display-5 {
    font-size: 2rem;
}

body.landing-page.compact .lead {
    font-size: 0.95rem;
}

body.landing-page.compact .feature-card {
    padding: 1.25rem;
}

body.landing-page.compact .service-item {
    padding: 1rem;
}

body.landing-page.compact .quick-actions-grid {
    gap: 0.75rem;
}

body.landing-page.compact .stat-number {
    font-size: 1.6rem;
}

body.landing-page.compact .stat-label {
    font-size: 0.85rem;
}

body.landing-page.compact .btn-landing-primary {
    padding: 10px 22px;
}

body.landing-page.compact .landing-nav-items .nav-link {
    padding: 0.35rem 0.6rem !important;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.fade-out {
    opacity: 1;
    animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.security-spinner {
    color: #007bff;
    animation: spin 2s linear infinite;
}

/* Estilos para las tabs de autenticación */
#authTabs .nav-link {
    color: #6c757d !important;
    border: none;
    border-bottom: 2px solid transparent;
    background: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
}

#authTabs .nav-link:hover {
    color: #007bff !important;
    border-bottom-color: rgba(0, 123, 255, 0.3);
    background: none !important;
}

#authTabs .nav-link.active {
    color: #007bff !important;
    border-bottom-color: #007bff;
    background: none !important;
    font-weight: 600;
}

/* Asegurar que los iconos también tengan el color correcto */
#authTabs .nav-link i {
    color: inherit !important;
}

.tab-content {
    min-height: 300px;
    padding-top: 1rem;
}

/* Mejorar el estilo de la información del proceso de registro */
.alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #0056b3;
}

.alert-info ol {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.alert-info li {
    margin-bottom: 0.25rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Ícono circular con mano blanca en círculo azul El Salvador */
.btn-primary-enterprise .fa-hand-pointer,
.btn-primary-enterprise .fa-info-circle,
.btn-primary-enterprise .fa-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8em;
    height: 1.8em;
    background: #16406E;
    border-radius: 50%;
    color: white !important;
    padding: 0.3em;
}

/* ES: En theme-compact se hereda color oscuro para <i>; forzar blanco en frontpage.
   EN: theme-compact inherits dark color for <i>; force white on frontpage buttons. */
body.theme-compact .hero .btn-primary-enterprise .fa-hand-pointer,
body.theme-compact .hero .btn-primary-enterprise .fa-info-circle,
body.theme-compact .cta .btn-primary-enterprise .fa-play {
    color: #ffffff !important;
}

/* Botón del hero y CTA con mismo tamaño que hero-badge */
.hero .btn-primary-enterprise.btn-lg,
.cta .btn-primary-enterprise.btn-lg {
    font-size: 1rem;
    padding: 6px 16px;
    font-weight: 600;
}

/* Modal de registro compacto y moderno */
#registerModal .modal-dialog {
    max-width: 430px;
}

#registerModal .modal-content {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(14, 42, 72, 0.12);
}

#registerModal .modal-header {
    padding: 0.95rem 1rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

#registerModal .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

#registerModal .modal-body {
    padding: 0.95rem 1rem 1rem;
}

#registerModal .register-intro {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: #6b7280;
}

#registerModal .register-actions {
    gap: 0.6rem !important;
}

#registerModal .register-btn {
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 8px;
}

#registerModal .register-btn i {
    font-size: 0.82rem;
}

#registerModal .register-benefits {
    background: #f8fbff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #16406E;
    padding: 8px 10px;
}

#registerModal .register-benefits strong {
    color: #16406E;
    font-size: 0.82rem;
}

#registerModal .register-benefits ol {
    margin: 6px 0 0 0;
    padding-left: 1.1rem;
}

#registerModal .register-benefits li {
    color: #4b5563;
    font-size: 0.77rem;
    line-height: 1.3;
    margin-bottom: 2px;
}

#registerModal .register-note {
    margin-top: 2px;
    font-size: 0.76rem;
    color: #6b7280;
}

#registerModal .register-footer {
    margin-top: 12px !important;
}

#registerModal .register-footer small {
    font-size: 0.77rem;
}

@media (max-width: 768px) {
    #registerModal .modal-dialog {
        max-width: 96%;
        margin: 0.5rem auto;
    }

    #registerModal .modal-header {
        padding: 0.85rem 0.9rem 0.65rem;
    }

    #registerModal .modal-body {
        padding: 0.85rem 0.9rem 0.95rem;
    }

    #registerModal .register-btn {
        font-size: 0.82rem;
        padding: 8px 10px;
    }
}

/* Estilo del logo FirmaHoy con colores de El Salvador. El color en si
   (--primary-main/--gradient-primary, via .navbar-brand y
   .navbar-enterprise.landing .navbar-brand en base_enterprise.html) ya
   no necesita override aqui: vive en un solo lugar. Este bloque solo
   ajusta tamano/spacing especificos del landing. */
.landing-page .navbar-brand {
    font-size: 1.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(22, 64, 110, 0.15);
    transition: all 0.3s ease;
}

/* -webkit-text-fill-color se reafirma porque .navbar-brand (base) lo deja
   en transparent (background-clip:text) y sin esto el color de hover
   quedaria enmascarado. No relacionado a la migracion de color. */
.landing-page .navbar-brand:hover {
    color: #0047AB !important;
    -webkit-text-fill-color: #0047AB !important;
    text-shadow: 0 3px 6px rgba(0, 71, 171, 0.25);
}

/* Navbar de dos líneas en móvil */
.landing-page .navbar-enterprise {
    padding: 10px 0 !important;
}

.landing-page .navbar-enterprise .container {
    flex-wrap: wrap !important;
}

/* Mobile: Ajustes para pantallas pequeñas */
@media (max-width: 991.98px) {

    /* Navbar más compacto en móvil - sin padding y sin border-radius */
    .landing-page .navbar {
        padding: 0.3rem 0.8rem 0 0.8rem !important;
        min-height: auto !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
    }

    /* Hero section pegado al navbar con más altura */
    .landing-page .hero {
        padding-top: 3rem !important;
        margin-top: 0 !important;
    }

    /* Ícono decorativo del hero queda muy pegado al botón en móvil */
    .hero-decorative-icon {
        display: none !important;
    }

    /* Franja de WhatsApp más compacta en móvil */
    .whatsapp-banner {
        padding: 14px 0 !important;
    }

    .whatsapp-banner i {
        font-size: 2rem !important;
    }

    .whatsapp-banner span {
        font-size: 1.05rem !important;
    }

    /* Contenedor principal del navbar más compacto */
    .landing-page .container-fluid {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Logo y selector en la misma línea */
    .landing-page .navbar-brand {
        font-size: 1.3rem !important;
        padding: 0.3rem 0 !important;
        margin-right: 0.5rem !important;
    }

    .landing-page .navbar-brand i {
        font-size: 1.1rem !important;
    }

    /* Hamburguesa normal de 3 líneas, más pequeña */
    .landing-page .navbar-toggler {
        padding: 0.2rem 0.4rem !important;
        font-size: 1rem !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }

    /* Reducir espaciado en el menú colapsado */
    .landing-page #navbarNav {
        margin-top: 0.3rem !important;
    }

    .landing-page .landing-nav-items .nav-link {
        font-size: 0.9rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    .landing-page .landing-nav-items .btn-landing-primary {
        font-size: 0.85rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}

/* Billing Toggle Switch Styles */
.billing-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(22, 64, 110, 0.05);
    border-radius: 50px;
    display: inline-flex;
}

.billing-label {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    cursor: pointer;
}

.billing-label.active {
    color: #16406E;
    font-weight: 600;
}

.billing-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 0;
}

.billing-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.billing-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: all 0.4s ease;
    border-radius: 30px;
}

.billing-slider:hover {
    background-color: #b3b3b3;
    transform: scale(1.05);
}

.billing-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: all 0.4s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.billing-slider {
    background-color: #16406E;
}

input:checked+.billing-slider:hover {
    background-color: #13365E;
}

input:checked+.billing-slider:before {
    transform: translateX(30px);
}

/* Smooth price transitions */
.price-value {
    transition: all 0.3s ease;
}

.billing-note {
    min-height: 20px;
    transition: opacity 0.3s ease;
}

/* Certificaciones Section Styles */
.certifications {
    position: relative;
    overflow: hidden;
}

.certifications::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(22, 64, 110, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.cert-badge {
    padding: 0.85rem 0.75rem;
    border-radius: 12px;
    background: #16406E;
    color: white;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(22, 64, 110, 0.1);
    height: 100%;
}

.cert-badge:hover {
    background: #13365E;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(22, 64, 110, 0.2);
}

.cert-badge i {
    opacity: 1;
    color: white;
}

.cert-badge h6 {
    font-weight: 600;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
    color: white;
}

.cert-badge small {
    font-size: 0.7rem;
    opacity: 0.85;
    color: white;
    line-height: 1.2;
}

.cert-badge-text {
    font-size: 0.75rem;
    opacity: 0.85;
    color: white;
    margin: 0.3rem 0 0;
    line-height: 1.25;
}

.cert-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.cert-badge:hover .cert-logo {
    filter: brightness(1.3);
    transform: scale(1.05);
}

/* Alineación de features con íconos */
.list-unstyled li {
    display: flex;
    align-items: flex-start;
}

.list-unstyled li i {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Botón Plan Personal - Azul El Salvador */
.btn-plan-primary {
    background: #16406E;
    border: 2px solid #16406E;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
}

.btn-plan-primary:hover {
    background: #13365E !important;
    border-color: #13365E !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 64, 110, 0.3);
}

.btn-plan-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(22, 64, 110, 0.2);
}

/* Tarjetas de planes - version compacta */
.plan-card {
    position: relative;
    border: 1px solid #adb5bd;
}

.plan-card-featured {
    border: 2px solid #16406E !important;
    box-shadow: 0 8px 20px rgba(22, 64, 110, 0.15) !important;
}

.plan-badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #16406E;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(22, 64, 110, 0.3);
    z-index: 1;
}

.plan-feature-list li {
    font-size: 0.85rem;
    line-height: 1.35;
}

/* Tarjetas compactas de contacto */
.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.contact-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #16406E;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.contact-card-body h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.contact-card-body p {
    font-size: 0.8rem;
    color: var(--gray-600, #6c757d);
    margin-bottom: 0.35rem;
}

.contact-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #16406E;
    text-decoration: none;
}

.contact-card-link:hover {
    text-decoration: underline;
}

/* ES: acción del modal + email visible en la misma línea. El mailto
   funciona sin JavaScript; el modal no, así que el email queda a la
   vista como camino alternativo. */
.contact-card-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contact-card-email {
    font-size: 0.85rem;
    color: var(--gray-600, #6c757d);
    text-decoration: none;
}

.contact-card-email:hover {
    color: #16406E;
    text-decoration: underline;
}

/* Inline icon styles for notification service title */
.icon-email-inline {
    color: #16406E;
    /* Azul El Salvador */
    font-size: 1em;
    margin-left: 6px;
}

.icon-whatsapp-inline {
    color: #25D366;
    /* Verde WhatsApp oficial */
    font-size: 1em;
    margin-left: 3px;
}

/* Nuestros Servicios - version compacta */
#servicios .service-item {
    padding: 1rem;
    margin-bottom: 0;
}

#servicios .service-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    font-size: 1.05rem;
}

#servicios .service-item h4 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

#servicios .service-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* ES: La intro va al mismo tamaño que las líneas de los dos bloques
   (.services-block-head p) y cabe en una sola línea en escritorio; en
   pantallas chicas envuelve normal. */
#servicios .services-intro {
    font-size: 0.95rem;
}

@media (min-width: 992px) {
    #servicios .services-intro {
        white-space: nowrap;
    }
}

/* ES: Dos bloques (firma electrónica / certificación) dentro de la misma
   sección: etiqueta pequeña, subtítulo y una línea; el segundo bloque
   abre con espacio generoso y una línea divisoria fina. */
#servicios .services-block-head {
    text-align: center;
    margin-bottom: 1rem;
}

#servicios .services-block-head--second {
    margin-top: 2.75rem;
    padding-top: 2.25rem;
    border-top: 1px solid rgba(22, 64, 110, 0.15);
}

#servicios .services-block-head h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #16406E;
    margin-bottom: 0.25rem;
}

#servicios .services-block-head h3 i {
    font-size: 1rem;
    opacity: 0.8;
}

/* ES: Las columnas de Bootstrap ya se estiran al alto de la fila; la
   tarjeta debe llenarlas para que las tres de certificación (y las de
   firma) midan lo mismo aunque su texto sea más corto. */
#servicios .service-item {
    height: 100%;
}

#servicios .services-block-head p {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0;
}

.whatsapp-banner {
    background: transparent;
    padding: 14px 0;
}

.whatsapp-banner i {
    color: #25D366;
    font-size: 2.6rem;
    margin-right: 10px;
    vertical-align: middle;
}

.whatsapp-banner span {
    color: #16406E;
    font-weight: 400;
    font-size: 1.05rem;
    vertical-align: middle;
}

.whatsapp-banner span strong {
    font-weight: 700;
    color: #25D366;
}

/* Tabla comparativa FirmaHoy vs DocuSign */
.comparison-table-frontpage {
    --comparison-winner-bg: rgba(22, 64, 110, 0.06);
}

.comparison-table-frontpage thead th {
    border-bottom-width: 2px;
}

.comparison-table-frontpage tbody td:first-child {
    font-weight: 500;
}

.comparison-table-frontpage tbody td:nth-child(2) {
    background: var(--comparison-winner-bg);
}

/* En móvil las palabras largas ("anticipadamente", "Autenticación")
   fijan un ancho mínimo mayor que la pantalla: se cortan por sílabas y,
   si no hay corte posible, en cualquier punto. */
@media (max-width: 575px) {
    .comparison-table-frontpage > :not(caption) > * > * {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        -webkit-hyphens: auto;
        hyphens: auto;
        overflow-wrap: anywhere;
    }
}

/* Stats banner: cuadricula de mini-tarjetas */
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stats-mini-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stats-mini-icon {
    font-size: 1.1rem;
    color: var(--secondary-light);
    margin-bottom: 0.25rem;
}

.stats-mini-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.stats-mini-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 991px) {
    .stats-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .stats-mini-grid {
        grid-template-columns: 1fr;
    }
}

body.landing-page.compact .stats-mini-card {
    padding: 0.7rem 0.85rem;
}
