/* VIXRED — estilos compartidos: animaciones, planes, efectos */

@keyframes vix-fade-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vix-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vix-glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 242, 254, 0.15); }
    50% { box-shadow: 0 0 40px rgba(0, 242, 254, 0.35); }
}

@keyframes vix-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes vix-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes vix-shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Fondo animado */
.vix-bg-animated {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.vix-bg-animated::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(0, 112, 255, 0.15) 0%, transparent 70%);
    animation: vix-float 8s ease-in-out infinite;
}

.vix-bg-animated::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
    animation: vix-float 10s ease-in-out infinite reverse;
}

.vix-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 112, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 112, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

/* Reveal al scroll */
.vix-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.vix-reveal.vix-visible {
    opacity: 1;
    transform: translateY(0);
}

.vix-reveal-delay-1 { transition-delay: 0.1s; }
.vix-reveal-delay-2 { transition-delay: 0.2s; }
.vix-reveal-delay-3 { transition-delay: 0.3s; }
.vix-reveal-delay-4 { transition-delay: 0.4s; }
.vix-reveal-delay-5 { transition-delay: 0.5s; }

/* Hero animado */
.hero-animated h1 {
    animation: vix-fade-up 0.9s ease forwards;
}

.hero-animated p {
    animation: vix-fade-up 0.9s ease 0.15s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-animated .hero-cta {
    animation: vix-fade-up 0.9s ease 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-animated .highlight {
    background: linear-gradient(90deg, #00f2fe, #0070ff, #00f2fe);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: vix-gradient-shift 4s linear infinite;
}

/* Banner promocional */
.vix-promo-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.15));
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: vix-glow-pulse 3s ease-in-out infinite;
}

.vix-promo-banner i {
    font-size: 1.1rem;
}

/* Contenedor de cada plan (badge fuera de la tarjeta) */
.plan-card-outer {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-height: 0;
}

.plan-card-outer .card-vix {
    width: 100%;
    flex: 1;
}

.plan-card-outer--featured {
    padding-top: 4px;
}

.plan-card-outer--featured .badge-popular {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 0 10px;
    flex-shrink: 0;
}

/* Grid de planes */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
    text-align: center;
    padding-top: 8px;
    margin-top: 12px;
    overflow: visible;
    position: relative;
    z-index: 2;
}

/* En la grilla: animación solo con opacidad (evita que queden debajo del título) */
.planes-grid .vix-reveal {
    transform: none;
    opacity: 0;
}

.planes-grid .vix-reveal.vix-visible {
    transform: none;
    opacity: 1;
}

/* Tarjetas de plan mejoradas */
.card-vix {
    background: rgba(13, 22, 45, 0.75) !important;
    border: 1px solid rgba(0, 112, 255, 0.35) !important;
    border-radius: 28px;
    padding: 32px 22px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s ease,
                border-color 0.35s ease;
    height: 100%;
    position: relative;
    overflow: visible;
}

.card-vix::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transform: skewX(-20deg);
    transition: none;
    border-radius: 28px;
    pointer-events: none;
    z-index: 0;
}

.card-vix:hover::before {
    animation: vix-shine 0.8s ease;
}

.planes-grid .card-vix:hover {
    transform: translateY(-8px);
    border-color: #00f2fe !important;
    box-shadow: 0 20px 50px rgba(0, 112, 255, 0.25);
}

.card-vix:hover {
    transform: translateY(-8px);
    border-color: #00f2fe !important;
    box-shadow: 0 20px 50px rgba(0, 112, 255, 0.25);
}

.card-vix .plan-tier {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 6px;
    display: block;
}

.card-vix h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.mega-number {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #00f2fe 0%, #0070ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mega-unit {
    font-size: 0.95rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 12px;
}

.price {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.price small {
    font-size: 0.85rem;
    font-weight: 400;
    color: #94a3b8;
}

.price-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 18px;
}

ul.features {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 22px;
    font-size: 0.88rem;
}

ul.features li {
    margin-bottom: 9px;
    color: #e2e8f0;
    padding-left: 4px;
}

ul.features li i {
    color: #00f2fe;
    margin-right: 8px;
    width: 18px;
}

.btn-vix {
    background: linear-gradient(90deg, #0070ff, #00f2fe);
    background-size: 200% auto;
    color: white !important;
    padding: 13px;
    border-radius: 50px;
    font-weight: 800;
    width: 100%;
    display: block;
    text-decoration: none !important;
    transition: transform 0.3s ease, background-position 0.4s ease, box-shadow 0.3s ease;
    border: none;
}

.btn-vix:hover {
    transform: scale(1.04);
    background-position: right center;
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.35);
    color: white !important;
}

