/* =====================================================
   GALERIAS
===================================================== */

.gallery-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 40px;
}

.gallery-card{
    position: relative;
    display: flex;
    align-items: flex-end;

    /* =========================
       ALTURA MÁS BAJA
       PARA EVITAR PIXELADO
    ========================= */

    min-height: 190px;

    overflow: hidden;

    border-radius: 24px;

    background: #f4f7fb;

    text-decoration: none;

    border: 1px solid rgba(10,45,99,.08);

    box-shadow: 0 12px 30px rgba(0,0,0,.05);

    transition: all .35s ease;
}

.gallery-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(0,70,148,.14);
}

.gallery-card img{
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    /* =========================
       CONTENER IMAGEN
       SIN ESTIRARLA
    ========================= */

    object-fit: cover;

    /* =========================
       CENTRADO VISUAL
    ========================= */

    object-position: center center;

    transition: transform .45s ease;

    /* =========================
       SUAVIZADO
    ========================= */

    image-rendering: auto;

    filter: contrast(1.02) saturate(1.02);
}

.gallery-card:hover img{
    transform: scale(1.03);
}

/* OVERLAY */

.gallery-overlay{
    position: relative;

    width: 100%;

    padding: 18px 20px;

    background: linear-gradient(
        to top,
        rgba(5,20,45,.92) 0%,
        rgba(5,20,45,.45) 60%,
        rgba(5,20,45,0) 100%
    );

    z-index: 2;
}

.gallery-overlay span{
    display: block;

    color: #ffffff;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;

    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* EFECTO BRILLO */

.gallery-card::after{
    content: "";

    position: absolute;
    top: 0;
    left: -120%;

    width: 70%;
    height: 100%;

    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.15) 50%,
        rgba(255,255,255,0) 100%
    );

    transform: skewX(-20deg);

    transition: all .8s ease;

    z-index: 3;
}

.gallery-card:hover::after{
    left: 150%;
}

/* RESPONSIVE */

@media screen and (max-width: 768px){

    .gallery-grid{
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .gallery-card{
        min-height: 180px;
    }

}

@media screen and (max-width: 480px){

    .gallery-card{
        min-height: 160px;
        border-radius: 20px;
    }

    .gallery-overlay{
        padding: 16px;
    }

    .gallery-overlay span{
        font-size: 15px;
    }

}