/* --- Estructura del Swiper (Para evitar colapsos de altura en Elementor) --- */
.vm-carousel-plans-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 50px; /* Espacio obligatorio para los puntos */
    display: block;
    overflow: hidden;
}

.vm-carousel-plans-wrapper .swiper-wrapper {
    display: flex;
    align-items: stretch; /* Obliga a que todas las tarjetas midan lo mismo */
}

.vm-carousel-plans-wrapper .swiper-slide {
    height: auto; 
    display: flex; /* Permite que la tarjeta interior ocupe el 100% de la altura */
    box-sizing: border-box;
}

/* --- Aspecto de la Tarjeta --- */
.vm-plan-card {
    position: relative;
    width: 100%;
    min-height: 400px; /* FALLBACK CRÍTICO: Si falla aspect-ratio, la tarjeta medirá esto */
    aspect-ratio: 4 / 5; 
    background-color: #333; /* Fallback si la imagen no carga o es muy lenta */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.vm-plan-card:hover {
    transform: translateY(-5px);
}

/* Overlay (Gradiente) */
.vm-plan-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    transition: background 0.4s ease;
    z-index: 1;
}

.vm-plan-card:hover .vm-plan-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.2) 100%);
}

/* Contenido */
.vm-plan-content {
    position: relative;
    z-index: 2;
    padding: 25px;
    color: #fff;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

/* Textos */
.vm-plan-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.vm-plan-desc {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón Outlined */
.vm-plan-btn {
    display: inline-block;
    padding: 10px 24px;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
    text-align: center;
}

.vm-plan-btn:hover {
    background: #fff;
    color: #000;
}

/* Paginación Swiper */
.vm-carousel-plans-wrapper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}
.vm-carousel-plans-wrapper .swiper-pagination-bullet-active {
    background: #0073aa; 
    width: 15px;
    border-radius: 4px;
}

/* --- FIX CONFLICTO ELEMENTOR SWIPER --- */
/* Evita que Elementor colapse el contenedor antes de que cargue el JS */
.vm-carousel-plans-wrapper:not(.swiper-initialized) > .swiper-wrapper,
.vm-carousel-plans-wrapper:not(.swiper-container-initialized) > .swiper-wrapper {
    overflow: visible !important;
}

/* Opcional: Aseguramos que mientras no esté inicializado, no genere scroll horizontal en la página */
.vm-carousel-plans-wrapper:not(.swiper-initialized) {
    overflow: hidden;
}