/* ═══════════════════════════════════════════════════════════════
   CVEJob.com — Pricing Page Styles
   Premium pricing cards, toggle, FAQ, and checkout styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero Section ──────────────────────────────────────────── */
.pricing-hero {
    text-align: center;
    padding: var(--space-32) 0 var(--space-16);
    position: relative;
    overflow: hidden;
}

.pricing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-hero h1 {
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.pricing-hero .hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ─── Billing Toggle ───────────────────────────────────────── */
.billing-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin: var(--space-12) 0 var(--space-16);
    position: relative;
    z-index: 1;
}

.billing-label {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--duration-normal) var(--ease-default);
    cursor: pointer;
    user-select: none;
}

.billing-label.active {
    color: var(--text-primary);
}

.billing-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    cursor: pointer;
}

.billing-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-glass-strong);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--ease-default);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: transform var(--duration-normal) var(--ease-spring);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.billing-toggle input:checked + .toggle-slider {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.15);
}

.billing-toggle input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

.savings-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
    white-space: nowrap;
}

/* ─── Pricing Grid ─────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    align-items: start;
}

/* ─── Pricing Card Base ────────────────────────────────────── */
.pricing-card {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--duration-normal) var(--ease-default);
    opacity: 0;
    animation: pricingCardIn 0.7s var(--ease-out) forwards;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.25s; }
.pricing-card:nth-child(3) { animation-delay: 0.4s; }

.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* ─── Popular Card (Pro) ───────────────────────────────────── */
.pricing-card.popular {
    border-color: var(--primary-500);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.05));
    transform: scale(1.04);
    z-index: 2;
    box-shadow:
        0 0 60px rgba(99, 102, 241, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card.popular::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-2xl);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--primary-500));
    background-size: 200% 200%;
    animation: borderGradient 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.pricing-card.popular:hover {
    transform: scale(1.04) translateY(-6px);
    box-shadow:
        0 0 80px rgba(99, 102, 241, 0.18),
        0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ─── Lifetime Card ────────────────────────────────────────── */
.pricing-card.lifetime {
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(245, 158, 11, 0.02));
}

.pricing-card.lifetime:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.08), var(--shadow-xl);
}

/* ─── Popular Badge ────────────────────────────────────────── */
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-5);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    white-space: nowrap;
}

.best-value-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-5);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a1a2e;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    white-space: nowrap;
}

/* ─── Plan Header ──────────────────────────────────────────── */
.plan-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-5);
    font-size: 1.5rem;
}

.plan-icon.free {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.2);
    color: var(--gray-400);
}

.plan-icon.pro {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-400);
}

.plan-icon.lifetime-icon {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--amber-400);
}

.plan-name {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.plan-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

/* ─── Price Display ────────────────────────────────────────── */
.price-wrapper {
    margin-bottom: var(--space-8);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
}

.price-currency {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-secondary);
    align-self: flex-start;
    margin-top: 8px;
}

.price-amount {
    font-family: var(--font-heading);
    font-size: var(--text-6xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.popular .price-amount {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lifetime .price-amount {
    color: var(--amber-400);
}

.price-period {
    font-size: var(--text-base);
    color: var(--text-muted);
    font-weight: 400;
    margin-left: var(--space-1);
}

.price-note {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

.price-yearly-note {
    font-size: var(--text-xs);
    color: var(--emerald-400);
    margin-top: var(--space-1);
    font-weight: 500;
}

/* ─── Feature List ─────────────────────────────────────────── */
.feature-list {
    list-style: none;
    margin-bottom: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feature-icon.included {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
}

.feature-icon.excluded {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-600);
}

.feature-item.disabled {
    color: var(--text-muted);
    opacity: 0.5;
}

.feature-item.disabled .feature-text {
    text-decoration: line-through;
    text-decoration-color: var(--gray-600);
}

/* ─── Card CTA Button ─────────────────────────────────────── */
.pricing-card .btn {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: 700;
    border-radius: var(--radius-xl);
    justify-content: center;
}

.pricing-card.popular .btn-primary {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
    font-size: var(--text-lg);
    padding: var(--space-5) var(--space-6);
}

.btn-lifetime {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500)) !important;
    color: #1a1a2e !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
}

.btn-lifetime:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-2px);
    color: #1a1a2e !important;
}

.btn-current-plan {
    background: var(--bg-glass-strong) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-default) !important;
    cursor: default !important;
    box-shadow: none !important;
}