/* Plan destacado */
.card-pro {
    border: 2px solid #fbff00 !important;
    animation: vix-glow-pulse 4s ease-in-out infinite;
}

.card-pro .mega-number {
    background: linear-gradient(180deg, #fbff00 0%, #ff9800 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.card-pro ul.features li i {
    color: #fbff00;
}

.card-pro .plan-tier {
    color: #fbff00 !important;
}

.card-vix ul.features li .fa-gift {
    color: #28a745;
}

.card-pro ul.features li .fa-gift {
    color: #fbff00 !important;
}

.card-pro .btn-vix {
    background: linear-gradient(90deg, #fbff00, #ffc107);
    color: #0a1628 !important;
}

.card-pro .btn-vix:hover {
    color: #0a1628 !important;
    box-shadow: 0 8px 25px rgba(251, 255, 0, 0.4);
}

.badge-popular {
    background: linear-gradient(90deg, #fbff00, #ffc107);
    color: #0a1628;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.main-content .container {
    overflow: visible;
}

.main-content .vix-title-block {
    position: relative;
    z-index: 0;
    margin-bottom: 40px;
    padding-bottom: 4px;
    isolation: isolate;
}

/* Acentos por tier */
.tier-start .plan-tier { color: #cd7f32; }
.tier-basic .plan-tier { color: #c0c0c0; }
.tier-family .plan-tier { color: #00f2fe; }
.tier-premium .plan-tier { color: #ffd700; }
.tier-gamer .plan-tier { color: #ff416c; }

.tier-gamer .mega-number {
    background: linear-gradient(180deg, #ff416c 0%, #ff4b2b 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Comparativa mercado */
.vix-market-note {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 16px;
    padding: 20px 28px;
    margin: 30px auto 10px;
    max-width: 900px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.vix-market-note strong {
    color: #00f2fe;
}

/* Navbar y menú Servicios */
.header-vix {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(13, 22, 45, 0.95) !important;
}

.nav-item.dropdown {
    position: relative !important;
}

.header-vix .dropdown-menu {
    background: linear-gradient(135deg, #ff1e1e 0%, #ff5e3a 100%) !important;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    padding: 6px 0;
    margin: 0;
    display: none;
    float: none;
    z-index: 1060;
}

/* Evitar que Bootstrap deje el menú blanco encima del contenido */
.navbar .dropdown-menu.show {
    background: linear-gradient(135deg, #ff1e1e 0%, #ff5e3a 100%) !important;
}

.header-vix .dropdown-item {
    color: #fff !important;
    padding: 11px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.header-vix .dropdown-item:last-child {
    border-bottom: none;
}

.header-vix .dropdown-item:hover {
    color: #00f2fe !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        width: auto;
        margin-top: 4px !important;
    }

}

@media (max-width: 991.98px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: none !important;
    }

    .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: static !important;
        width: 100%;
        margin: 8px 0 12px;
        box-shadow: none;
    }

    .nav-item.dropdown.show .dropdown-menu {
        display: block !important;
    }
}

/* Navbar scroll */
.header-vix.scrolled {
    background: rgba(5, 10, 26, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Sección planes preview (index) */
.plans-preview {
    padding: 60px 0;
}

.plans-preview .plan-mini {
    background: rgba(13, 22, 45, 0.7);
    border: 1px solid rgba(0, 112, 255, 0.3);
    border-radius: 20px;
    padding: 24px 16px;
    transition: all 0.4s ease;
    height: 100%;
}

.plans-preview .plan-mini:hover {
    transform: translateY(-8px);
    border-color: #00f2fe;
}

.plans-preview .speed {
    font-size: 2.2rem;
    font-weight: 800;
    color: #00f2fe;
    line-height: 1;
}

.plans-preview .plan-name {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 8px 0;
}

.plans-preview .plan-price {
    font-size: 1.4rem;
    font-weight: 700;
}

/* WhatsApp pulse */
.whatsapp-float {
    animation: vix-float 3s ease-in-out infinite;
}

.plans-preview a {
    color: inherit;
}

.plans-preview .plan-price small {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

@media (max-width: 576px) {
    .hero-cta .btn-portal {
        display: block;
        margin: 12px auto !important;
        max-width: 300px;
    }

    .hero-cta .ml-3 {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .mega-number {
        font-size: 3rem;
    }
}

.page-planes .main-content {
    padding-top: 40px;
}

.page-planes .vix-title-block {
    margin-bottom: 48px;
}

.page-planes .planes-grid {
    margin-top: 20px;
}
