/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    /* Base Typography */
    --font-en: 'Inter', sans-serif;
    --font-ar: 'Cairo', sans-serif;

    /* Light Theme (Default fallback) */
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Brand Colors */
    --brand-primary: #3b82f6;
    /* Blue */
    --brand-hover: #2563eb;
    --brand-success: #10b981;
    /* Green */
    --brand-success-hover: #059669;
    --brand-accent: #8b5cf6;
    /* Purple */

    /* Utilities */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition-soft: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-alt: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-soft), color var(--transition-soft);
}

html[lang="ar"] body {
    font-family: var(--font-ar);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-soft);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.clr-bg-alt {
    background-color: var(--bg-alt);
}

.text-brand {
    color: var(--brand-primary);
}

.clr-green {
    color: var(--brand-success);
}

.clr-blue {
    color: var(--brand-primary);
}

.clr-bg-green {
    background-color: var(--brand-success);
    color: white;
}

.clr-bg-green:hover {
    background-color: var(--brand-success-hover);
}

.clr-bg-blue {
    background-color: var(--brand-primary);
    color: white;
}

.clr-bg-blue:hover {
    background-color: var(--brand-hover);
}

/* ==========================================================================
   i18n Language Toggling
   ========================================================================== */
html[lang="en"] .ar {
    display: none !important;
}

html[lang="ar"] .en {
    display: none !important;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.section-header {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.highlight {
    color: var(--brand-primary);
    -webkit-text-fill-color: var(--brand-primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-soft);
    font-family: inherit;
    font-size: 1rem;
}

.btn i {
    font-size: 1.25rem;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-secondary {
    background-color: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--brand-success);
    color: var(--brand-success);
    background-color: rgba(16, 185, 129, 0.05);
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color var(--transition-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--bg-alt);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all var(--transition-soft);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-soft);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo i {
    font-size: 1.75rem;
    color: var(--brand-primary);
}

.logo-light,
.logo-dark {
    display: none;
    height: 38px;
    width: auto;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

[data-theme="light"] .logo-light {
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.badge i {
    color: #fbbf24;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    white-space: normal;
}

.hero-title .highlight {
    display: block;
    margin-top: 0.8rem;
    font-size: 1.5rem;
    /* Shrink aggressively to fit on one line on PC */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.trust-indicators {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-item i {
    color: var(--brand-success);
    font-size: 1.25rem;
}

/* Glass Panel / Mockup */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.mockup {
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.mockup:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

html[lang="ar"] .mockup {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

html[lang="ar"] .mockup:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.mockup-header {
    background: var(--bg-main);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mockup-title {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mockup-body {
    padding: 2rem;
}

.stream-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.stream-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.stream-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

html[lang="ar"] .stream-status {
    align-items: flex-start;
}

.badge-status {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-success);
}

.waiting {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
}

.schedule-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: transform var(--transition-soft), box-shadow var(--transition-soft);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.feature-full {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-full .icon-box {
    margin-bottom: 0;
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Recommended Settings
   ========================================================================== */
.settings-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 4rem;
    align-items: center;
}

.settings-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.settings-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.setting-item {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-item span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.setting-item strong {
    font-size: 1.125rem;
    color: var(--text-main);
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: center;
}

.pricing-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    position: relative;
    transition: transform var(--transition-soft);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.popular {
    background: var(--bg-main);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-glow);
    padding: 4rem 2.5rem;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
}

.plan-price span {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.plan-features i {
    color: var(--brand-primary);
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.pricing-addon {
    padding: 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-md);
    color: var(--brand-accent);
    display: inline-block;
}

/* ==========================================================================
   Payment Methods & Footer
   ========================================================================== */
.payment-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pay-card {
    background: var(--bg-main);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-soft);
}

.pay-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.faq-contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.faq-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.faq-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--text-muted);
}

.contact-card {
    padding: 3rem 2rem;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.info-row i {
    color: var(--brand-primary);
    font-size: 1.25rem;
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.floating-wa {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    /* Authentic WhatsApp Green */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform var(--transition-soft);
}

.floating-wa:hover {
    transform: scale(1.1);
}

html[lang="ar"] .floating-wa {
    left: auto;
    right: 2rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {

    .hero-container,
    .features-grid,
    .settings-wrapper,
    .faq-contact-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-full {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding: 120px 0 60px;
        /* Adjusted top padding for mid-size screens */
        text-align: center;
    }

    .hero-title .highlight {
        font-size: 1.2rem;
        /* Shrink to fit on one line on tablet */
    }

    .trust-indicators {
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-title .highlight {
        margin-top: 0.4rem;
        font-size: 1.1rem;
        /* Shrink to fit on one line on Mobile */
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .dashboard-mockup {
        max-width: 100vw;
        overflow: hidden;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Global Language Display Rules */
html[lang="ar"] .en {
    display: none !important;
}

html[lang="en"] .ar {
    display: none !important;
}