.btn-current-plan:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ─── Comparison Section ───────────────────────────────────── */
.comparison-note {
    text-align: center;
    margin-top: var(--space-12);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.comparison-note i {
    vertical-align: middle;
    margin-right: var(--space-1);
}

/* ─── FAQ Section ──────────────────────────────────────────── */
.faq-section {
    max-width: 720px;
    margin: var(--space-24) auto 0;
    padding: 0 var(--space-4);
}

.faq-section-title {
    text-align: center;
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.faq-section-subtitle {
    text-align: center;
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-bottom: var(--space-12);
}

.faq-item {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-default);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item.active {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.04);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: color var(--duration-fast) var(--ease-default);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.faq-question:hover {
    color: var(--primary-400);
}

.faq-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--duration-normal) var(--ease-spring);
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-400);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-normal) var(--ease-default),
                padding var(--duration-normal) var(--ease-default);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 var(--space-6) var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ─── Money-Back Guarantee ─────────────────────────────────── */
.guarantee-section {
    max-width: 680px;
    margin: var(--space-20) auto 0;
    padding: 0 var(--space-4);
}

.guarantee-card {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-8);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-2xl);
    backdrop-filter: blur(10px);
}

.guarantee-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid rgba(16, 185, 129, 0.25);
    border-radius: 50%;
    color: var(--emerald-400);
}

.guarantee-content h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--emerald-400);
    margin-bottom: var(--space-2);
}

.guarantee-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Social Proof ─────────────────────────────────────────── */
.social-proof {
    text-align: center;
    margin-top: var(--space-16);
    padding: 0 var(--space-4);
}

.social-proof .stats-row {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    flex-wrap: wrap;
}

.social-proof .stat-item {
    text-align: center;
}

.social-proof .stat-number {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-primary);
}

.social-proof .stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ─── Checkout Page ────────────────────────────────────────── */
.checkout-page {
    padding: var(--space-32) 0 var(--space-16);
    max-width: 600px;
    margin: 0 auto;
}

.checkout-page h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-8);
    text-align: center;
}

.order-summary {
    background: var(--gradient-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    backdrop-filter: blur(20px);
    margin-bottom: var(--space-8);
}

.order-summary-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-default);
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
}

.order-row .label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.order-row .value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-5);
    margin-top: var(--space-4);
    border-top: 1px solid var(--border-default);
}

.order-total .label {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.order-total .value {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* PayPal Container */
.paypal-container {
    background: var(--gradient-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    backdrop-filter: blur(20px);
    margin-bottom: var(--space-6);
}

.paypal-container h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

#paypal-button-container {
    min-height: 55px;
}

.payment-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.payment-divider::before,
.payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

.payment-error {
    display: none;
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    color: #ef4444;
    font-size: var(--text-sm);
}

.payment-error.show {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-6);
}

/* ─── Success Page ─────────────────────────────────────────── */
.success-page {
    text-align: center;
    padding: var(--space-32) var(--space-4) var(--space-16);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    margin: 0 auto var(--space-8);
    color: var(--emerald-400);
    animation: successPulse 2s ease-in-out infinite;
}

.success-page h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.success-page .subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 450px;
}

.success-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

.success-feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.success-feature i {
    color: var(--emerald-400);
}

/* Confetti CSS animation */
.confetti-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall var(--fall-duration, 3s) linear forwards;
    animation-delay: var(--fall-delay, 0s);
}

.confetti:nth-child(odd) { border-radius: 50%; }
.confetti:nth-child(even) { border-radius: 2px; }

/* ─── Animations ───────────────────────────────────────────── */
@keyframes pricingCardIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card.popular {
    animation-name: pricingCardInPopular;
}

@keyframes pricingCardInPopular {
    from {
        opacity: 0;
        transform: scale(1.04) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1.04) translateY(0);
    }
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
    }
}

@keyframes confettiFall {
    0% {
        top: -10px;
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 100vh;
        transform: translateX(var(--drift, 50px)) rotate(var(--spin, 720deg));
        opacity: 0;
    }
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        gap: var(--space-6);
    }

    .pricing-card.popular {
        transform: none;
        order: -1;
    }

    .pricing-card.popular:hover {
        transform: translateY(-6px);
    }

    @keyframes pricingCardInPopular {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .pricing-hero h1 {
        font-size: var(--text-4xl);
    }
}

@media (max-width: 768px) {
    .pricing-hero {
        padding: var(--space-24) 0 var(--space-10);
    }

    .pricing-hero h1 {
        font-size: var(--text-3xl);
    }

    .pricing-card {
        padding: var(--space-8);
    }

    .billing-toggle-wrapper {
        margin: var(--space-8) 0 var(--space-10);
    }

    .guarantee-card {
        flex-direction: column;
        text-align: center;
    }

    .social-proof .stats-row {
        gap: var(--space-8);
    }

    .faq-section {
        margin-top: var(--space-16);
    }

    .checkout-page {
        padding: var(--space-24) var(--space-4) var(--space-10);
    }
}

@media (max-width: 480px) {
    .pricing-hero h1 {
        font-size: var(--text-2xl);
    }

    .price-amount {
        font-size: var(--text-5xl);
    }

    .billing-toggle-wrapper {
        flex-wrap: wrap;
        gap: var(--space-3);
    }

    .savings-badge {
        order: 3;
    }
}
