/**
 * SIGMIX Pricing Page Styles - Redesigned
 * /css/pricing.css
 * Matches login.css aesthetic with psychological optimization
 * Updated with conversion optimization improvements
 */

/* ========================================
   ANIMATIONS & UTILITIES
======================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.stagger-children > * { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.15s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.25s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.35s; }
.stagger-children.active > * { opacity: 1; transform: translateY(0); }

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.header-spacer { height: 70px; }

/* ========================================
   HERO SECTION
======================================== */
.pricing-hero {
    min-height: 520px;
    display: flex; align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative; overflow: hidden;
    padding: 6rem 0 4rem;
}
.hero-bg-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(7,0,120,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(7,0,120,0.03) 1px, transparent 1px);
    background-size: 50px 50px; opacity: 0.6;
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero-eyebrow {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    color: #fff; padding: 0.5rem 1.25rem; border-radius: 50px;
    font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}
.pricing-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800; color: var(--dark);
    margin-bottom: 1rem; letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--gray);
    line-height: 1.7; margin-bottom: 2rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.btn-primary, .btn-outline, .btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 1rem 1.75rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s ease; cursor: pointer; text-decoration: none; border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; box-shadow: 0 4px 15px rgba(7,0,120,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(7,0,120,0.35); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--gray); padding: 1rem 1rem; }
.btn-ghost:hover { color: var(--primary); }
.hero-trust {
    display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
    font-size: 0.9rem; color: var(--gray);
}
.hero-trust span { display: flex; align-items: center; gap: 0.4rem; }
.hero-trust i { color: var(--accent); }

