/* Reset y Variables Globales (Estilo Ingeniería/Corporativo Duro) */
:root {
    --primary-color: #0d1e36;
    /* Azul Oscuro Sólido */
    --accent-orange: #f26b2b;
    /* Naranja Industrial */
    --accent-orange-hover: #d1511b;
    --text-main: #2b2f33;
    /* Texto principal oscuro y de alto contraste */
    --text-muted: #5e666e;
    --bg-light: #f4f6fa;
    /* Gris técnico claro */
    --bg-lines: #d9e0eb;
    /* Color de bordes y líneas separadoras */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.25s ease-out;
    --shadow-soft: 0 4px 10px rgba(13, 30, 54, 0.05);
    /* Sombra casi imperceptible, más seca */
    --shadow-large: 0 10px 30px rgba(13, 30, 54, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #ffffff;
    /* Eliminamos fondos de IA-puntos, buscamos limpieza absoluta tipo papel o plano */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    /* Extra bold para impacto industrial */
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.2rem;
    text-transform: uppercase;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

/* Clases Utilitarias Estructurales */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.text-center {
    text-align: center;
}

.text-orange {
    color: var(--accent-orange) !important;
}

.text-blue {
    color: var(--primary-color) !important;
}

.text-white {
    color: #ffffff !important;
}

/* Eliminamos bordes redondeados y glassmorphism */
.bg-light {
    background-color: var(--bg-light);
    border: 1px solid var(--bg-lines);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.shadow-large {
    box-shadow: var(--shadow-large);
}

.rounded-image {
    border-radius: 4px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.oval-image {
    border-radius: 4px;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Imagen lateral de sección valor */

/* Botones estilo Firma de Ingeniería */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 2px;
    /* Corte recto/ligeramente suavizado en bordes */
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-orange);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.05rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--bg-lines);
    /* Bordes rígidos */
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reducción ligera del gap para ahorrar espacio */
    font-size: 1.25rem;
    /* Achicamos la fuente para que entre todo de largo */
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
    /* Evitamos que el texto haga salto de línea (wrap) */
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--accent-orange);
}

.logo-img {
    height: 56px;             /* un poco más alto ahora que está solo */
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
    mix-blend-mode: multiply; /* Elimina fondo blanco en tema claro */
}

.logo:hover .logo-img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

/* Tagline junto al logo */
.logo-tagline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
    border-left: 2px solid var(--bg-lines);
    padding-left: 14px;
    margin-left: 4px;
    white-space: nowrap;
}

.logo-tagline strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
    letter-spacing: -0.3px;
}

/* Dark mode */
body.dark-theme .logo-tagline {
    color: #a0aab5;
    border-color: #334155;
}

body.dark-theme .logo-tagline strong {
    color: #f8fafc;
}

