:root {
    /* Colores inspirados en el logo */
    --qlm-blue-dark: #0f2f5f;
    --qlm-blue: #163f7a;
    --qlm-blue-light: #1b5fa7;
    --qlm-accent: #2bb0e6;
    --qlm-text: #0e1b2b;
    --qlm-bg-soft: #f4f8fc;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--qlm-text);
    scroll-behavior: smooth;
}

/* Navbar */
.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url(/img/hamburger_qlms.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.navbar {
    background: rgba(15, 47, 95, 0.85);
    backdrop-filter: blur(6px);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
}

.nav-link {
    color: #fff !important;
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
}

.active-menu-link {
    color: #fff !important;
    opacity: 1;
    text-decoration: underline;
}

/* Hero */
.hero {
    min-height: 90vh;
    background: linear-gradient(135deg, var(--qlm-blue-dark), var(--qlm-blue));
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(43,176,230,0.25), transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-weight: 800;
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.btn-primary {
    background: linear-gradient(135deg, var(--qlm-accent), #4fd2ff);
    border: none;
    box-shadow: 0 10px 25px rgba(43,176,230,0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(43,176,230,0.45);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* MAS DE 1000 EMPRESAS */

:root {
    --clr-bg:          var(--qlm-bg-soft);
    --clr-card:        #ffffff;
    --clr-card-border: rgba(27, 95, 167, 0.15);
    --clr-accent:      var(--qlm-accent);
    --clr-accent2:     var(--qlm-blue-light);
    --clr-text:        rgba(33, 37, 41, 0.75);
    --clr-text-light:  var(--qlm-blue-dark);
    --clr-num:         var(--qlm-blue-dark);
    --radius:          20px;
}

.section-legal {
  padding-top: 120px; /* 60px menú + margen extra visual */
  padding-bottom: 80px;
}

/* ─── Sección contenedora ─── */
.section-stats {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

/* Fondo decorativo: círculos difusos */
.section-stats::before,
.section-stats::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .25;
    pointer-events: none;
    z-index: 0;
}
.section-stats::before {
    width: 500px; height: 500px;
    background: var(--qlm-accent);
    top: -180px; left: -150px;
    opacity: .12;
}
.section-stats::after {
    width: 420px; height: 420px;
    background: var(--qlm-blue-light);
    bottom: -160px; right: -120px;
    opacity: .1;
}

/* ─── Título superior ─── */
.stats-title {
    position: relative;
    z-index: 1;
    color: var(--clr-text-light);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -.5px;
    margin-bottom: 12px;
}
.stats-title span {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stats-subtitle {
    position: relative;
    z-index: 1;
    color: var(--clr-text);
    font-size: 1.05rem;
    margin: 0 auto 56px;
}

/* ─── Tarjetas ─── */
.stat-card {
    position: relative;
    z-index: 1;
    background: var(--clr-card);
    border: 1px solid var(--clr-card-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(15, 47, 95, .07);
    padding: 48px 28px 40px;
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(27, 95, 167, .18);
    border-color: var(--qlm-accent);
}

/* Línea superior accentuada */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent2));
}

/* ─── Icono ─── */
.stat-icon-wrap {
    width: 5rem; height: auto;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(43, 176, 230, .12), rgba(27, 95, 167, .1));
    border: 1px solid rgba(43, 176, 230, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.stat-icon-wrap-img {
    width: 5rem;
    height: auto;
}



/* ─── Número grande ─── */
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-num);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 10px;
}
.stat-number .plus {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Etiqueta bajo el número ─── */
.stat-label {
    color: var(--clr-text);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ─── Separador entre tarjetas (desktop) ─── */
@media (min-width: 992px) {
    .stat-card + .stat-card {
    border-left: none;
    }
}

/* ─── Responsive ajustes ─── */
@media (max-width: 767px) {
    .section-stats { padding: 70px 0; }
    .stat-number   { font-size: 2.5rem; }
    .stats-title   { font-size: 1.8rem; }
}
/* Cards */
.service-card {
    border: none;
    border-radius: 1.25rem;
    padding: 2rem;
    height: 100%;
    background: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--qlm-accent), #4fd2ff);
    color: #fff;
    font-weight: 700;
}

.icon-circle img {
  width: 60%;
  height: 60%;
  object-fit: cover;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--qlm-blue), var(--qlm-blue-light));
    color: #fff;
    border-radius: 2rem;
    padding: 4rem 3rem;
}

/* Footer */
footer {
    background: var(--qlm-blue-dark);
    color: rgba(255,255,255,0.8);
}

    .logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.hero-logo {
    max-width: 420px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

.hero-logo-especial {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 992px) {
    .hero-logo {
    max-width: 280px;
    }
}

@media (max-width: 992px) {
    .div-hero-logo {
    display: none;
    }
}


/* Pantalla KAT Treasury */
/* TEXTO COLAPSABLE ANIMADO */
.card-text-wrapper {
    overflow: hidden;
    max-height: 6.2em; /* ~4 líneas */
    transition: max-height .5s ease, opacity .4s ease;
    opacity: .9;
}

.card-text-wrapper.expanded {
    max-height: 500px;
    opacity: 1;
}

.read-more {
    cursor: pointer;
    font-weight: 600;
    color: var(--qlm-accent);
    font-size: 0.9rem;
    display: inline-block;
    margin-top: .5rem;
}

/* CASOS DE ÉXITO */
.case-box {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.video-thumb {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
}

.video-thumb img {
    width: 100%;
    display: block;
    transition: transform .3s ease;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

.video-thumb::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: white;
    background: rgba(0,0,0,.35);
}

.overlay-consent {
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    font-weight:bold;
    z-index: 10;
    border-radius: 0.25rem; /* coincide con tus boxes */
}

/* CLIENTES */

/* Estilos Slider Logos */
.logo-slider {
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slide-track {
    display: flex;
    /* CALCULO DEL ANCHO: 
       Ancho de cada slide (250px) x Cantidad TOTAL de slides (14 en este ejemplo)
       Si cambias la cantidad de logos o el ancho, ajusta este valor.
    */
    width: calc(250px * 14); 
    animation: scrollLogos 40s linear infinite;
}

.logo-slide {
    height: 100px;
    width: 250px; /* Ancho fijo para cada contenedor de logo */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px; /* Espacio entre logos */
}

.logo-slide img {
    max-width: 100%;
    max-height: 80px; /* Altura máxima para que no se desborden */
    object-fit: contain;
    
    /* Efecto visual opcional: Grayscale y Opacidad */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Efecto Hover: Color original */
.logo-slider:hover .logo-slide img {
    /* Pausa opcional si quieres que pare al pasar el mouse */
    animation-play-state: paused; 
}

.logo-slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Section: Clientes */

/* --- ESTILOS PARA LA CUADRÍCULA DE LOGOS --- */

.logo-grid {
    display: grid;
    /* Define 5 columnas de igual ancho */
    grid-template-columns: repeat(5, 1fr);
    /* Espacio entre filas y columnas */
    gap: 2rem; 
    align-items: center;
    justify-items: center;
}

.logo-grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Fondo blanco y bordes redondeados para cada 'tarjeta' de logo */
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    /* Sombra suave opcional */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    width: 100%;
    height: 125px; /* Altura fija para consistencia */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-grid-item img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    
    /* --- EFECTO HOVER (Mismo que en el carrusel) --- */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Al pasar el cursor sobre la 'tarjeta' */
.logo-grid-item:hover {
    transform: translateY(-3px); /* Pequeño efecto de elevación */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Al pasar el cursor, la imagen recupera su color */
.logo-grid-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- RESPONSIVE --- */
/* Para tablets (menos de 992px) cambiamos a 3 columnas */
@media (max-width: 992px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Para móviles (menos de 576px) cambiamos a 2 columnas */
@media (max-width: 576px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .logo-grid-item {
        padding: 1rem;
        height: 80px;
    }
}



/* Animación Keyframes */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Moverse hacia la izquierda exactamente la mitad del ancho total
           (Ancho slide 250px * 7 logos originales = 1750px)
        */
        transform: translateX(calc(-250px * 7)); 
    }
}

/* --- ESTILOS SOLO PARA MÓVIL (Menos de 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Habilitamos el scroll manual en el contenedor padre */
    .logo-slider {
        overflow-x: auto; /* Permite deslizar */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* Suaviza el scroll en iOS */
        scroll-snap-type: x mandatory; /* Opcional: hace que se "pegue" al soltar */
    }

    /* 2. Detenemos la animación y ajustamos el ancho del track */
    .logo-slide-track {
        animation: none; /* Adiós animación automática */
        width: max-content; /* El ancho será la suma real de los logos */
        display: flex;
    }

    /* 3. Ajuste opcional para los items individuales */
    .logo-slide {
        scroll-snap-align: start; /* Para que se alinee bien al deslizar */
        min-width: 150px; /* Hacemos los logos un poco más pequeños en móvil si quieres */
        width: 150px; 
    }

    /* --- TRUCO: OCULTAR LA BARRA DE SCROLL --- */
    /* Chrome, Safari y Opera */
    .logo-slider::-webkit-scrollbar {
        display: none;
    }
    /* IE, Edge y Firefox */
    .logo-slider {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
}