/* ==========================================================================
   1. HERO BANNER DE SERVICIO (Show)
   ========================================================================== */
.servicio-hero {
    width: 100%;
    min-height: 544px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    /* margin-top: 90px;  <-- ELIMINA ESTO */
    padding-top: 90px; /* <-- USA ESTO para dar espacio al texto, no a la sección */
    border-bottom: 5px solid #ff0000;
}

/* Capa oscura degradada para legibilidad del texto */
.servicio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 26, 53, 0.85) 40%, transparent 100%);
    z-index: 1;
}

.servicio-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    padding: 40px 0;
}

/* ==========================================================================
   2. CONTENIDO DETALLE (Caja Blanca)
   ========================================================================== */
.description-box {
    background: #ffffff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border-left: 8px solid #ff0000;
    margin-top: -60px; /* Efecto de solapamiento sobre el Hero */
    position: relative;
    z-index: 3;
}

/* ==========================================================================
   3. CABECERA INDEX (Listado de Servicios)
   ========================================================================== */
.servicios-header {
    padding-top: 180px !important;
    padding-bottom: 80px !important;
    background-color: #001a35 !important;
    border-bottom: 4px solid #ff0000;
}

/* ==========================================================================
   4. CARDS DE SERVICIOS (Vista General)
   ========================================================================== */
.service-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 45px 35px;
    border-radius: 15px;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    border-color: #ff0000;
}

/* ==========================================================================
   5. BOTONES PREMIUM
   ========================================================================== */
.btn-whatsapp-premium {
    background-color: #001a35;
    color: #ffffff !important;
    text-decoration: none;
    padding: 16px 35px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    transition: 0.3s all;
    border-radius: 4px;
    border: none;
}

.btn-whatsapp-premium:hover {
    background-color: #ff0000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.btn-pdf-premium {
    background-color: #ffffff;
    color: #001a35 !important;
    text-decoration: none;
    padding: 16px 35px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #001a35;
    display: inline-flex;
    align-items: center;
    transition: 0.3s;
    border-radius: 4px;
}

.btn-pdf-premium:hover {
    border-color: #ff0000;
    color: #ff0000 !important;
}

/* ==========================================================================
   6. GALERÍA DE REFERENCIA (Visualización del Material)
   ========================================================================== */
.mt-140 {
    margin-top: 140px !important; /* Espacio amplio tras la descripción */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    display: block;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    background-color: #f8f9fa;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 53, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay i {
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ==========================================================================
   7. RESPONSIVE ADAPTATIONS
   ========================================================================== */
@media (max-width: 991px) {
    .servicio-hero {
        min-height: 400px;
        /* CORRECCIÓN: Quitamos el margin que causa el hueco blanco */
        margin-top: 0 !important;
        /* Aumentamos el padding para que el texto no quede tapado por el header móvil */
        padding-top: 120px;
    }

    .servicio-hero::before {
        background: rgba(0, 26, 53, 0.85); /* Un poco más oscuro en móvil para leer mejor */
    }

    .description-box {
        margin-top: -30px; /* Reducimos el solapamiento en móvil para que no coma mucho espacio */
        padding: 25px;
        border-radius: 10px;
    }

    .mt-140 {
        margin-top: 60px !important;
    }

    /* Ajuste de títulos en móvil */
    .servicio-hero h1 {
        font-size: 2rem !important;
    }
}
