/* =======================================================
   ESTILOS BLINDADOS DE SERVICIOS (servicios.css) - CARDS GRANDES 3x3
   Prefijo de encapsulamiento: servicios- / servicio-
   ======================================================= */

/* --- HERO SERVICIOS --- */
.servicios-hero {
    height: 50vh; 
    min-height: 500px;
    background-image: url('../img/HeroServicios.jpg'); 
    background-color: var(--azul-intra, #003366);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.servicios-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 51, 102, 0.412); 
    z-index: 1;
}

.servicios-hero-content {
    position: relative;
    z-index: 2;
}

.servicios-hero h1 {
    color: var(--blanco, #ffffff);
    font-size: 3.5rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
    text-align: center;
}

/* --- CONTENEDOR GENERAL --- */
.servicios-section {
    padding: 90px 4%;
    background-color: #ffffff;
}

/* TÍTULOS PRINCIPALES CENTRADOS */
.servicios-title {
    color: var(--azul-intra, #003366);
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 auto 15px auto;
    position: relative;
    display: block;
    text-align: center;
}

.servicios-intro {
    text-align: center !important;
}

.servicios-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 70px;
    height: 3px;
    background-color: var(--rojo-intra, #cc0000);
}

.servicios-lead {
    font-size: 1.35rem;
    color: #4b5563;
    max-width: 900px;
    margin: 30px auto 70px auto;
    line-height: 1.8;
    text-align: center;
}

/* --- FILA DIVIDIDA (IMAGEN Y CAJA DE TEXTO CON EL MISMO LARGO) --- */
.servicio-split-row {
    display: flex;
    align-items: stretch; /* Fuerza a que ambos elementos tengan exactamente la misma altura */
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto 60px auto;
}

.servicio-split-row.servicio-reverse {
    flex-direction: row-reverse;
}

/* Contenedor de la imagen adaptado a la altura de la caja de texto */
.servicio-img-container {
    flex: 0 0 45%;
    height: auto; /* Se ajusta de forma dinámica al alto del texto de al lado */
    min-height: 400px; /* Asegura un tamaño visual óptimo si el texto es corto */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    display: flex;
}

.servicio-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la imagen se deforme cubriendo todo el espacio */
    display: block;
    transition: transform 0.6s ease;
}

.servicio-split-row:hover .servicio-img-container img {
    transform: scale(1.04);
}

/* Recuadro de información */
.servicio-card-box {
    flex: 1;
    background: #f1f5f9;
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.04);
    border-top: 6px solid var(--rojo-intra, #cc0000);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente el contenido dentro de la caja si sobra espacio */
}

.servicio-card-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 51, 102, 0.08);
}

.servicio-card-box h2 {
    color: var(--azul-intra, #003366);
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.servicio-desc {
    color: #334155;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
}

/* Lista de características */
.servicio-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.servicio-features-list li {
    color: #334155;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
}

.servicio-features-list li i {
    color: var(--rojo-intra, #cc0000);
    font-size: 1rem;
    margin-top: 5px;
}

/* Caja destacada inferior */
.servicio-highlight-box {
    background-color: rgba(0, 51, 102, 0.04);
    border-left: 4px solid var(--azul-intra, #003366);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

.servicio-highlight-box p {
    color: var(--azul-intra, #003366);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* --- SECCIÓN DE SERVICIOS ESPECIALES (AMPLIADA) --- */
.servicios-especiales-container {
    margin-top: 90px;
    background-color: #f8fafc;
    padding: 70px 40px;
    border-radius: 22px;
    border: 1px solid rgba(0, 51, 102, 0.05);
    max-width: 1350px; 
    margin-left: auto;
    margin-right: auto;
}

/* TÍTULO DE SERVICIOS ESPECIALES CENTRADO */
.servicios-especiales-title {
    color: var(--azul-intra, #003366);
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 auto 15px auto;
    position: relative;
    display: inline-block;
    text-align: center;
}

.servicios-especiales-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 70px;
    height: 3px;
    background-color: var(--rojo-intra, #cc0000);
}

.servicios-especiales-subtitle {
    color: #555555;
    font-size: 1.2rem;
    margin-bottom: 45px;
    text-align: center;
}

/* --- GRID DE SERVICIOS ESPECIALES (ESTRICTO 3x3 Y GRANDE) --- */
.servicios-especiales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 35px; 
    width: 100%;
    margin: 0 auto;
}

.servicios-especiales-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 51, 102, 0.06);
    border: 1px solid rgba(0, 51, 102, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.servicios-especiales-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 51, 102, 0.12);
}

.servicios-card-img {
    height: 250px; 
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid var(--rojo-intra, #cc0000); 
}

.servicios-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.servicios-especiales-card:hover .servicios-card-img img {
    transform: scale(1.08);
}

.servicios-card-content {
    padding: 35px 30px; 
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.servicios-card-content h3 {
    color: var(--azul-intra, #003366);
    font-size: 1.55rem; 
    font-weight: 700;
    margin-bottom: 14px;
    text-align: center;
}

.servicios-card-content p {
    color: #4b5563;
    font-size: 1.15rem; 
    line-height: 1.7;
    margin: 0;
    text-align: center;
}

/* --- RESPONSIVE PARA TABLETS Y MÓVILES --- */
@media (max-width: 1200px) {
    .servicios-especiales-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 992px) {
    .servicio-split-row, 
    .servicio-split-row.servicio-reverse {
        flex-direction: column;
        gap: 30px;
    }

    .servicio-img-container {
        width: 100%;
        flex: unset;
        height: 280px;
        min-height: unset;
    }

    .servicio-card-box {
        padding: 30px 20px;
    }

    .servicio-features-list li {
        text-align: left;
    }

    .servicio-desc {
        text-align: justify;
    }
    
    .servicios-especiales-container {
        padding: 40px 20px;
    }

    .servicios-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .servicios-especiales-grid {
        grid-template-columns: 1fr; 
    }
}