/* =====================================================
   CARDS GASTRONOMÍA - CFL CRISTO REY
===================================================== */

.gastro-cards-section {
    width: 100%;
}

.cards-gastronomia {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1100px;
    height: 420px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.20);
}

.card-gastronomia {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex .5s ease;
}

.card-gastronomia:hover {
    flex: 3;
}

.card-gastronomia a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card-gastronomia img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(50%);
    transition: transform .5s ease, filter .5s ease;
}

.card-gastronomia:hover img {
    transform: scale(1.12);
    filter: grayscale(0);
}

.card-gastronomia::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
}

.card-gastronomia:hover::after {
    opacity: 1;
}

.card-gastronomia-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    max-width: 85%;
    z-index: 2;
    transition: .3s ease;
}

.card-gastronomia:hover .card-gastronomia-title {
    background: rgba(255,255,255,.9);
    color: #111;
    transform: translate(-50%,-50%) scale(1.08);
}

.card-gastronomia-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 25px 20px 20px;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
    transform: translateY(100%);
    transition: transform .4s ease;
    z-index: 3;
}

.card-gastronomia:hover .card-gastronomia-desc {
    transform: translateY(0);
}

.card-gastronomia a:focus-visible {
    outline: 3px solid #f58220;
    outline-offset: 4px;
}


/* MOBILE */

@media(max-width:768px){

    .cards-gastronomia {
        flex-direction: column;
        height: auto;
        border-radius: 15px;
    }

    .card-gastronomia {
        width: 100%;
        height: 280px;
        flex: none;
    }

    .card-gastronomia img {
        filter: none;
    }

    .card-gastronomia::after {
        opacity: 1;
    }

    .card-gastronomia-desc {
        transform: translateY(0);
    }

    .card-gastronomia-title {
        font-size: 18px;
    }
}


/* REDUCIR ANIMACIONES */

@media(prefers-reduced-motion:reduce){

    .card-gastronomia,
    .card-gastronomia img,
    .card-gastronomia-title,
    .card-gastronomia-desc,
    .card-gastronomia::after {
        transition: none;
    }

}