/* ========================================
   WHY SIGMIX SECTION
======================================== */
.why-section { padding: 5rem 0; background: #fff; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; color: var(--dark); margin-bottom: 0.75rem; }
.section-header p { font-size: 1.1rem; color: var(--gray); }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.why-card {
    background: var(--off-white); border-radius: var(--radius-lg);
    padding: 2rem; text-align: center;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}
.why-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 15px 40px rgba(7,0,120,0.1); }
.why-icon {
    width: 60px; height: 60px; margin: 0 auto 1rem;
    background: var(--primary-glass); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.why-icon i { font-size: 1.5rem; color: var(--primary); }
.why-card:hover .why-icon { background: var(--primary); }
.why-card:hover .why-icon i { color: #fff; }
.why-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.why-card p { font-size: 0.9rem; color: var(--gray); line-height: 1.6; }

.value-anchor {
    margin-top: 2.5rem; text-align: center;
    background: linear-gradient(135deg, rgba(7,0,120,0.05), rgba(16,185,129,0.05));
    border-radius: var(--radius-lg); padding: 1.25rem 2rem;
    border: 1px dashed var(--primary);
}
.value-anchor p { color: var(--dark); font-size: 0.95rem; margin: 0; }
.value-anchor i { color: var(--primary); margin-right: 0.5rem; }

/* ========================================
   TRUST SECTION
======================================== */
.trust-section { padding: 3rem 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.trust-grid { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.trust-item { text-align: center; }
.trust-stat { display: block; font-size: 2.5rem; font-weight: 800; color: #fff; }
.trust-label { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.trust-tagline { text-align: center; margin-top: 1.5rem; color: rgba(255,255,255,0.9); font-size: 0.95rem; }

/* ========================================
   CURRENCY BAR
======================================== */
.currency-bar { padding: 1.5rem 0; background: var(--off-white); border-bottom: 1px solid var(--gray-200); }
.currency-selector { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.currency-label { font-size: 0.9rem; font-weight: 600; color: var(--gray); transition: color 0.3s; display: flex; align-items: center; gap: 0.3rem; }
.currency-label.active { color: var(--primary); }
.currency-label img { vertical-align: middle; }
.currency-toggle {
    position: relative; width: 56px; height: 28px;
    background: var(--gray-200); border-radius: 50px;
    cursor: pointer; border: none; transition: background 0.3s;
}
.currency-toggle::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; background: #fff;
    border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}
.currency-toggle.usd::after { transform: translateX(28px); }
.currency-toggle:hover { background: var(--gray-light); }
.currency-toggle:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ========================================
   PRICING CARDS
======================================== */
.pricing-section { padding: 4rem 0 5rem; background: #fff; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1100px; margin: 0 auto; align-items: stretch; }

.pricing-card {
    background: #fff; border-radius: var(--radius-xl);
    border: 2px solid var(--gray-200);
    padding: 2rem; position: relative;
    display: flex; flex-direction: column;
    transition: all 0.4s ease;
}
.pricing-card:hover { border-color: var(--primary); transform: translateY(-8px); box-shadow: 0 25px 50px rgba(7,0,120,0.12); }

/* Featured Card */
.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(7,0,120,0.03) 0%, #fff 100%);
    transform: scale(1.03);
    z-index: 2;
}
.pricing-card.featured:hover { transform: scale(1.03) translateY(-8px); }
.card-ribbon {
    position: absolute; top: -1px; left: -1px; right: -1px;
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    color: #fff; text-align: center; padding: 0.6rem;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.card-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(16,185,129,0.1); color: var(--accent);
    padding: 0.3rem 0.75rem; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600;
}

.card-header { margin-bottom: 1.5rem; padding-top: 0.5rem; }
.pricing-card.featured .card-header { padding-top: 2.5rem; }
.card-icon {
    width: 50px; height: 50px; background: var(--primary-glass);
    border-radius: var(--radius-md); display: flex;
    align-items: center; justify-content: center; margin-bottom: 1rem;
    transition: all 0.3s ease;
}
.card-icon i { font-size: 1.25rem; color: var(--primary); }
.pricing-card:hover .card-icon { background: var(--primary); transform: rotate(-5deg) scale(1.1); }
.pricing-card:hover .card-icon i { color: #fff; }
.card-header h3 { font-size: 1.4rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.card-header p { font-size: 0.9rem; color: var(--gray); margin-bottom: 0; }

/* Audience tagline for Institutional */
.card-audience {
    display: block;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Pricing */
.card-pricing { padding: 1.25rem 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); margin-bottom: 1.5rem; }
.price-row { display: flex; align-items: baseline; gap: 0.2rem; }
.riyal { width: 22px; height: 22px; margin-right: 0.2rem; }
.currency { font-size: 1rem; font-weight: 700; color: var(--primary); }
.amount { font-size: 2.75rem; font-weight: 800; color: var(--primary); line-height: 1; }
.period { font-size: 0.9rem; color: var(--gray); font-weight: 500; margin-left: 0.25rem; }
.price-custom { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.price-notes-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.price-note {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.8rem; font-weight: 600;
    padding: 0.3rem 0.7rem; border-radius: 50px;
}
.price-note.trial { background: rgba(16,185,129,0.1); color: var(--accent); }
.price-note.guarantee { background: rgba(59,130,246,0.1); color: #3b82f6; }

/* License Required Badge with Tooltip */
.price-note.license-req {
    background: #dc2626; color: #fff; cursor: help; position: relative;
}
.license-tooltip {
    position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    width: 280px; padding: 1rem; background: #1e293b; color: #fff;
    border-radius: 10px; font-size: 0.8rem; font-weight: 400; line-height: 1.5;
    text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100;
}
.license-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 8px solid transparent; border-top-color: #1e293b;
}
.license-tooltip strong { display: block; margin-bottom: 0.5rem; color: #f59e0b; }
.license-tooltip em { color: rgba(255,255,255,0.7); font-size: 0.75rem; }
.price-note.license-req:hover .license-tooltip,
.price-note.license-req:focus .license-tooltip {
    opacity: 1; visibility: visible;
}

/* Features */
.card-features { list-style: none; flex: 1; margin-bottom: 1.5rem; }
.card-features li { padding: 0.5rem 0; font-size: 0.9rem; color: var(--dark); display: flex; align-items: flex-start; gap: 0.6rem; flex-wrap: wrap; }
.card-features li i { color: var(--accent); font-size: 0.7rem; margin-top: 0.35rem; flex-shrink: 0; }
.card-features li strong { color: var(--primary); }

/* Feature Badge (inline tag) */
.feature-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.25rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Footer */
.card-footer { margin-top: auto; }
.btn-card {
    width: 100%; padding: 1rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.3s ease; cursor: pointer; text-decoration: none; border: none;
}
.btn-card.primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 4px 15px rgba(7,0,120,0.2); }
.btn-card.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(7,0,120,0.3); color: #fff; }
.btn-card.outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-card.outline:hover { background: var(--primary); color: #fff; }

/* CTA Subtext */
.cta-subtext {
    font-size: 0.85rem;
    color: var(--accent);
    text-align: center;
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

/* Trust Badges inside card */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin: 0.5rem 0;
    padding: 0.6rem 0.75rem;
    background: rgba(16,185,129,0.06);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(16,185,129,0.25);
}
.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}
.trust-badges i {
    font-size: 0.65rem;
}

.license-note, .retail-safe { font-size: 0.8rem; color: var(--gray); text-align: center; margin-top: 0.6rem; }
.license-note i, .retail-safe i { margin-right: 0.3rem; }
.retail-safe { color: var(--accent); }

/* App Banner */
.app-banner {
    margin-top: 3rem; background: var(--off-white);
    border-radius: var(--radius-xl); padding: 1.5rem 2rem;
    border: 1px solid var(--gray-200);
}
.app-banner-content { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.app-banner-content > i { font-size: 2rem; color: var(--dark); }
.app-banner-content > div { flex: 1; min-width: 200px; }
.app-banner-content h4 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.app-banner-content p { font-size: 0.85rem; color: var(--gray); margin: 0; }
.app-banner-price { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.app-banner-price span:last-child { font-weight: 400; color: var(--gray); font-size: 0.9rem; }
.btn-app {
    background: #000; color: #fff; padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md); font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.5rem;
    text-decoration: none; transition: background 0.3s;
}
.btn-app:hover { background: #333; color: #fff; }

/* ========================================
   COMPARISON TABLE
======================================== */
.comparison-section { padding: 5rem 0; background: var(--off-white); }
.comparison-wrapper { background: #fff; border-radius: var(--radius-xl); box-shadow: 0 10px 40px rgba(0,0,0,0.08); overflow: hidden; overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.comparison-table thead { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.comparison-table th { padding: 1.25rem 1rem; font-weight: 600; font-size: 0.95rem; color: #fff; text-align: center; }
.comparison-table th:first-child { text-align: left; padding-left: 1.5rem; }
.comparison-table th.highlight { background: rgba(255,255,255,0.1); }
.comparison-table tbody tr { border-bottom: 1px solid var(--gray-200); transition: background 0.2s; }
.comparison-table tbody tr:hover { background: var(--primary-glass); }
.comparison-table tbody tr.highlight-row { background: rgba(16,185,129,0.08); font-weight: 500; }
.comparison-table tbody tr.highlight-row:hover { background: rgba(16,185,129,0.12); }
.comparison-table td, .comparison-table th[scope="row"] { padding: 1rem; font-size: 0.9rem; text-align: center; vertical-align: middle; }
.comparison-table th[scope="row"] { text-align: left; padding-left: 1.5rem; color: var(--dark); font-weight: 500; background: transparent; }
.comparison-table th[scope="row"] i { color: var(--primary); margin-right: 0.5rem; width: 20px; text-align: center; }
.comparison-table td.highlight { background: rgba(7,0,120,0.02); }

.check::before { content: '✓'; color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.cross::before { content: '—'; color: var(--gray-light); font-size: 1.1rem; }

/* ========================================
   FAQ SECTION
======================================== */
.faq-section { padding: 5rem 0; background: #fff; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.faq-item {
    background: var(--off-white); border-radius: var(--radius-lg);
    padding: 1.75rem; border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}
.faq-item:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(7,0,120,0.08); }
.faq-item h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.75rem; }
.faq-item p { font-size: 0.9rem; color: var(--gray); line-height: 1.6; margin: 0; }

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; top: -50%; left: 50%;
    transform: translateX(-50%); width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
}
.cta-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.cta-section h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; color: #fff; margin-bottom: 1rem; }
.cta-section p { font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-accent {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 1rem 2rem; background: #fff; color: var(--primary);
    border-radius: var(--radius-md); font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: all 0.3s; text-decoration: none; border: none; cursor: pointer;
}
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); color: var(--primary); }
.btn-outline-light {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 1rem 2rem; background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.5); border-radius: var(--radius-md);
    font-weight: 600; transition: all 0.3s; text-decoration: none;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }

/* ========================================
   RESPONSIVE - Mobile Order Flip
======================================== */
@media (max-width: 1024px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { 
        grid-template-columns: 1fr; 
        max-width: 450px; 
    }
    /* Mobile order: Professional (1) → Institutional (2) → Enterprise (3) */
    .pricing-card.professional { order: 1; }
    .pricing-card.institutional { order: 2; }
    .pricing-card.enterprise { order: 3; }
    
    .pricing-card.featured { transform: none; }
    .pricing-card.featured:hover { transform: translateY(-8px); }
    .faq-grid { grid-template-columns: 1fr; }
    .license-tooltip { left: auto; right: -10px; transform: none; }
    .license-tooltip::after { left: auto; right: 20px; transform: none; }
}
@media (max-width: 768px) {
    .pricing-hero { min-height: auto; padding: 4rem 0 3rem; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-trust { flex-direction: column; gap: 0.75rem; }
    .trust-grid { gap: 2rem; }
    .app-banner-content { flex-direction: column; text-align: center; }
    .trust-badges { 
        flex-direction: row; 
        gap: 0.4rem 0.75rem; 
    }
}
@media (max-width: 480px) {
    .why-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .btn-accent, .btn-outline-light { width: 100%; justify-content: center; }
}
