/* --- ESTILOS PARA EL MODAL DE CASOS DE ÉXITO --- */

.client-case-study-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1060; /* Bootstrap usa hasta 1055 para sus modales */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.client-case-study-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.client-case-study-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.client-case-study-modal-overlay.active .client-case-study-modal-content {
    transform: scale(1);
}

.client-case-study-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.client-case-study-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.case-study-carousel {
    flex: 1 1 55%;
    background-color: #333;
}

.case-study-carousel .carousel, 
.case-study-carousel .carousel-inner,
.case-study-carousel .carousel-item {
    height: 100%;
}

.case-study-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-details {
    flex: 1 1 45%;
    padding: 40px;
    overflow-y: auto;
    background: #f9f9f9;
}

.case-study-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.case-study-header .client-logo {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.case-study-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.case-study-section {
    margin-bottom: 30px;
}

.case-study-section .section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0056b3; /* Un azul corporativo */
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-study-section .lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: #555;
    margin-bottom: 20px;
}

.case-study-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
}

/* --- NUEVOS ESTILOS PARA ÁREAS DE IMPACTO --- */
.impact-areas-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.impact-area-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.impact-area-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.impact-area-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.impact-area-icon {
    font-size: 20px;
    color: #0056b3;
    background-color: #e7f1ff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.impact-area-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

.impact-area-item p {
    margin: 0;
    color: #555;
}

.impact-area-item p strong {
    color: #0056b3;
    font-weight: 600;
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .client-case-study-modal-content {
        flex-direction: column;
        height: 95vh;
        width: 95%;
    }

    .case-study-carousel {
        flex: 0 0 40%; /* Altura fija para el carrusel en móvil */
    }

    .case-study-details {
        flex: 1 1 60%;
    }
}

@media (max-width: 768px) {
    .case-study-details {
        padding: 30px;
    }

    .case-study-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .case-study-header h2 {
        font-size: 24px;
    }
}