/* En móvil: visible pero compacto */
@media (max-width: 768px) {
    .logo-tagline {
        font-size: 0.62rem;
        padding-left: 10px;
        border-left-width: 1px;
        white-space: normal;    /* permite que haga wrap si es necesario */
        max-width: 140px;
        line-height: 1.3;
    }

    .logo-tagline strong {
        font-size: 0.68rem;
    }
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.nav-links a:not(.btn):hover {
    color: var(--accent-orange);
}

/* Botones de herramienta integrados en el navbar */
.nav-tool-btn {
    /* Borde muy suave — no compite con el botón naranja */
    border: 1px solid #e2e8f0;
    background: transparent;
    font-size: 0.85rem;
    width: 36px;
    height: 36px;
    color: var(--primary-color);
    /* Sin margin-left aquí: el gap del flexbox + el separador lo manejan abajo */
    margin-left: 0;
}

.nav-tool-btn:hover {
    background-color: var(--bg-light);
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

/* Separador visual: espacio generoso antes del primer tool-btn */
.nav-links .nav-tool-btn:first-of-type {
    margin-left: 14px;
}

/* Respiración extra antes del botón naranja CTA */
.nav-links .btn {
    margin-left: 10px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Sections Global */
.section {
    padding: 80px 0;
    position: relative;
    background-color: #ffffff;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* Para el navbar fijo */
    overflow: hidden;
}

/* Background Carousel */
.hero-bg-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    /* Transición suave crossfade */
}

.carousel-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    /* Aumentado para mayor legibilidad */
    z-index: 2;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 3;
    /* Por encima del overlay */
}

.hero-text-box {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    animation: slideInUp 1s ease-out;
}

.hero-title {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.8);
    /* Mayor sombra para micro-contraste */
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: #ffffff;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}



/* Valor Proposition */
.valor-section {
    padding-top: 40px;
}

.section-header {
    margin-bottom: 3rem;
    text-align: left;
    /* Alineación izquierda en lugar de centrada para verse más corporativo */
    border-left: 5px solid var(--accent-orange);
    padding-left: 20px;
}

.icon-badge {
    background-color: var(--primary-color);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 2px;
    /* Cuadrado industrial en lugar de círculo */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.valor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.valor-text {
    min-width: 0;
    /* Evita que el grid explote por el track width:max-content */
}

.valor-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: justify;
}

/* ── Carrusel automático de riesgos ── */
.riesgos-slider {
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
    /* Fade suave y más ancho en los bordes — evita que los logos se "mueran" bruscamente */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.riesgos-track-auto {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scrollRiesgos 14s linear infinite;
}

/* Pausa al pasar el mouse */
.riesgos-slider:hover .riesgos-track-auto {
    animation-play-state: paused;
}

@keyframes scrollRiesgos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Cada card — mismo tamaño fijo */
.riesgo-card {
    flex: 0 0 260px;
    width: 260px;
    background: #fff;
    border: 1px solid var(--bg-lines);
    border-top: 3px solid transparent;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-top-color 0.25s ease, box-shadow 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.riesgo-card:hover {
    border-top-color: var(--accent-orange);
    box-shadow: 0 14px 36px rgba(13, 30, 54, 0.18);
    transform: scale(1.03) translateY(-4px);
}

/* ── Fase 1.1: Wrapper semántico de enlace ── */
a.riesgo-card-link {
    flex: 0 0 260px;
    width: 260px;
    display: block;
    text-decoration: none;
    color: inherit;
    outline-offset: 3px;
}

a.riesgo-card-link>.riesgo-card {
    flex: none;
    width: 100%;
}

a.riesgo-card-link:hover>.riesgo-card {
    border-top-color: var(--accent-orange);
    box-shadow: 0 14px 36px rgba(13, 30, 54, 0.20);
    transform: scale(1.03) translateY(-4px);
}

/* Imagen — misma altura en todas */
.circle-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.circle-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.riesgo-card:hover .circle-img-container img {
    transform: scale(1.06);
}

/* Título */
.riesgo-card h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--primary-color);
    padding: 16px 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dark mode */
body.dark-theme .riesgo-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.dark-theme .riesgo-card h3 {
    color: #f8fafc;
}



/* Seguro Hipotecario */
.container-flex {
    display: flex;
    align-items: center;
    gap: 50px;
}

.seguro-image-col,
.seguro-text-col {
    flex: 1;
}

/* ── Carrusel crossfade de la sección seguro ── */
.seguro-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
}

.seguro-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: 4px;
}

.seguro-slide.active {
    opacity: 1;
}

.card-text {
    background: #fff;
    padding: 40px;
    border-radius: 0;
    /* Cero radio */
    border: 1px solid var(--bg-lines);
    border-left: 5px solid var(--accent-orange);
}

.highlight-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--primary-color);
}

hr {
    border: 0;
    border-top: 1px solid var(--bg-lines);
    margin: 20px 0;
}

/* Nosotros */
.nosotros-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.nosotros-box {
    background: #fff;
    padding: 40px;
    border: 1px solid var(--bg-lines);
    /* Borde geométrico */
    border-top: 4px solid var(--primary-color);
}

.icon-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.icon-header.center {
    justify-content: center;
}

