﻿/* Global Variables */
:root {
    --color-primary: #D62828;
    /* Red */
    --color-primary-dark: #A41616;
    --color-secondary: #F77F00;
    /* Orange */
    --color-black: #111111;
    --color-dark-gray: #333333;
    --color-light-gray: #F4F4F4;
    --color-white: #FFFFFF;

    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    --border-radius: 8px;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);

    --transition-speed: 0.3s;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ar);
    color: var(--color-black);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

html[lang="en"] body {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark-gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(214, 40, 40, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(214, 40, 40, 0.4);
    filter: brightness(1.1);
}

.plan-btn {
    width: auto;
    min-width: 140px;
    padding: 8px 20px;
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 50px;
    display: inline-flex;
}

.btn-secondary {
    background-color: var(--color-black);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-secondary);
}

.btn-outline {
    border: 2px solid var(--color-white);
    color: var(--color-white);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

/* Footer */
.footer {
    background-color: #111;
    color: #fff;
    /* Changed to white */
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #222;
    font-size: 0.9rem;
    /* Slightly larger for readability */
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    /* Stacked for better mobile/desktop consistency per request context */
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.footer p {
    margin: 0;
    direction: ltr;
    opacity: 0.9;
    /* Slight opacity for elegance but still correctly white */
}

/* Header */
.header {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
}

/* Mobile Controls Base (Hidden on Desktop) */
.mobile-menu-btn,
.mobile-call-btn {
    display: none;
}

/* Hero Section */
.hero-section {
    padding: var(--spacing-lg) 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* Animated Background */
.animated-hero {
    background: linear-gradient(135deg, rgba(253, 251, 251, 0.9) 0%, rgba(235, 237, 238, 0.9) 100%), url('../images/hero-bg-modern.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatShape 10s infinite alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--color-primary);
}

.shape-2 {
    bottom: 10%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: var(--color-secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 200px;
    height: 200px;
    background: #FFD166;
    animation-duration: 15s;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: right;
}

html[dir="ltr"] .hero-text {
    text-align: left;
}

.hero-graphic {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon {
    width: 120px;
    height: 120px;
    color: var(--color-primary);
    filter: drop-shadow(0 10px 20px rgba(214, 40, 40, 0.3));
    animation: floatIcon 6s ease-in-out infinite;
}

.hero-icon-small {
    width: 50px;
    height: 50px;
    color: var(--color-secondary);
    position: absolute;
    animation: floatIcon 4s ease-in-out infinite alternate;
}

.float-item-2 {
    animation-delay: 1s;
}

.float-item-3 {
    animation-delay: 2s;
}

@keyframes floatIcon {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Plans Section */
.plans-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--color-white);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Desktop 4 cols */
    gap: var(--spacing-sm);
}

.plan-card {
    background: var(--color-white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    text-align: center;
    transition: var(--transition-speed);
    position: relative;
    box-shadow: var(--shadow-card);
}

.plan-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.plan-card.featured {
    border: 2px solid var(--color-primary);
    transform: scale(1.05);
    z-index: 10;
}

.plan-card.featured::before {
    content: 'Best Value';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-black);
    margin: var(--spacing-sm) 0;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
}

.plan-features {
    text-align: right;
    margin-bottom: var(--spacing-md);
}

html[dir="ltr"] .plan-features {
    text-align: left;
}

.plan-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.zoom-in {
    animation: zoomIn 0.5s ease-out forwards;
    opacity: 0;
    transform: scale(0.9);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Authorized Partner Label */
.partner-label {
    text-align: center;
    margin: 0 auto 30px;
    display: inline-block;
    background: #eef2f5;
    color: var(--color-dark-gray);
    padding: 8px 20px;
    border-radius: 50px;

    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        }

        70% {
            box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        }
    }

    /* --- Bonuses/Promo Section --- */
    .bonuses-section {
        padding: 80px 0;
        background: #f8f9fa;
        /* Light background for cleaner look */
        color: var(--color-dark);
    }

    .bonuses-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 900px;
        margin: 30px auto;
    }

    .bonus-item {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        transition: transform 0.3s ease;
        border: 1px solid #eee;
    }

    .bonus-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }

    .bonus-icon {
        width: 24px;
        height: 24px;
        color: var(--color-secondary);
    }

    .center-cta {
        text-align: center;
        margin-top: 40px;
    }

    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #ddd;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Why Choose Us Section */
.why-choose-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--color-light-gray);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.why-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition-speed);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.why-icon {
    width: 60px;
    height: 60px;
    background: #eef2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--color-primary);
}

/* Chatbot & WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* User requested Left */
    right: auto;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    z-index: 2000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Adjust RTL for whatsapp-float to be on the right if LTR is left */
html[dir="rtl"] .whatsapp-float {
    right: 20px;
    left: auto;
}

.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    /* User requested Right */
    left: auto;
    width: 320px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Adjust RTL for chatbot-container to be on the left if LTR is right */
html[dir="rtl"] .chatbot-container {
    left: 20px;
    right: auto;
}

.chatbot-container.closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
}

