/* ============================================================
   CAMPING CEC - GALLERY CSS (VOLVIENDO A BASE ESTABLE + MARCO DE SEGURIDAD)
   ============================================================ */
/* 2. CONTENEDORES DE SECCIÓN */
.item-section { margin-bottom: 2.5rem !important; }

/* 3. TARJETAS DE SERVICIOS Y GALERÍA */
.card-servicio {
    background: #ffffff;
    padding: 15px !important;
    border-radius: 25px !important;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    /* El overflow: hidden aquí es vital para que la imagen no pise el texto */
    overflow: hidden; 
    cursor: pointer;
}

.card-servicio:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

/* 4. IMÁGENES CON ZOOM INTERNO (NO SUPERPONE) */
.img-galeria-card {
    width: 100% !important;
    height: 170px !important;
    object-fit: cover !important;
    /* Redondeado interno */
    border-radius: 18px !important;
    display: block;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform;
}

/* EFECTO SEGURO: La imagen crece, pero el overflow:hidden de la card
   hace que el crecimiento sea hacia adentro del marco blanco */
.card-servicio:hover .img-galeria-card {
    transform: scale(1.1) !important;
}

/* Título estático y protegido */
.card-servicio h6 {
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    color: #333;
    font-size: 0.85rem;
    /* Aseguramos que el texto nunca se mueva */
    transition: none; 
}

/* 5. SECCIÓN DE PRECIOS */
.card-servicio.p-0 { padding: 0 !important; }
.header-card-color {
    width: 100%; margin: 0;
    background: #f8f9fa !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.featured-price {
    transform: scale(1.1); z-index: 5;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
    margin: 0 20px !important;
    transition: all 0.5s ease;
}

/* 6. LIGHTBOX (DIFUMINADO CRUZADO) */
#lightbox-overlay {
    position: fixed; inset: 0;
    background: rgba(255, 255, 255, 0.8) !important;
    display: none; justify-content: center; align-items: center;
    z-index: 999999 !important;
    backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#lightbox-overlay.active { opacity: 1; display: flex; }

.lightbox-content img {
    max-width: 85vw !important; max-height: 80vh !important;
    width: auto !important; height: auto !important;
    object-fit: contain !important;
    border-radius: 20px;
    border: 8px solid white;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                filter 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform, opacity, filter;
}

.lightbox-content img.cambiando {
    opacity: 0; transform: scale(0.95); filter: blur(10px);
}

/* Flechas y Cierre */
.lightbox-close {
    position: absolute; top: 30px; right: 40px;
    color: #000; font-size: 50px; cursor: pointer;
    z-index: 2000000; transition: 0.3s;
}
.lightbox-close:hover { color: #ff0000; transform: scale(1.1); }

.lightbox-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #000; font-size: 60px; cursor: pointer; padding: 20px;
    z-index: 2000000; opacity: 0.5; transition: 0.3s;
}
.lightbox-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.prev { left: 20px; } .next { right: 20px; }

/* 7. RESPONSIVIDAD */
@media (max-width: 767px) {
    .img-galeria-card { height: 140px !important; }
    .lightbox-arrow { display: none; }
    .lightbox-close { top: 15px; right: 20px; font-size: 40px; }
}