/* ESTRUCTURA DEL CARRUSEL */
.lawyers-carousel {
    position: relative;
    width: 100%;
    /* Forzamos que todo empiece desde la izquierda */
    justify-content: flex-start !important; 
    display: flex;
    align-items: center;
}

.lawyers-rail {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    overflow: hidden !important;
    scroll-behavior: smooth;
    /* Ajustamos el padding para que Iván se alinee donde quieres */
    padding: 20px 0 20px 100px; 
    justify-content: flex-start !important;
}

/* BOTONES DE NAVEGACIÓN (FLECHAS) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5); /* Fondo oscuro para que resalten */
    border-radius: 50%;
    width: 45px;
    height: 45px;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover { background: #d4af37; }

/* Posición de las flechas para no tapar a Iván */
#prevLawyer { left: 5px; }
#nextLawyer { right: 10px; }

/* TARJETAS DE ABOGADOS (CHIPS) */
.lawyer-chip {
    flex: 0 0 210px; /* Tamaño fijo para que no se deformen */
    width: 210px !important;
    display: block !important;
    opacity: 0;
    transform: none !important;
    text-align: center;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.lawyer-chip.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lawyer-avatar {
    width: 180px !important;
    height: 180px !important;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    margin: 0 auto 15px;
    border: 3px solid #d4af37;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    /* 1. Forzamos a que el riel permita el "pegado" de fotos */
    .lawyers-rail {
        padding-left: 0; 
        padding-right: 0;
        gap: 0; /* Eliminamos espacio para que el cálculo de 100% sea exacto */
        scroll-snap-type: x mandatory; /* Activa el auto-ajuste */
        justify-content: flex-start !important;
    }

    /* 2. Cada tarjeta ocupa exactamente el ancho disponible */
    .lawyer-chip {
        flex: 0 0 100%; /* Una persona por pantalla */
        width: 100% !important;
        scroll-snap-align: center; /* La persona se alinea al centro al mover las flechas */
    }

    .lawyer-avatar {
        width: 200px !important; /* Un poco más grande para que luzca en móvil */
        height: 200px !important;
    }

    /* 3. Ajustamos las flechas para que no estorben la vista */
    #prevLawyer { left: 10px; }
    #nextLawyer { right: 10px; }
}

#nuestra-gente .container {
    max-width: 85% !important; /* Fuerza el ancho al 85% */
    width: 85%;                /* Asegura que intente ocupar ese espacio */
    margin-left: auto;         /* Centra horizontalmente */
    margin-right: auto;        /* Centra horizontalmente */
}