.icon-header i {
    font-size: 2rem;
    display: flex;
    align-items: center;
}

.icon-header h3 {
    margin: 0;
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: stretch;
}

.valor-item {
    background: #fff;
    padding: 35px 25px;
    border-radius: 0;
    /* Cero radio */
    text-align: left;
    /* Alineado izq */
    border: 1px solid var(--bg-lines);
    border-top: 3px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.valor-item:hover {
    border-top-color: var(--accent-orange);
    box-shadow: var(--shadow-soft);
}

/* Consistencia de íconos: mismo peso visual (regular/outline) para todos los valores */
.valor-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    /* Forzamos estilo outline (fa-regular) para uniformidad visual */
    font-style: normal;
    line-height: 1;
}

.valor-item h4 {
    margin-bottom: 10px;
    font-family: var(--font-body);
}

/* Elegirnos - Dark section with texture */
.dark-section {
    background-color: var(--primary-color);
    color: #fff;
}

/* ── Fase 2: Parallax Section ── */
.parallax-section {
    background-image: url('../assets/images/im6.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-color);
    /* fallback */
    position: relative;
}

.parallax-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 10, 30, 0.80);
    z-index: 0;
    pointer-events: none;
}

.parallax-section>.container {
    position: relative;
    z-index: 1;
}

/* ── Fase 2.3: Word Ticker (slot machine vertical) ── */
.trust-words-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    overflow: hidden;
}

.trust-static {
    color: #a0aec0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.word-ticker-wrapper {
    overflow: hidden;
    height: 2.8rem;
    display: flex;
    align-items: center;
}

.word-ticker-track {
    display: flex;
    flex-direction: column;
    animation: tickerSlide 9s ease-in-out infinite;
}

.ticker-word {
    display: block;
    height: 2.8rem;
    line-height: 2.8rem;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--accent-orange);
    white-space: nowrap;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

@keyframes tickerSlide {

    0%,
    23% {
        transform: translateY(0);
    }

    30%,
    55% {
        transform: translateY(-2.8rem);
    }

    62%,
    87% {
        transform: translateY(-5.6rem);
    }

    94%,
    100% {
        transform: translateY(-8.4rem);
    }
}

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

.lead-white {
    font-size: 1.2rem;
    color: #e0e6ed;
    margin-bottom: 2rem;
}

.diferenciadores-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.05rem;
}

.diferenciadores-list i {
    margin-top: 5px;
}

.compromiso-text {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--accent-orange);
    border-left: 3px solid var(--accent-orange);
    padding-left: 15px;
}

/* ── Panel ticker derecho (reemplaza cuadro blanco) ── */
.elegirnos-ticker-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    min-height: 380px;
}

.ticker-label-top {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.big-ticker-wrapper {
    overflow: hidden;
    height: 5.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    position: relative;
}

.big-ticker-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bigTickerSlide 9s ease-in-out infinite;
    will-change: transform;
}

.big-ticker-word {
    display: block;
    height: 5.5rem;
    line-height: 5.5rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 900;
    color: var(--accent-orange);
    white-space: nowrap;
    letter-spacing: 2px;
    text-transform: uppercase;
    flex-shrink: 0;
}

@keyframes bigTickerSlide {

    0%,
    22% {
        transform: translateY(0);
    }

    28%,
    50% {
        transform: translateY(-5.5rem);
    }

    56%,
    78% {
        transform: translateY(-11rem);
    }

    84%,
    100% {
        transform: translateY(-16.5rem);
    }
}