.chatbot-container.minimized {
    height: 50px;
    width: 250px;
    bottom: 20px;
    overflow: hidden;
}

.chatbot-header {
    background: var(--color-primary);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
}

.chatbot-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 10px;
}

html[dir="rtl"] .chatbot-controls button {
    margin-left: 0;
    margin-right: 10px;
}

.chatbot-body {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chatbot-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

.chatbot-footer input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chatbot-footer button {
    background: var(--color-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chatbot Interactive Options */
.chat-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    justify-content: flex-end;
}

.chat-option-btn {
    background: white;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chat-option-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Standardized Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 40px;
}

.split-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.split-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.split-image img:hover {
    transform: scale(1.02);
}

/* Mobile Split Layout */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .split-layout .split-content {
        order: 1;
    }

    .split-layout .split-image {
        order: 2;
        margin-top: 20px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* --- Trust Signals --- */
.trust-section {
    background: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.trust-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-dark);
}

.trust-item svg {
    color: var(--color-primary);
    width: 20px;
}

/* --- Intro Section --- */
.intro-section {
    padding: 60px 0 40px;
}

.section-desc {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    line-height: 1.6;
}

/* --- Plan Guide --- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nav-links ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links .cta-link {
    background: var(--color-primary);
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
}

.nav-links .cta-link:hover {
    background: var(--color-hover);
}

.guide-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid #eee;
}

.guide-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.guide-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* --- Steps List --- */
.steps-list {
    max-width: 800px;
    margin: 30px auto 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.step-num {
    background: var(--color-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* --- FAQ Accordion --- */
.faq-list {
    max-width: 800px;
    margin: 30px auto 0;
}

.faq-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-q {
    padding: 15px 20px;
    background: #f9f9f9;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-q:hover {
    background: #f1f1f1;
}

.faq-item.active .faq-q {
    background: #eef2ff;
    color: var(--color-primary);
}

.faq-item.active .faq-q svg {
    transform: rotate(180deg);
}

.faq-a {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: white;
    color: #555;
    line-height: 1.6;
}

.faq-item.active .faq-a {
    padding: 15px 20px;
    max-height: 300px;
    /* Increased for longer answers */
}

/* --- Final CTA --- */
.final-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    margin-top: 40px;
}

.final-cta-section h2 {
    color: white;
    margin-bottom: 30px;
}

.pulse-btn {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* --- Extra Visuals --- */
.plan-card .extra-offer {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 10px 0;
}

.plan-card .best-value-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.plan-features .check-icon {
    width: 16px;
    color: green;
}

.bonus-icon,
.why-icon-wrapper svg {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.why-icon-wrapper {
    display: flex;
    justify-content: center;
}

/* --- Chatbot Trigger (Fixed) --- */
.chatbot-trigger {
    position: fixed;
    bottom: 90px;
    right: 20px;
    left: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

/* Show trigger only when chatbot closed */
.chatbot-container.closed~.chatbot-trigger {
    display: flex;
}

/* RTL Adjustment */
html[dir="rtl"] .chatbot-trigger {
    left: 20px;
    right: auto;
}

/* --- Mobile Improvements --- */
@media (max-width: 768px) {

    /* 1. Fix Plans Grid (Vertical Stack) */
    .plans-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
    }

    .plan-card {
        min-width: unset !important;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    /* 2. Fix Header (Centered & Wrapped) */
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 10px;
    }

    .nav-links ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        /* Reduced gap */
    }

    .nav-links a {
        font-size: 0.9rem;
        /* Smaller font for better fit */
        padding: 5px;
    }

    .logo-text {
        margin-bottom: 5px;
    }

    .header-actions {
        transform: scale(0.9);
        /* Slightly smaller buttons */
        margin-top: -5px;
    }

    /* Adjust Buttons for Mobile */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
    }

    .chatbot-trigger {
        width: 50px;
        height: 50px;
        bottom: 80px;
        /* Above WA button */
    }

    /* 3. Fix Hero Section (Single Column) */
    .hero-section {
        min-height: auto;
        padding: 40px 0 60px;
        /* Adjusted padding */
    }

    .hero-container {
        grid-template-columns: 1fr;
        /* Single column layout */
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
        /* Center text */
        order: 2;
        /* Text after image (optional, or remove to keep text first) */
    }

    /* Override RTL text-align if needed */
    html[dir="ltr"] .hero-text,
    html[dir="rtl"] .hero-text {
        text-align: center;
    }

    .hero-graphic {
        height: 300px;
        /* Limit height on mobile */
        order: 1;
        /* Image first */
    }

    .hero-actions {
        justify-content: center;
        display: flex;
    }
}

/* --- Mobile Menu Styles (New) --- */

/* Desktop Defaults */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn i {
    width: 28px;
    height: 28px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dimmed background */
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: flex-end;
    /* Align menu to right */
}

html[dir="rtl"] .mobile-menu-overlay {
    justify-content: flex-start;
    /* Align menu to left for RTL */
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    background: white;
    width: 280px;
    height: 100%;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    /* Hidden right */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

html[dir="rtl"] .mobile-menu-content {
    transform: translateX(-100%);
    /* Hidden left */
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--color-black);
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 20px;
}

html[dir="rtl"] .close-menu-btn {
    align-self: flex-start;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-list a {
    color: var(--color-black);
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list a.active {
    color: var(--color-primary);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    /* Flex for sidebar approach */
    justify-content: flex-start;
    /* Sidebar from left */
}

/* RTL: Sidebar from Right */
/* RTL: Sidebar defaults to Start (Right) naturally */
html[dir="rtl"] .mobile-menu-overlay {
    justify-content: flex-start !important;
    /* Force Right Side (Start) */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    background: white;
    width: 280px;
    height: 100%;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    /* Start off-screen */
    transition: transform 0.3s ease;
}

html[dir="rtl"] .mobile-menu-content {
    transform: translateX(100%);
    /* Start off-screen right */
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 20px;
}

html[dir="rtl"] .close-menu-btn {
    align-self: flex-start;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-list li a {
    text-decoration: none;
    color: var(--color-black);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-menu-actions {
    margin-top: auto;
    padding-top: 20px;
}

.full-width {
    width: 100%;
    justify-content: center;
    border-color: #ddd;
    color: var(--color-black);
}

/* Mobile Overrides for Header */
@media (max-width: 900px) {


    /* 2. Fix Header (Force Single Row using Flexbox) */
    /* EMERGENCY FIX: Strict Single Row Layout */
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        /* Explicit row */
        flex-wrap: nowrap !important;
        /* Strict no wrap */
        justify-content: space-between !important;
        align-items: center !important;
        padding: 5px 10px !important;
        height: 60px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 0 !important;
        /* Remove gap to prevent overflow */
    }

    /* Force items to fit */
    .logo,
    .mobile-menu-btn,
    .header-actions {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }

    /* 1. LOGO */
    .logo {
        flex: 0 0 auto !important;
        /* Auto width based on image */
        max-width: 35% !important;
        /* Cap width */
    }

    .logo img {
        height: 28px !important;
        /* Force small height */
        width: auto !important;
        object-fit: contain !important;
    }

    /* 2. MENU (Center) */
    .mobile-menu-btn {
        flex: 1 1 auto !important;
        /* Take remaining space */
        justify-content: center !important;
        width: 40px !important;
        /* Min width */
    }

    /* 3. BUTTON (Action) */
    .header-actions {
        flex: 0 0 auto !important;
        /* Fit content */
        max-width: 45% !important;
        /* Cap width */
    }

    /* GLOBAL ORDERING (Smart Direction) */
    /* LTR: Start=Left  -> Logo(1)=Left,  Menu(2)=Center, Actions(3)=Right */
    /* RTL: Start=Right -> Logo(1)=Right, Menu(2)=Center, Actions(3)=Left */

    .logo {
        order: 1 !important;
        justify-content: flex-start !important;
    }

    .mobile-menu-btn {
        order: 2 !important;
    }

    .header-actions {
        order: 3 !important;
        justify-content: flex-end !important;
    }

    /* RTL Override REMOVED to allow natural direction swap */


    html[dir="rtl"] .mobile-menu-btn {
        order: 2;
        /* Menu Center */
    }

    html[dir="rtl"] .header-actions {
        order: 1;
        /* Call Button Left */
        justify-content: flex-start;
    }

    .logo a {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn i {
        width: 32px;
        height: 32px;
    }

    .mobile-call-btn {
        display: inline-flex !important;
        /* Visible on mobile */
        height: 38px;
        /* Slightly taller for better touch target */
        padding: 0 16px;
        /* Comfortable padding */
        border-radius: 6px;
        /* Modern cleaner radius */
        align-items: center;
        justify-content: center;
        background: var(--color-primary);
        /* Identity Color (Red) */
        color: white;
        box-shadow: 0 4px 6px rgba(214, 40, 40, 0.2);
        /* Matching colored shadow */
        gap: 8px;
        font-weight: 600;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .mobile-call-btn:active {
        transform: scale(0.96);
    }

    .mobile-call-btn i {
        width: 18px;
        height: 18px;
    }

    .mobile-call-btn .call-text {
        font-size: 0.9rem;
    }

    /* Hide Desktop Nav explicitly, BUT allow container for overlay */
    .nav-links .desktop-nav {
        display: none !important;
    }

    .nav-links {
        display: block !important;
        /* Allow overlay to be seen */
    }

    /* Contact Header Btn (Desktop) Hidden */
    .contact-header-btn {
        display: none !important;
    }
}

/* Typing Animation */
.chat-msg.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 15px;
    background: #f1f0f0;
    /* Keeping bot bubble color */
    width: fit-content;
}

.chat-msg.typing .dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.chat-msg.typing .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-msg.typing .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}