/* === STATS SECTION: VISIBILITY FIX === */

.stats-section-mono {
    background-color: #000000;
    padding: 50px 0;
    border-top: 1px solid #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    overflow: hidden;
    width: 100%;
}

.stats-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* HEADER */
.stats-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
    z-index: 5;
    max-width: 900px;
}

.stats-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    letter-spacing: -1px;
}

.stats-subtitle {
    font-size: 1.1rem;
    color: #888;
    font-weight: 300;
    letter-spacing: 1px;
}

/* CAROUSEL STAGE */
.stats-carousel-wrapper {
    position: relative;
    width: 100%;
    /* Aumentamos altura para que quepa la sombra completa */
    height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.stats-track-container {
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;

    /* MÁSCARA SOLO EN DESKTOP (En móvil la quitamos abajo) */
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.stats-track {
    display: flex;
    gap: 0;
    width: max-content;
    height: 100%;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    padding-left: 0;
}

/* --- TARJETA (BASE) --- */
.stat-card {
    background: #111;
    /* Un poco más gris base */
    border: 1px solid #222;
    border-radius: 18px;
    padding: 40px 30px;

    /* Desktop */
    width: 400px;
    min-width: 400px;
    height: 400px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;

    /* INACTIVO: Subimos opacidad para que SE VEAN */
    opacity: 0.5;
    /* Antes 0.2 (invisible), ahora 0.5 (visible) */
    transform: scale(0.9);
    filter: grayscale(100%);
    transition: all 0.5s ease;
    cursor: pointer;
    margin: 0 20px;
}

/* --- ESTADO ACTIVO (SOLUCIÓN BORDE INFERIOR) --- */
.stat-card.active {
    opacity: 1;
    transform: scale(1);

    /* FONDO CORREGIDO: No termina en negro puro (#000), sino en gris muy oscuro (#0a0a0a) */
    /* Esto evita que se "corte" visualmente contra el fondo negro de la web */
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);

    /* BORDES COMPLETOS: Luz arriba y borde sutil abajo para delimitar */
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    /* Borde blanco sutil abajo */
    border-left: 1px solid #222;
    border-right: 1px solid #222;

    /* SOMBRA */
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 1),
        0 0 20px rgba(255, 255, 255, 0.03);

    z-index: 20;
    filter: grayscale(0%);
}

/* TYPO */
.stat-number {
    font-family: 'Oswald', sans-serif;
    color: #fff;
    font-size: 5.5rem;
    line-height: 0.9;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -3px;
    border-bottom: 2px solid #333;
    width: 100%;
    padding-bottom: 20px;
    background: linear-gradient(to bottom, #fff 40%, #999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card.active .stat-number {
    border-bottom-color: #fff;
}

.stat-desc {
    font-family: 'Montserrat', sans-serif;
    color: #888;
    line-height: 1.5;
    font-size: 1rem;
}

.stat-card.active .stat-desc {
    color: #ddd;
}

.stat-footer {
    width: 100%;
    margin-top: auto;
}

.stat-label {
    font-size: 0.6rem;
    color: #555;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 800;
    display: block;
}

.stat-brand {
    font-size: 1.3rem;
    color: #fff;
    display: block;
    margin-top: 5px;
}

/* NAV & DOTS */
.stats-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.stats-nav:hover {
    background: #fff;
    color: #000;
}

.stats-nav.prev {
    left: 10px;
}

.stats-nav.next {
    right: 10px;
}

.stats-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    /* Un poco de aire */
    position: relative;
    z-index: 30;
}

.stat-dot {
    width: 6px;
    height: 6px;
    background: #333;
    border: none;
    border-radius: 50%;
    padding: 0;
    transition: 0.3s;
}

.stat-dot.active {
    background: #fff;
    transform: scale(1.5);
    box-shadow: 0 0 10px #fff;
}

/* LOGOS */
.logo-adobe {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.logo-forbes {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    letter-spacing: -1px;
    font-size: 1.6rem;
}

.logo-salesforce {
    font-family: 'Varela Round', sans-serif;
    font-weight: 700;
    font-style: italic;
}

.logo-mckinsey {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.7rem;
}

.logo-gallup {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    letter-spacing: 4px;
    font-size: 1.3rem;
}

.logo-ibm {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-bcg {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: -1px;
    font-size: 1.8rem;
}

.logo-deloitte {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-deloitte::after {
    content: '.';
    color: #fff;
}

.logo-hbr {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 2rem;
}

.logo-gartner {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.logo-mit {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.logo-accenture {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: lowercase;
    font-size: 1.6rem;
}

.logo-pwc {
    font-family: 'Georgia', serif;
    font-weight: 700;
    text-transform: lowercase;
    font-size: 1.8rem;
}

.logo-google {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: -1px;
}

/* ========================================= */
/* === MÓVIL (CORRECCIONES FINALES) === */
/* ========================================= */
@media (max-width: 768px) {
    .stats-section-mono {
        padding: 40px 0 60px 0;
    }

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

    /* Altura suficiente para que no se corte la sombra abajo */
    .stats-carousel-wrapper {
        height: 460px;
    }

    /* QUITAMOS LA MÁSCARA EN MÓVIL */
    /* Esto permite que los vecinos se vean completamente, sin difuminarse */
    .stats-track-container {
        mask-image: none;
        -webkit-mask-image: none;
        overflow: visible;
        /* Aseguramos que nada corte */
    }

    .stat-card {
        width: 70vw;
        min-width: 70vw;
        height: 380px;
        padding: 30px 25px;
        margin: 0 10px;
    }

    /* INACTIVAS: Opacidad 0.5 para verlas claramente */
    .stat-card:not(.active) {
        transform: scale(0.85);
        /* Un poco más grandes para que se noten */
        opacity: 0.5;
        /* VISIBLES */
    }

    .stat-number {
        font-size: 4rem;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .stats-nav {
        display: none;
    }
}