/* ==========================================
   SECCIÓN SERVICIOS (Layout Bento Grid + Carrusel)
   ========================================== */
.servicios-section {
    padding: 100px 0;
    position: relative;
    background-image: url('../assets/img/oficinas.jpg'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--color-white);
    overflow: hidden;
}

.servicios-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ⬅️ EL DEGRADADO GENERAL: Oscuro arriba (0% a 65%) y se desvanece a blanco en el piso (100%) */
    background: linear-gradient(to bottom, 
        rgba(13, 22, 33, 0.9) 0%, 
        rgba(13, 22, 33, 0.85) 65%, 
        rgba(255, 255, 255, 1) 100%
    ); 
    z-index: 0;
}

.servicios-section .container {
    position: relative;
    z-index: 1;
    max-width: 1250px;
    margin-left: 8%;
    margin-right: auto;
}

/* --- HEADER SUPERIOR --- */
.servicios-top {
    display: flex;
    justify-content: space-between; /* ⬅️ Empuja el botón a la izq y el logo a la der */
    align-items: center;
    width: 100%;
    margin-bottom: 3rem;
}

.badge-outline-servicios {
    display: inline-block;
    padding: 0.6rem 3.5rem;
    border: 1px solid var(--color-white);
    border-radius: 50px;
    background: #0f1621;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* --- TÍTULOS --- */
/* (El resto de tu código de títulos sigue igual hacia abajo...) */

.servicios-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0; /* ⬅️ CRUCIAL: Evita que CSS Grid/Flexbox aplasten el logo hasta desaparecerlo */
}

.servicios-logo img {
    width: 220px; /* ⬅️ CRUCIAL: Le damos un ancho fijo desde el CSS */
    height: auto;
    opacity: 0.9;
    /* ⬅️ CRUCIAL: Esto forzará al logo a pintarse de blanco puro para que no se camufle con el fondo oscuro */
    filter: brightness(0) invert(1); 
}

.servicios-header {
    margin-bottom: 4rem;
    max-width: 900px;
}

.servicios-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-transform: none;
}

.servicios-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* --- ESTRUCTURA BENTO GRID --- */
.servicios-bento-grid {
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
}

/* Bloque 1: Contenedor de Imagen */
.bento-image-box {
    background: #0f1621;
    padding: 1.2rem;
    border-radius: 35px;
    display: flex;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    min-width: 0;
}

.bento-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

/* Bloque 2: Contenedor Principal del Carrusel */
.bento-services-box {
    background: #0f1621;
    border-radius: 35px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    min-width: 0;
}

/* --- BOTONES DEL CARRUSEL (Flechas) --- */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #0f1621;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
}

.prev-btn { left: -10px; }
.next-btn { right: -10px; }

/* --- ESTRUCTURA DEL CARRUSEL --- */
.carousel-view {
    overflow: hidden;
    width: 100%;
    height: 100%;
    border-radius: 24px; 
    display: flex;
    background: transparent; /* ⬅️ CRUCIAL: Debe ser transparente para que el negro del fondo se asome en los huecos curvos */
}

.carousel-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
    height: 100%;
}

/* === LAS TARJETAS EN CASCADA (Con Degradado de Luz) === */
.servicio-col {
    flex: 0 0 33.3333%;
    min-width: 33.3333%;
    padding: 3rem 2rem;
    
    /* ⬅️ AQUÍ ESTÁ LA MAGIA: Degradado blanco suave arriba que se desvanece hacia el color base abajo */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 70%), #1a2433; 
    
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    box-shadow: 25px 0 30px -10px rgba(0, 0, 0, 0.7);
}

/* Asignamos las capas (z-index) decrecientes para que la sombra caiga sobre la tarjeta correcta */
.servicio-col:nth-child(1) { z-index: 6; }
.servicio-col:nth-child(2) { z-index: 5; }
.servicio-col:nth-child(3) { z-index: 4; }
.servicio-col:nth-child(4) { z-index: 3; }
.servicio-col:nth-child(5) { z-index: 2; }
/* A la última tarjeta le quitamos la sombra para que no manche el borde derecho del carrusel */
.servicio-col:nth-child(6) { z-index: 1; box-shadow: none; }

/* --- INTERIOR DE LAS TARJETAS (LIMPIO Y CORREGIDO) --- */
.servicio-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-circle {
    width: 65px;
    height: 65px;
    background: transparent; /* Permite ver el fondo de tu imagen */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Se eliminó el filtro que ponía blanca la imagen */
}

.servicio-head h3 {
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0;
}

.servicio-col p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   RESPONSIVIDAD SERVICIOS
   ========================================== */
@media (max-width: 1024px) {
    .servicios-bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-image-box {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .servicios-header h2 {
        font-size: 2.2rem;
    }
    
    .servicios-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .bento-services-box {
        padding: 1.5rem;
    }
    
    .servicio-col {
        flex: 0 0 100%;
        min-width: 100%;
        border-radius: 24px;
        box-shadow: none; /* Quitamos la sombra de cascada en móvil */
        margin-bottom: 1rem;
    }
}

/* --- CLASES DE ANIMACIÓN AL SCROLL --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }