/* ========================================================================
   PROPUESTA 3 - DEGRADADO AZUL CORPORATIVO + BLOQUES SEMI-TRANSPARENTES
   Archivo CSS Personalizado para Macro Servicios Villafuerte
   ======================================================================== */

/* ===================================
   SLIDER - Degradado Azul Corporativo
   =================================== */

.main-slider .slide:before {
    position: absolute;
    content: '';
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    z-index: 1;
    background: linear-gradient(to right, 
        rgba(30, 58, 138, 0.85) 0%,
        rgba(37, 99, 235, 0.65) 25%,
        rgba(59, 130, 246, 0.45) 50%,
        rgba(100, 149, 237, 0.25) 70%,
        transparent 90%
    );
    background-repeat: no-repeat;
}

.main-slider .slide:after {
    position: absolute;
    content: '';
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 200px;
    z-index: 1;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(30, 58, 138, 0.3) 100%
    );
}

/* ===================================
   BLOQUES DE SERVICIOS - Azul Semi-transparente
   =================================== */

.service-block .inner-box:before {
    position: absolute;
    content: '';
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.92) 0%,
        rgba(37, 99, 235, 0.88) 50%,
        rgba(30, 58, 138, 0.90) 100%
    );
    border-radius: 5px;
    transition: all 0.4s ease;
}

.service-block .inner-box {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    padding: 50px 40px 70px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(30, 58, 138, 0.2);
}

.service-block .inner-box:hover:before {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.95) 0%,
        rgba(59, 130, 246, 0.92) 50%,
        rgba(37, 99, 235, 0.94) 100%
    );
}

.service-block .inner-box:hover {
    transform: translateY(-10px);
    border: 2px solid rgba(251, 191, 36, 0.6);
    box-shadow: 
        0 15px 40px rgba(37, 99, 235, 0.4),
        0 0 30px rgba(251, 191, 36, 0.2);
}

.service-block .inner-box .icon {
    position: relative;
    line-height: 1em;
    font-size: 66px;
    color: #ffffff;
    display: inline-block;
    transition: all 500ms ease;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.service-block .inner-box:hover .icon {
    transform: rotateY(180deg) scale(1.1);
    color: #FBB040;
    text-shadow: 
        0 0 30px rgba(251, 191, 36, 0.8),
        0 0 50px rgba(251, 191, 36, 0.4);
}

.service-block .inner-box .btn-style-one {
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.9) 0%,
        rgba(245, 158, 11, 0.9) 100%
    );
    border: 2px solid rgba(251, 191, 36, 0.5);
    transition: all 0.3s ease;
}

.service-block .inner-box:hover .btn-style-one {
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 1) 0%,
        rgba(245, 158, 11, 1) 100%
    );
    border-color: rgba(251, 191, 36, 1);
    box-shadow: 0 5px 20px rgba(251, 191, 36, 0.5);
    transform: scale(1.05);
}

.service-block .inner-box h5:before {
    position: absolute;
    content: '';
    left: 0px;
    bottom: 0px;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, 
        rgba(251, 191, 36, 1) 0%,
        rgba(251, 191, 36, 0) 100%
    );
    transition: all 0.4s ease;
}

.service-block .inner-box:hover h5:before {
    width: 120px;
    background: linear-gradient(to right, 
        rgba(251, 191, 36, 1) 0%,
        rgba(59, 130, 246, 0.8) 100%
    );
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 15px 40px rgba(37, 99, 235, 0.4),
            0 0 30px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow: 
            0 15px 40px rgba(37, 99, 235, 0.6),
            0 0 40px rgba(251, 191, 36, 0.4);
    }
}

.service-block .inner-box:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ===================================
   SECCIÓN CTA
   =================================== */

.cta-section .gradient-layer {
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.85) 0%,
        rgba(37, 99, 235, 0.75) 100%
    );
}


/* ========================================================================
   GALERÍA DE PROYECTOS — Overlays, Títulos Elegantes y Animaciones
   ======================================================================== */

/* -----------------------------------------
   Contenedor base de cada foto
   ----------------------------------------- */
.w3l-gallery .item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.w3l-gallery .item:hover {
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.45);
    transform: translateY(-4px);
}

/* Imagen base */
.w3l-gallery .item img,
.w3l-gallery .item picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s ease;
    filter: brightness(1);
}

.w3l-gallery .item:hover img,
.w3l-gallery .item:hover picture img {
    transform: scale(1.07);
    filter: brightness(0.65) saturate(0.9);
}

/* -----------------------------------------
   Enlace / zoom wrapper
   ----------------------------------------- */
.w3l-gallery .zoom {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

/* -----------------------------------------
   Overlay oscuro de fondo
   ----------------------------------------- */
.w3l-gallery .overlay__hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 20, 60, 0.88) 0%,
        rgba(20, 40, 100, 0.55) 45%,
        rgba(30, 58, 138, 0.15) 75%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 2;
    border-radius: 8px;
}

.w3l-gallery .zoom:hover .overlay__hover {
    opacity: 1;
}

/* -----------------------------------------
   Contenido flotante: título + descripción
   ----------------------------------------- */
.w3l-gallery .hover-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 28px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;

    /* Entrada: deslizamiento desde abajo */
    transform: translateY(22px);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
        opacity 0.4s ease;

    /* Borde izquierdo decorativo */
    border-left: 3px solid #FBB040;
    border-radius: 0 0 8px 0;
}

