/* ===========================
   INDUSTRIAS ATENDIDAS 
   =========================== */

#inicio_tipos_clientes {
    background-color: #000;
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 0; 
}

/* Título de la sección */
.industries-header {
    position: absolute;
    top: 40px; 
    left: 0;
    width: 100%;
    z-index: 30; 
    text-align: center;
    pointer-events: none;
}

.industries-header .section-title {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 2px 15px rgba(0,0,0,0.9);
}

/* Degradado superior general */
#inicio_tipos_clientes::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px; 
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    z-index: 15;
    pointer-events: none;
}

/* Contenedor del Acordeón */
.industries-accordion {
    display: flex;
    width: 100%;
    height: 75vh;  
    background: #000;
    gap: 0;
}

/* Cada ficha de industria */
.industry-card {
    position: relative;
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    align-items: flex-end; 
    justify-content: center; 
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

/* FILTRO LATERAL) */
.industry-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Crea la sombra negra a la izquierda que se desvanece a la derecha */
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 30%, transparent 100%);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.industry-overlay {
    position: absolute;
    inset: 0;
    /* Degradado inferior para legibilidad del texto */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);
    z-index: 4;
    transition: opacity 0.5s ease;
}

/* Texto Vertical */
.industry-name {
    position: absolute;
    bottom: 180px;
    z-index: 10;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    white-space: nowrap;
    
    /* Rotación */
    transform: rotate(-90deg);
    transform-origin: center;
    
    letter-spacing: 3px;
    opacity: 0.8;
    transition: all 0.6s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,1);
}

/* --- ESTADO ACTIVO --- */

.industry-card.active {
    flex: 6; /* Expansión */
}

/* Al estar activa, suavizamos los filtros para ver mejor la imagen */
.industry-card.active::after {
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 40%);
}

.industry-card.active .industry-overlay {
    background: rgba(0,0,0,0.3);
}

.industry-card.active .industry-name {
    transform: rotate(0deg); /* Horizontal */
    bottom: 60px; 
    font-size: 2.2rem;
    opacity: 1;
    background: rgba(0,0,0,0.6);
    padding: 10px 30px;
    border-radius: 5px;
    backdrop-filter: blur(8px);
}

/* Encoger las no activas */
.industries-accordion:has(.active) .industry-card:not(.active) {
    flex: 0.4;
    opacity: 0.5;
}

.industries-accordion:has(.active) .industry-card:not(.active) .industry-name {
    opacity: 0; 
}

/* Hover simple */
.industries-accordion:not(:has(.active)) .industry-card:hover {
    flex: 1.8;
}

.industries-accordion:not(:has(.active)) .industry-card:hover .industry-name {
    opacity: 1;
    font-size: 1.3rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .industries-accordion { flex-direction: column; height: auto; }
    .industry-card { width: 100%; height: 100px; }
    .industry-card.active { height: 350px; }
    .industry-name { transform: rotate(0deg); bottom: 20px; font-size: 1rem; }
    .industries-header .section-title { font-size: 1.5rem; top: 20px; }
}