/* Footer / Contacto */
.footer {
    background-color: #f0f4f8;
    position: relative;
    padding: 80px 0 0 0;
    /* Quitamos el padding inferior para que el footer dark llegue al borde */
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-methods p {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.footer-form-container {
    background: #fff;
    padding: 50px 50px 32px 50px;
    /* padding-bottom extra para que el botón respire */
    border-radius: 0;
    border: 1px solid var(--bg-lines);
    border-top: 5px solid var(--accent-orange);
    position: relative;
    top: -50px;
    /* Sobre sale hacia arriba */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 0;
    background-color: #fcfcfc;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px rgba(242, 107, 43, 0.2);
}

.btn-block {
    width: 100%;
}

/* Social Proof: Logos Slider */
.overflow-hidden {
    overflow: hidden;
    width: 100%;
}

.logos-slider {
    width: 100%;
    margin-top: 10px;
    padding: 10px 0;
}

.logos-track {
    display: flex;
    width: max-content;
    gap: 80px;
    animation: scrollLogos 25s linear infinite;
    align-items: center;
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 40px));
    }
}

.logo-item {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--text-muted);
    /* Fallback */
    filter: grayscale(100%);
    opacity: 0.4;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    /* Retoma protagonismo en hover */
    color: var(--primary-color);
}

.pb-4 {
    padding-bottom: 2rem;
}

.pt-0 {
    padding-top: 0;
}

.text-muted {
    color: var(--text-muted);
}

/* Social Proof: Testimonios */
.testimonios-section {
    background-color: #ffffff;
}

.testimonios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 2rem;
}

