/**
 * GMoney Entries Carousel Widget CSS
 * Estilos para tarjetas interactivas de entradas y paginación con dots en formato píldora.
 * Requisitos: PHP 8.2, Elementor Pro, Crocoblock & motion.page compatible.
 */

.gmoney-entries-carousel__wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 5px;
    box-sizing: border-box;
}

/* ==========================================
 * FALLBACK & VISIBILIDAD EN EDITOR DE ELEMENTOR
 * ========================================== */
.gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-wrapper,
.elementor-editor-active .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px;
    overflow-x: auto;
}

.gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide,
.elementor-editor-active .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc(33.333% - 16px) !important;
    width: calc(33.333% - 16px) !important;
    box-sizing: border-box;
    min-width: 220px;
}

@media (max-width: 1023px) {
    .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide,
    .elementor-editor-active .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide {
        flex: 0 0 calc(50% - 12px) !important;
        width: calc(50% - 12px) !important;
    }
}

@media (max-width: 767px) {
    .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide,
    .elementor-editor-active .gmoney-entries-carousel__wrapper:not(.swiper-initialized) .swiper-slide {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

.gmoney-entries-carousel__wrapper .swiper-slide {
    height: auto !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.gmoney-entry-card {
    position: relative;
    width: 100%;
    min-height: 360px;
    height: 420px; /* Altura default en desktop */
    background-color: #182b39; /* Estado normal: color plano #182b39 */
    border-radius: 20px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: background-color 3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 3s cubic-bezier(0.25, 1, 0.5, 1), transform 3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.gmoney-entry-card__link {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

/* ==========================================
 * CAPA DE IMAGEN DESTACADA Y SUPERPOSICIÓN
 * ========================================== */
.gmoney-entry-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1; /* Visible en modo normal para mostrar la imagen destacada */
    transform: scale(1);
    transition: opacity 3s cubic-bezier(0.25, 1, 0.5, 1), transform 3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    z-index: 1;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Capa de Gradiente Radial de Superposición */
.gmoney-entry-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Modo normal: Degradado radial superior izquierdo (#182b39 100% centro -> #182b39 con 20% de transparencia en lados) */
    background: radial-gradient(circle at 0% 0%, #182b39 0%, rgba(24, 43, 57, 0.2) 100%) !important;
    opacity: 1 !important;
    transition: opacity 3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    z-index: 2;
    pointer-events: none;
    will-change: opacity;
}

/* ==========================================
 * CONTENIDO Y TÍTULO (GARANTÍA DE VISIBILIDAD 100%)
 * ========================================== */
.gmoney-entry-card__content {
    position: relative;
    z-index: 10;
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.gmoney-entry-card__title {
    margin: 0;
    padding: 0;
    color: #ffffff !important; /* Título blanco siempre visible */
    font-size: 24px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
    display: block;
    max-height: 4.1em;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 11;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Line-clamp seguro sin colapso de altura */
@supports (-webkit-line-clamp: 3) {
    .gmoney-entry-card__title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

/* ==========================================
 * HOVER INTERACTIVO (TRANSICIÓN ULTRA FLUIDA DE 3 SEGUNDOS)
 * ========================================== */
.gmoney-entry-card:hover .gmoney-entry-card__bg {
    opacity: 1 !important;
    transform: scale(1.04);
}

.gmoney-entry-card:hover .gmoney-entry-card__overlay {
    /* Transición continua y suave de la opacidad al 90% de transparencia */
    opacity: 0.2 !important;
}

/* Selector específico para el bloque en Elementor (.elementor-1294 .elementor-element.elementor-element-79da0fc) */
.elementor-1294 .elementor-element.elementor-element-79da0fc .gmoney-entry-card__bg {
    opacity: 1 !important;
    transition: opacity 3s cubic-bezier(0.25, 1, 0.5, 1), transform 3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.elementor-1294 .elementor-element.elementor-element-79da0fc .gmoney-entry-card__overlay {
    background: radial-gradient(circle at 0% 0%, #182b39 0%, rgba(24, 43, 57, 0.2) 100%) !important;
    opacity: 1 !important;
    transition: opacity 3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.elementor-1294 .elementor-element.elementor-element-79da0fc .gmoney-entry-card:hover .gmoney-entry-card__bg {
    opacity: 1 !important;
    transform: scale(1.04);
}

.elementor-1294 .elementor-element.elementor-element-79da0fc .gmoney-entry-card:hover .gmoney-entry-card__overlay {
    opacity: 0.2 !important;
}

/* Visibilidad de respaldo en el Editor de Elementor */
.elementor-editor-active .gmoney-entry-card__title {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================
 * PAGINACIÓN - DOTS ESTILO PÍLDORA (#0075f4)
 * ========================================== */
.gmoney-entries-carousel__pagination {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 10;
    width: 100%;
}

/* Estilo Base de Bullets (Dots inactivos: 10px x 10px) */
.gmoney-entries-carousel__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background-color: #0075f4 !important;
    background: #0075f4 !important;
    opacity: 0.4;
    margin: 0 !important;
    padding: 0;
    display: inline-block;
    border: none !important;
    outline: none !important;
    box-shadow: none !important; /* Estrictamente sin sombras */
    text-shadow: none !important;
    cursor: pointer;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.35s ease, 
                background-color 0.35s ease, 
                border-radius 0.35s ease;
    will-change: width, opacity;
}

/* Estilo Dot Activo (Expansión Píldora: 30px x 10px) */
.gmoney-entries-carousel__pagination .swiper-pagination-bullet-active {
    width: 30px !important;
    height: 10px !important;
    border-radius: 10px !important;
    background-color: #0075f4 !important;
    background: #0075f4 !important;
    opacity: 1 !important;
    box-shadow: none !important; /* Estrictamente sin sombras */
    outline: none !important;
    border: none !important;
}

/* Directiva de accesibilidad y foco limpio */
.gmoney-entries-carousel__pagination .swiper-pagination-bullet:focus {
    outline: none !important;
    box-shadow: none !important;
}
