.img_conmofunciona {
    position: relative;
    display: flex;
    height: auto;
     max-height: calc(242px * (100vw/1200));
    background-image: url(../img/aliados/banners/Banner_web_como_funciona_web.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    aspect-ratio: 2500/1130;
    z-index: -1;
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .mediaQ3626326 {
        width: 68%;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .mediaQ3626326 {
        width: 60%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .mediaQ3626326 {
        width: 53%;
    }
}

@media (max-width: 768px) {
    .img_conmofunciona {
        background-image: url('../img/aliados/banners/Banner_web_como_funciona_movil.webp');
        background-color: #dc3545;
        max-height: calc(600px * (100vw/944));
        aspect-ratio: 944/600;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .mediaQ3626326 {
        width: 45%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .mediaQ3626326 {
        width: 38%;
    }
}

/* Estilos para animación hover de títulos y párrafos */
.buykfbd_parrafo {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0;
}

.buykfbd_card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buykfbd_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    /* background-image: none; */
}

.buykfbd_card:hover .buykfbd_parrafo {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    max-height: 100px;
    margin-top: 8px !important;
    padding-top: 0;
}

.buykfbd_card:hover .arrow {
    opacity: 0;
    visibility: hidden;
}

/* Estilos para los nuevos cards de categorías */
.category-card-new {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Contenedor de medallas */
.medal-container {
    position: relative;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Medalla estática */
.medal-static {
    transition: all 0.3s ease;
    z-index: 2;
}

/* Medalla animada (oculta inicialmente) */
.medal-animated {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
    opacity: 0;
    z-index: 1;
    animation-fill-mode: forwards;
}

/* Descripción de categoría oculta inicialmente */
.category-description {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    margin-top: 0 !important;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* Animaciones específicas por categoría */
@keyframes bounceInBronce {
    0% { transform: translateX(-50%) scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: translateX(-50%) scale(1.2) rotate(-90deg); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounceInPlata {
    0% { transform: translateX(-50%) scale(0) rotateY(180deg); opacity: 0; }
    50% { transform: translateX(-50%) scale(1.1) rotateY(90deg); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes bounceInOro {
    0% { transform: translateX(-50%) scale(0) rotate(360deg); opacity: 0; }
    50% { transform: translateX(-50%) scale(1.3) rotate(180deg); opacity: 0.7; }
    100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounceInPlatino {
    0% { transform: translateX(-50%) scale(0) rotate(-360deg) rotateY(180deg); opacity: 0; }
    30% { transform: translateX(-50%) scale(0.8) rotate(-180deg) rotateY(90deg); opacity: 0.5; }
    70% { transform: translateX(-50%) scale(1.2) rotate(-90deg) rotateY(45deg); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(1) rotate(0deg) rotateY(0deg); opacity: 1; }
}

/* Hover effects para cada categoría */
.category-card-new[data-category="bronce"]:hover .medal-static {
    opacity: 0;
    transform: scale(0);
}

.category-card-new[data-category="bronce"]:hover .medal-animated {
    animation: bounceInBronce 1.2s ease-out forwards;
}

.category-card-new[data-category="plata"]:hover .medal-static {
    opacity: 0;
    transform: scale(0);
}

.category-card-new[data-category="plata"]:hover .medal-animated {
    animation: bounceInPlata 1.3s ease-out forwards;
}

.category-card-new[data-category="oro"]:hover .medal-static {
    opacity: 0;
    transform: scale(0);
}

.category-card-new[data-category="oro"]:hover .medal-animated {
    animation: bounceInOro 1.4s ease-out forwards;
}

.category-card-new[data-category="platino"]:hover .medal-static {
    opacity: 0;
    transform: scale(0);
}

.category-card-new[data-category="platino"]:hover .medal-animated {
    animation: bounceInPlatino 1.5s ease-out forwards;
}

/* Mostrar descripción al hacer hover */
.category-card-new:hover .category-description {
    opacity: 1;
    max-height: 200px;
    margin-top: 15px !important;
}

.category-card-new:hover .arrow {
    opacity: 0;
    visibility: hidden;
}

/* Efectos adicionales para mejorar la experiencia */
.category-card-new h4 {
    transition: all 0.3s ease;
}

.category-card-new:hover h4 {
    color: #e65c36 !important;
    transform: scale(1.05);
}

/* Colores de borde según categoría al hacer hover */
.category-card-new[data-category="bronce"]:hover {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.category-card-new[data-category="plata"]:hover {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.category-card-new[data-category="oro"]:hover {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.category-card-new[data-category="platino"]:hover {
    border-color: #e5e4e2;
    background: linear-gradient(135deg, rgba(229, 228, 226, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}