.w3l-gallery .zoom:hover .hover-content {
    transform: translateY(0);
    opacity: 1;
}

/* -----------------------------------------
   TÍTULO — Moderno y Elegante
   ----------------------------------------- */
.w3l-gallery .hover-content .title {
    display: block;
    font-family: 'Poppins', 'Be Vietnam Pro', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;

    /* Brillo dorado sutil */
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 18px rgba(251, 191, 36, 0.25);

    /* Etiqueta tipo chip sobre el título */
    position: relative;
    padding-bottom: 8px;

    /* Línea separadora dorada animada */
    animation: none;
}

/* Línea dorada bajo el título */
.w3l-gallery .hover-content .title::after {
    content: '';
    display: block;
    margin-top: 7px;
    height: 2px;
    width: 40px;
    background: linear-gradient(to right, #FBB040, rgba(251, 191, 36, 0));
    border-radius: 2px;
    transition: width 0.4s ease 0.1s;
}

.w3l-gallery .zoom:hover .hover-content .title::after {
    width: 80px;
}

/* -----------------------------------------
   SUBTÍTULO / Descripción
   ----------------------------------------- */
.w3l-gallery .hover-content .content {
    display: block;
    font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(203, 220, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);

    /* Entrada con retardo suave */
    transition: opacity 0.3s ease 0.08s;
}

/* -----------------------------------------
   BADGE "PROYECTO" en esquina superior derecha
   ----------------------------------------- */
.w3l-gallery .zoom::before {
    content: 'PROYECTO';
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    font-family: 'Poppins', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #1e3a8a;
    background: rgba(251, 191, 36, 0.92);
    padding: 4px 9px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-6px) scale(0.9);
    transition:
        opacity 0.35s ease 0.05s,
        transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1) 0.05s;
}

.w3l-gallery .zoom:hover::before {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* -----------------------------------------
   ICONO DE ZOOM (lupa) centrado al hover
   ----------------------------------------- */
.w3l-gallery .zoom::after {
    content: '⊕';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    transition:
        opacity 0.35s ease,
        transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
    pointer-events: none;
    line-height: 1;
}

.w3l-gallery .zoom:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* -----------------------------------------
   ENCABEZADO DE LA SECCIÓN — Títulos principales
   ----------------------------------------- */
.w3l-gallery .title-heading-w3 h3.title-style {
    font-family: 'Poppins', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    position: relative;
    display: inline-block;
}

.w3l-gallery .title-heading-w3 h3.title-style::after {
    content: '';
    display: block;
    margin: 10px auto 0;
    height: 4px;
    width: 60px;
    background: linear-gradient(to right, #1e3a8a, #FBB040);
    border-radius: 3px;
}

.w3l-gallery .title-heading-w3 p.lead h4 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #475569;
    letter-spacing: 0.01em;
}

/* -----------------------------------------
   ANIMACIÓN DE ENTRADA DE TARJETAS (scroll)
   ----------------------------------------- */
@keyframes card-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.w3l-gallery .item {
    animation: card-reveal 0.55s ease both;
}

/* Escalonar la entrada de cada columna */
.w3l-gallery .col-lg-4:nth-child(1) .item { animation-delay: 0.0s; }
.w3l-gallery .col-lg-4:nth-child(1) .item.mt-4 { animation-delay: 0.1s; }
.w3l-gallery .col-lg-4:nth-child(2) .item { animation-delay: 0.15s; }
.w3l-gallery .col-lg-4:nth-child(3) .item { animation-delay: 0.25s; }
.w3l-gallery .col-lg-4:nth-child(3) .item.mt-4 { animation-delay: 0.35s; }

/* Filas inferiores */
.w3l-gallery .col-sm-8 .item { animation-delay: 0.1s; }
.w3l-gallery .col-lg-4.col-sm-6 .item { animation-delay: 0.2s; }
.w3l-gallery .col-lg-4.col-sm-6 .item.mt-4 { animation-delay: 0.3s; }

/* -----------------------------------------
   RESPONSIVE — Ajustes para móviles
   ----------------------------------------- */
@media (max-width: 768px) {
    .main-slider .slide:before {
        background: linear-gradient(to right, 
            rgba(30, 58, 138, 0.75) 0%,
            rgba(59, 130, 246, 0.35) 60%,
            transparent 90%
        );
    }

    .service-block .inner-box:hover {
        transform: translateY(-5px);
    }

    /* En móvil los títulos siempre visibles */
    .w3l-gallery .hover-content {
        transform: translateY(0);
        opacity: 1;
        padding: 16px 14px 14px;
    }

    .w3l-gallery .overlay__hover {
        opacity: 1;
        background: linear-gradient(
            to top,
            rgba(10, 20, 60, 0.82) 0%,
            rgba(20, 40, 100, 0.3) 55%,
            transparent 100%
        );
    }

    .w3l-gallery .zoom::before {
        opacity: 0 !important; /* ocultar badge en móvil */
    }

    .w3l-gallery .zoom::after {
        display: none;
    }

    .w3l-gallery .hover-content .title {
        font-size: 0.88rem;
    }

    .w3l-gallery .hover-content .content {
        font-size: 0.70rem;
    }

    .w3l-gallery .title-heading-w3 h3.title-style {
        font-size: 1.8rem;
    }
}

/* ========================================================================
   FIN DEL ARCHIVO CSS PERSONALIZADO
   ======================================================================== */
