/* H2drate Flipbox */

.h2fb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.h2fb-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    min-height: 380px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Capa que aparece al hover: imagen de fondo + gradiente encima */
.h2fb-hover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.h2fb-hover-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(127deg, rgba(225, 54, 140, 0.90) 5.2%, rgba(255, 190, 54, 0.90) 94.8%);
    border-radius: 20px;
}

.h2fb-card:hover .h2fb-hover-bg {
    opacity: 1;
}

/* Contenido siempre por encima */
.h2fb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.h2fb-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 24px;
    transition: filter 0.4s ease;
}

.h2fb-card:hover .h2fb-icon {
    filter: brightness(0) invert(1);
}

.h2fb-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    line-height: 1.3;
    transition: color 0.4s ease;
}

.h2fb-card:hover .h2fb-title {
    color: #ffffff;
}

.h2fb-text {
    font-size: 14px;
    line-height: 1.75;
    color: #555555;
    margin: 0;
    transition: color 0.4s ease;
}

.h2fb-card:hover .h2fb-text {
    color: #ffffff;
}

/* Tablet */
@media (max-width: 900px) {
    .h2fb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 560px) {
    .h2fb-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .h2fb-card {
        min-height: auto;
        padding: 30px 24px;
    }
}
