:root {
    /* ── Canonical brand tokens — single source of truth ── */
    --color-primary:        #0f3d5c;
    --color-primary-light:  #1a5c8a;
    --color-primary-dark:   #0d1f3c;
    --color-accent:         #e8832a;   /* bright amber — decorative / on DARK backgrounds only */
    --color-accent-strong:  #b45309;   /* darker amber — REQUIRED behind white text (~5:1 AA) */
    --color-accent-hover:   #98470a;   /* darker still — hover/active for accent buttons */
    --color-accent-light:   #f5a455;   /* light amber — accents on dark backgrounds */
    --color-surface:        #f8f6f1;
    --color-surface-2:      #ffffff;
    --color-text:           #1a1a2e;
    --color-text-muted:     #5a6070;
    --color-border:         #ddd8d0;
    --color-success:        #2d7a4f;

    /* ── Legacy aliases (kept so existing var() references keep working) ──
       --secondary-color maps to the ACCESSIBLE amber on purpose: every usage
       either sits white text on it (badges, card headers) or uses it as text
       on a light surface (.stat-number), both of which need ≥4.5:1 contrast. */
    --primary-color:   var(--color-primary);
    --secondary-color: var(--color-accent-strong);
    --dark-color:      var(--color-primary-dark);
    --light-color:     var(--color-surface);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 61, 92, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Accent button (amber CTA) */
.btn-accent {
    background: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
    color: white !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-accent:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(180, 83, 9, 0.35);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    color: #64748b;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

/* Spanish flag accent stripe at base of hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c60b1e 33%, #ffc400 33% 66%, #c60b1e 66%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1,
.hero .carousel-item h2 {
    font-size: 3rem;
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Hero Stats Strip */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-stats .stat strong {
    display: block;
    font-size: 1.8rem;
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    color: var(--color-accent-light);
}

.hero-stats .stat span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: var(--color-primary);
}

/* Package Cards */
.package-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 2px solid var(--color-border);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.package-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.package-card.popular {
    border-color: var(--secondary-color);
    position: relative;
}

.package-card.popular::before {
    content: 'محبوب‌ترین';
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.package-price {
    font-size: 3rem;
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    color: var(--primary-color);
    margin: 1rem 0;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    flex-grow: 1;
}

.package-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.package-features li:last-child {
    border-bottom: none;
}

.package-features i {
    color: var(--color-success);
    margin-right: 0.5rem;
}

/* Package CTA button */
.package-cta {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white !important;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.package-cta:hover {
    background: var(--color-primary-light);
    color: white !important;
}

/* Visa Cards */
.visa-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.visa-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.visa-icon {
    width: 60px;
    height: 60px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* Form Styles */
.form-control, .form-select {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 61, 92, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 3rem;
}

/* Stats */
.stat-box {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.stat-number {
    font-size: 3rem;
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    font-weight: 400;
    color: var(--secondary-color);
}

/* Popular badge */
.popular-badge {
    background: var(--secondary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Visa comparison table */
.visa-comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}
.visa-comparison-table td {
    vertical-align: middle;
}
.visa-comparison-table .row-label {
    font-weight: 600;
    color: var(--dark-color);
    background: var(--light-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--color-primary-light));
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Testimonials */
.testimonials-section {
    background: var(--color-surface);
}

.testimonial-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    color: var(--color-text);
    font-style: italic;
    margin-bottom: 1.25rem;
    line-height: 1.7;
    flex-grow: 1;
}

.testimonial-author strong {
    display: block;
    color: var(--color-primary);
    font-weight: 600;
}

.testimonial-author span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Promo Banner */
.promo-banner {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.promo-banner .coupon-code {
    background: var(--color-accent-strong);
    padding: 2px 10px;
    border-radius: 4px;
    font-family: monospace;
    letter-spacing: 0.08em;
    font-size: 1rem;
    font-weight: 700;
}

/* Footer — dark navy */
footer.footer {
    background-color: var(--color-primary) !important;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

/* Hero subtitle / CTA fade — delayed so H1 paints first (improves LCP) */
.hero-fade {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1,
    .hero .carousel-item h2 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .package-price {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 32px;
        padding-top: 24px;
    }

    .hero-stats .stat {
        flex: 0 0 calc(50% - 10px);
    }
}

/* Discount Popup */
.discount-popup-content {
    border-radius: var(--radius-md);
}

.discount-popup-icon {
    animation: popupBounce 1s ease-in-out;
}

@keyframes popupBounce {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.3); opacity: 1; }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.discount-popup-badge {
    animation: popupPulse 2s ease-in-out infinite;
}

@keyframes popupPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(15, 61, 92, 0.35); }
    50%      { box-shadow: 0 4px 30px rgba(15, 61, 92, 0.55); }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
    background: #25D366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    color: #fff;
    text-decoration: none;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(15, 61, 92, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   RTL / Persian overrides (site converted to fa)
   Vazirmatn typography + logical-direction fixes.
   ───────────────────────────────────────────────────────────── */
body {
    font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', Arial, sans-serif;
    line-height: 1.9;
}
h1, h2, h3, h4, h5, h6,
.navbar-brand, .btn, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
}
/* Package "popular" badge sits at the visual start (right in RTL) */
.package-card.popular::before {
    right: auto;
    left: 20px;
}
/* Icon-before-text spacing: gap belongs on the left in RTL */
.package-features i {
    margin-right: 0;
    margin-left: 0.5rem;
}
/* Floating WhatsApp button → bottom-left in RTL layouts */
.whatsapp-float {
    right: auto;
    left: 25px;
}
