﻿/* ==========================================================================
           Reset & Base
           ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
           Variables
           ========================================================================== */
:root {
    --color-primary: #7fbe41;
    --color-primary-dark: #6ba835;
    --color-primary-light: #9BB643;
    --color-secondary: #182952;
    --color-secondary-light: #2C3D85;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
           Container
           ========================================================================== */
.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* ==========================================================================
           Hero Section
           ========================================================================== */
.plans-hero {
    padding: 4rem 0 2rem;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.plans-hero__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #2C3D85;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.plans-hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 2.5rem;
    max-width: 500px;
    margin-inline: auto;
}

/* ==========================================================================
           Billing Toggle
           ========================================================================== */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.billing-toggle__option {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

    .billing-toggle__option:hover {
        color: #2C3D85;
        background: rgba(44, 61, 133, 0.06);
    }

.billing-toggle__option--active {
    color: #2C3D85;
    font-weight: 700;
}

.billing-toggle__switch {
    width: 60px;
    height: 32px;
    background: #2C3D85;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

    .billing-toggle__switch:hover {
        background: #3a4ea0;
    }

.billing-toggle__slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.billing-toggle__slider--right {
    left: calc(100% - 28px);
}

.billing-toggle__savings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9BB643;
    margin-bottom: 2.5rem;
}

    .billing-toggle__savings i {
        font-size: 1.2rem;
        color: #9BB643;
    }


/* ==========================================================================
           Alert
           ========================================================================== */
.alert {
    max-width: 1000px;
    margin: 0 auto 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert i {
    font-size: 1rem;
}

.alert--info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.alert--warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.alert--error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert--success {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

/* ==========================================================================
           Plans Section
           ========================================================================== */
.plans-section {
    padding: 0 0 4rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1000px;
    margin-inline: auto;
}

.plans-grid--hidden {
    display: none;
}

.plans-empty-state {
    grid-column: 1 / -1;
    background: white;
    border: 1px dashed rgba(44, 61, 133, 0.18);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(44, 61, 133, 0.05);
}

.plans-empty-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef1fb 0%, #dce4f7 100%);
    color: #2C3D85;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.plans-empty-state__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2C3D85;
    margin: 0 0 0.4rem;
}

.plans-empty-state__desc {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
           Plan Card - Diseño compacto elegante
           ========================================================================== */
.plan-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

    .plan-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-xl);
    }

/* Card popular */
.plan-card--popular {
    border: 2px solid var(--color-primary);
    box-shadow: 0 10px 40px -10px rgba(127, 190, 65, 0.3);
}

    .plan-card--popular:hover {
        box-shadow: 0 20px 50px -15px rgba(127, 190, 65, 0.4);
    }

/* Badge "Más Popular" */
.plan-card__badge {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #2C3D85;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    z-index: 2;
    white-space: nowrap;
}

    .plan-card__badge i {
        font-size: 0.8rem;
    }

/* Header del card */
.plan-card__header {
    background: var(--color-secondary-light);
    padding: 2rem 1.25rem 2.25rem;
    text-align: center;
    position: relative;
}

/* Cards populares: más espacio arriba para que el badge no tape el título */
.plan-card--popular .plan-card__header {
    padding-top: 3.25rem;
}

.plan-card__header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 28px;
    background-color: #ffffff;
    border-radius: 50% 50% 0 0;
}

.plan-card__name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.plan-card__invoices {
    color: var(--color-primary-light);
    font-weight: 700;
}

/* Body del card */
.plan-card__body {
    padding: 1.5rem 1.25rem 1.75rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plan-card__pricing {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.125rem;
    margin-bottom: 0.25rem;
}

.plan-card__currency {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-secondary-light);
    margin-top: 0.6rem;
}

.plan-card__amount {
    font-family: 'Poppins', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-secondary-light);
    line-height: 1;
}

.plan-card__billing-type {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-secondary-light);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-card__note {
    min-height: 1.6rem;
    max-width: 240px;
    margin: -0.55rem auto 1rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

/* CTA Button */
.plan-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #9BB643;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

    .plan-card__cta:hover {
        background: #8aa63a;
        color: white;
        transform: translateY(-2px);
    }

    .plan-card__cta .btn-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        font-size: 0.65rem;
        flex-shrink: 0;
        color: white;
    }

/* Features list */
.plan-card__features {
    list-style: none;
    padding: 0;
    margin: auto 0 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    width: 100%;
}

    .plan-card__features li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        color: var(--text-secondary);
        padding: 0.3rem 0;
        justify-content: center;
    }

    .plan-card__features i {
        color: var(--color-primary);
        font-size: 0.7rem;
    }

/* ==========================================================================
           Prepaid Section
           ========================================================================== */
.prepaid-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.prepaid-section__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.prepaid-section__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #2C3D85;
    margin: 0 0 0.75rem;
}

.prepaid-section__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 500px;
    margin-inline: auto;
}

.plans-grid--prepaid {
    max-width: 1000px;
}

/* Nota informativa prepago */
.prepaid-note {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 680px;
    margin: 2.5rem auto 0;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(44, 61, 133, 0.12);
    box-shadow: 0 4px 20px rgba(44, 61, 133, 0.08);
}

.prepaid-note__icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    background: #2C3D85;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.prepaid-note__content {
    text-align: left;
}

.prepaid-note__text {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.88rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.7;
}

.prepaid-note__text strong {
    color: #2C3D85;
    font-weight: 700;
}


/* ==========================================================================
           Responsive
           ========================================================================== */
@media (max-width: 900px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .plans-hero {
        padding: 3rem 0 1.5rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .billing-toggle {
        gap: 0.5rem;
    }

    .billing-toggle__option {
        font-size: 0.9rem;
        padding: 0.375rem 0.5rem;
    }

    .plan-card__amount {
        font-size: 2.25rem;
    }

    .prepaid-note {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .prepaid-note__content {
        text-align: center;
    }
}

/* ==========================================================================
           Animaciones
           ========================================================================== */
.plan-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-card:nth-child(1) {
    animation-delay: 0ms;
}

.plan-card:nth-child(2) {
    animation-delay: 75ms;
}

.plan-card:nth-child(3) {
    animation-delay: 150ms;
}

.plan-card:nth-child(4) {
    animation-delay: 225ms;
}

.plan-card:nth-child(5) {
    animation-delay: 300ms;
}

.plan-card:nth-child(6) {
    animation-delay: 375ms;
}