.testimonio-card {
    background: var(--bg-light);
    padding: 40px;
    border: 1px solid var(--bg-lines);
    position: relative;
    border-top: 3px solid var(--primary-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    /* Para alinear con stretch */
}

.testimonio-card:hover {
    box-shadow: var(--shadow-soft);
    border-top-color: var(--accent-orange);
}

.testimonio-card::before {
    content: "\201C";
    font-size: 5rem;
    color: rgba(13, 30, 54, 0.05);
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
    line-height: 1;
}

.stars {
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.testimonio-text {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

.testimonio-author {
    margin-top: auto;
    /* Empuja el autor hasta abajo si hay espacio sobrante */
    padding-top: 25px;
    display: flex;
    flex-direction: column;
}

.testimonio-author strong {
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.testimonio-author span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer Legal Bottom */
.footer-legal {
    background-color: var(--primary-color);
    color: #e0e6ed;
    padding: 50px 0 20px 0;
    margin-top: 20px;
    font-size: 0.95rem;
}

.legal-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.legal-info p {
    margin-bottom: 5px;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: right;
    align-items: flex-end;
}

.legal-links a {
    color: #e0e6ed;
    font-weight: 500;
}

.legal-links a:hover {
    color: var(--accent-orange);
}

.libro-reclamaciones {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.libro-reclamaciones:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-orange);
}

.copyright-line {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.copyright-line p {
    margin-bottom: 0;
}

/* WhatsApp Flotante — único protagonista en la esquina inferior derecha */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    z-index: 200;
    transition: transform 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}

.whatsapp-btn:hover {
    transform: scale(1.12);
    background-color: #128C7E;
    color: white;
}

/* Fade-In Animation Support */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

/* Floating UI Components — solo scroll-top subsiste aquí, lang/theme se mueven al navbar */
.floating-tools {
    display: none;
    /* Movido al navbar — mantenemos el div por si main.js lo referencia */
}

.tool-btn {
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
    font-size: 1rem;
    border: 1px solid var(--bg-lines);
    background: transparent;
}

.tool-btn:hover {
    background-color: var(--bg-light);
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.lang-btn {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Scroll-top: aparece solo tras mucho scroll (600px) — invisible por defecto */
.scroll-top {
    position: fixed;
    right: 30px;
    bottom: 110px;
    width: 46px;
    height: 46px;
    background: #ffffff;
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 150;
    border: 1px solid var(--bg-lines);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    color: var(--accent-orange);
    background-color: var(--bg-light);
}

/* Dark Theme overrides */
body.dark-theme {
    --primary-color: #64b5f6;
    /* Lighter blue for dark theme */
    --text-main: #e0e6ed;
    --text-muted: #a0aab5;
    --bg-light: #1e293b;
    --bg-lines: #334155;
    background-color: #0f172a;
}

/* Color updates for dark mode */
body.dark-theme .navbar,
body.dark-theme .hero,
body.dark-theme .section,
body.dark-theme .testimonios-section,
body.dark-theme .footer {
    background-color: #0f172a;
}

body.dark-theme .bg-light,
body.dark-theme .nosotros-box,
body.dark-theme .valor-item,
body.dark-theme .riesgo-card,
body.dark-theme .card-text,
body.dark-theme .footer-form-container,
body.dark-theme .testimonio-card,
body.dark-theme .bg-white-card {
    background-color: #1e293b;
    border-color: #334155;
    color: #e0e6ed;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea,
body.dark-theme .form-group select {
    background-color: #0f172a;
    border-color: #334155;
    color: #e0e6ed;
}

body.dark-theme .form-group input::placeholder,
body.dark-theme .form-group textarea::placeholder {
    color: #64748b;
}

body.dark-theme .dark-section,
body.dark-theme .footer-legal {
    background-color: #0b1120;
}

body.dark-theme .text-blue {
    color: var(--primary-color) !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #f8fafc;
}

body.dark-theme .text-orange {
    color: var(--accent-orange) !important;
}

body.dark-theme .logo,
body.dark-theme .logo-item {
    color: #f8fafc;
}

body.dark-theme .logo-img {
    mix-blend-mode: screen;
    filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

body.dark-theme .logo:hover .logo-img {
    filter: invert(1) hue-rotate(180deg) brightness(1.35);
}

body.dark-theme .nav-links a:not(.btn) {
    color: #e0e6ed;
}

body.dark-theme .scroll-top {
    background: #1e293b;
    border-color: #334155;
    color: #e0e6ed;
}

/* Navbar tool-btns en dark mode */
body.dark-theme .nav-tool-btn {
    color: #e0e6ed;
    border-color: #334155;
}

body.dark-theme .nav-tool-btn:hover,
body.dark-theme .scroll-top:hover {
    background: #334155;
    border-color: var(--accent-orange);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .valor-content,
    .container-flex,
    .nosotros-top,
    .elegirnos-grid,
    .footer-content,
    .testimonios-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .legal-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .legal-links {
        align-items: center;
        text-align: center;
    }

    .riesgos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .valores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-form-container {
        top: 0;
    }

    .container-flex {
        flex-direction: column-reverse;
    }

    /* Carrusel seguro: altura explícita en móvil */
    .seguro-image-col {
        width: 100%;
    }

    .seguro-carousel {
        width: 100%;
        min-height: 260px;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 768px) {

    /* ── Ajuste de logo para evitar choque con menú ── */
    .logo {
        font-size: 1rem !important;
        /* Más pequeño para móviles */
        gap: 6px;
    }

    .logo-icon {
        font-size: 1.4rem;
    }

    /* ── Botón hamburguesa ── */
    .mobile-menu-btn {
        display: block;
    }

    /* ── Contenedor del menú desplegable ──
       Usamos body .nav-links para ganar sobre body.dark-theme overrides */
    body .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        /* Siempre blanco en mobile — legibilidad garantizada en cualquier tema */
        background: #ffffff !important;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 20px 0;
        box-shadow: 0 8px 28px rgba(13, 30, 54, 0.16);
        border-radius: 0 0 14px 14px;
        border-top: 3px solid var(--accent-orange);
        display: none;
        z-index: 999;
    }

    body .nav-links.active {
        display: flex;
    }

    /* ── Contraste máximo en los enlaces ── */
    body .nav-links a:not(.btn) {
        color: #0d1e36 !important;
        /* azul marino de marca, siempre oscuro */
        font-weight: 700;
        font-size: 1rem;
        padding: 15px 28px;
        margin: 0;
        border-bottom: 1px solid #e8edf3;
        text-align: left;
        background: transparent;
        display: block;
    }

    body .nav-links a:not(.btn):hover {
        background-color: #f4f6fa !important;
        color: var(--accent-orange) !important;
        padding-left: 38px;
    }

    /* ── Botones de utilidad (ES + tema) ── */
    body .nav-links .nav-tool-btn:first-of-type {
        margin-left: 0;
        border-top: 1px solid #e8edf3;
        margin-top: 4px;
    }

    body .nav-links .nav-tool-btn {
        width: 100% !important;
        height: auto !important;
        border: none !important;
        border-bottom: 1px solid #e8edf3 !important;
        border-radius: 0 !important;
        font-size: 0.95rem;
        font-weight: 600;
        color: #0d1e36 !important;
        background: transparent !important;
        padding: 13px 28px;
        justify-content: flex-start;
        margin: 0;
        text-align: left;
    }

    body .nav-links .nav-tool-btn:hover {
        background-color: #f4f6fa !important;
        color: var(--accent-orange) !important;
    }

    /* ── CTA naranja: protagonista al fondo ── */
    body .nav-links .btn {
        margin: 16px 24px 0 24px !important;
        display: block;
        text-align: center;
        border-radius: 4px;
        width: auto;
    }

    /* ── Hero y grids ── */
    .hero-title {
        font-size: 2.2rem;
    }

    .riesgos-grid,
    .valores-grid {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fase 3: Formulario de Testimonios
───────────────────────────────────────────────────────────────────────────── */
.testimonio-form-wrapper {
    background: var(--bg-light);
    border: 1px solid var(--bg-lines);
    border-top: 4px solid var(--accent-orange);
    padding: 40px;
    margin-top: 3rem;
}

.testimonio-form-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2rem;
}

.testimonio-form-header i {
    font-size: 1.8rem;
}

.testimonio-form-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.testimonio-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.req {
    color: var(--accent-orange);
}

/* ── Honeypot: absolutamente invisible para humanos ── */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Mensajes de feedback del formulario ── */
.form-feedback {
    margin-top: 14px;
    padding: 12px 18px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 0.95rem;
    display: none;
}

.form-feedback:not(:empty) {
    display: block;
}

.feedback-ok {
    background: #d1fae5;
    border-left: 4px solid #059669;
    color: #065f46;
}

.feedback-err {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}

/* Dark mode: testimonio form */
body.dark-theme .testimonio-form-wrapper {
    background-color: #1e293b;
    border-color: #334155;
    color: #e0e6ed;
}

body.dark-theme .feedback-ok {
    background: #064e3b;
    color: #a7f3d0;
    border-color: #059669;
}

body.dark-theme .feedback-err {
    background: #450a0a;
    color: #fca5a5;
    border-color: #dc2626;
}

@media (max-width: 768px) {
    .testimonio-form-grid {
        grid-template-columns: 1fr;
    }

    .testimonio-form-wrapper {
        padding: 24px 20px;
    }
}

/* ======================================================= */
/* MINI-CARRUSEL DE SCROLL INFINITO — Sección Valor        */
/* ======================================================= */

/* 1. Contenedor: ocupa todo el ancho de la columna de texto */
.mini-carrusel-contenedor {
    width: 100%;
    overflow: hidden;
    margin-top: 25px;
    position: relative;
    /* Fade suave en los bordes para un efecto premium */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* 2. La pista que se mueve de forma continua */
.mini-carrusel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    /* -6s: arranca ya a mitad de ciclo, eliminando el flash inicial */
    animation: scroll-suave 12s linear -6s infinite;
    will-change: transform;
}

/* Al pasar el mouse, el carrusel se pausa */
.mini-carrusel-track:hover {
    animation-play-state: paused;
}

/* 3. Imágenes en círculo con borde naranja de marca */
.img-circulo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f26622;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-circulo:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(242, 102, 34, 0.35);
}

/* 4. Keyframe: desplaza el 50% de la pista (un set completo de 4 imgs) */
@keyframes scroll-suave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 8px));
    }
}

/* ── MÓVIL: restaurar exactamente el formato anterior ── */
@media (max-width: 992px) {
    .mini-carrusel-contenedor {
        max-width: 350px;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .img-circulo {
        width: 75px;
        height: 75px;
        border: 2px solid #f26622;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .img-circulo:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}