/* Contenedor del Acordeón Horizontal */
.mediadores-accordion-wrapper {
    display: flex;
    width: 100%;
    gap: 15px;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Tarjeta individual del acordeón */
.mediadores-accordion-item {
    position: relative;
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Hover suave de escala */
.mediadores-accordion-item:hover {
    transform: translateY(-2px);
}

/* Estado activo/expandido */
.mediadores-accordion-item.is-active {
    flex: 3.5;
}

/* Capa oscura superpuesta */
.mediadores-accordion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.5s ease;
    z-index: 1;
}

/* Contenido dentro de la tarjeta */
.mediadores-accordion-content {
    position: relative;
    z-index: 2;
    width: 100%;
    pointer-events: none;
}

/* Título de la categoría */
.mediadores-accordion-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap;
    transition: transform 0.5s ease, margin-bottom 0.5s ease;
}

/* El cuerpo (botón de enlace) se oculta cuando está colapsado */
.mediadores-accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, margin-top 0.4s ease;
}

/* Mostrar botón y animar título cuando está activo/expandido */
.mediadores-accordion-item.is-active .mediadores-accordion-body {
    max-height: 100px;
    opacity: 1;
    margin-top: 15px;
    pointer-events: auto;
}

/* Botón estilo llamada a la acción */
.mediadores-accordion-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    pointer-events: auto;
}

.mediadores-accordion-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.mediadores-accordion-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.mediadores-accordion-btn:hover i {
    transform: translateX(4px);
}

/* Soporte Responsivo / Móviles (Pasa a ser un acordeón vertical para mejor usabilidad) */
@media (max-width: 767px) {
    .mediadores-accordion-wrapper {
        flex-direction: column;
        height: auto !important;
    }
    
    .mediadores-accordion-item {
        height: 120px;
        transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .mediadores-accordion-item.is-active {
        height: 250px;
    }
    
    .mediadores-accordion-title {
        font-size: 1.25rem;
    }
}
