/*
Theme Name: Al-Amal Academy 
Author: Abdulrhim 
Description:  قالب تم تصميمه بواسطة م عبدالرحيم .
Version: 4.1
Text Domain: alamal
*/

/* ============================================
   CSS Variables - المتغيرات
   ============================================ */
:root {
    /* الألوان الأساسية */
    --teal-primary: #0d9488;
    --teal-secondary: #0f766e;
    --green-primary: #22c55e;
    --gold-accent: #d4af37;

    /* ألوان الوضع الفاتح */
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* خطوط */
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
    --font-secondary: 'Amiri', serif;

    /* التحولات */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* الحدود */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
}

/* ============================================
   Dark Mode - الوضع الداكن
   ============================================ */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-slate-100 {
    background-color: var(--bg-tertiary) !important;
}

/* --- Gradient Background Overrides --- */
[data-theme="dark"] .bg-gradient-to-br.from-slate-50,
[data-theme="dark"] .bg-gradient-to-br.from-teal-50,
[data-theme="dark"] .bg-gradient-to-br.from-green-50,
[data-theme="dark"] .bg-gradient-to-b.from-gray-50,
[data-theme="dark"] section.bg-gradient-to-br.from-slate-50,
[data-theme="dark"] section.bg-gradient-to-br.from-teal-50,
[data-theme="dark"] section.bg-gradient-to-b.from-gray-50 {
    background: #0f172a !important;
}

/* Front page hero section */
[data-theme="dark"] section#hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
}

[data-theme="dark"] section#hero .from-teal-100\/40 {
    background: transparent !important;
}

/* Stats section */
[data-theme="dark"] section#stats {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* About section */
[data-theme="dark"] section#about {
    background: #0f172a !important;
}

/* Videos section */
[data-theme="dark"] section#videos {
    background: #0f172a !important;
}

[data-theme="dark"] section#videos .bg-green-200,
[data-theme="dark"] section#videos .bg-teal-200,
[data-theme="dark"] section#hero .bg-green-200,
[data-theme="dark"] section#hero .bg-teal-200 {
    background-color: rgba(45, 212, 191, 0.05) !important;
}

/* Teachers section */
[data-theme="dark"] section#teachers {
    background-color: var(--bg-primary) !important;
}

/* FAQ section */
[data-theme="dark"] section#faq {
    background-color: var(--bg-secondary) !important;
}

/* Testimonials section */
[data-theme="dark"] section#testimonials {
    background: #0f172a !important;
}

[data-theme="dark"] section#testimonials .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] section#testimonials .border-teal-100 {
    border-color: var(--border-color) !important;
}

/* CTA section text fix */
[data-theme="dark"] section#cta .text-black {
    color: white !important;
}

/* --- Text Colors --- */
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 {
    color: var(--text-muted) !important;
}

/* --- Badge/Pill Backgrounds (teal-100, green-100, etc.) --- */
[data-theme="dark"] .bg-teal-100 {
    background-color: rgba(45, 212, 191, 0.15) !important;
}

[data-theme="dark"] .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.15) !important;
}

[data-theme="dark"] .bg-teal-50,
[data-theme="dark"] .bg-green-50 {
    background-color: rgba(45, 212, 191, 0.08) !important;
}

/* Value cards on about section */
[data-theme="dark"] section#about .bg-white.card-hover,
[data-theme="dark"] section#about .bg-white {
    background-color: var(--bg-secondary) !important;
}

/* Teacher cards gradient bg */
[data-theme="dark"] .from-teal-50.to-green-50,
[data-theme="dark"] .bg-gradient-to-br.from-teal-50.to-green-50 {
    background: var(--bg-secondary) !important;
}

/* Video article cards */
[data-theme="dark"] article.bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] article.bg-white .text-lg.font-bold.text-slate-900,
[data-theme="dark"] article.bg-white h3 {
    color: var(--text-primary) !important;
}

/* --- Border Colors --- */
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-200 {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .border-teal-100,
[data-theme="dark"] .border-teal-200,
[data-theme="dark"] .border-green-100 {
    border-color: rgba(45, 212, 191, 0.2) !important;
}

/* --- Shadow overrides --- */
[data-theme="dark"] .shadow-lg,
[data-theme="dark"] .shadow-xl,
[data-theme="dark"] .shadow-2xl {
    box-shadow: 0 10px 40px var(--shadow-color) !important;
}

[data-theme="dark"] .shadow-sm {
    box-shadow: 0 2px 8px var(--shadow-color) !important;
}

/* --- FAQ items dark mode --- */
[data-theme="dark"] .faq-question {
    color: #5eead4 !important;
}

[data-theme="dark"] .faq-answer {
    color: var(--text-secondary) !important;
}

/* --- Contact page --- */
[data-theme="dark"] .bg-gradient-to-br.from-teal-50.to-green-50 {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-gradient-to-br.from-teal-50.to-green-50 .bg-white {
    background-color: var(--bg-tertiary) !important;
}

/* --- Courses page cards --- */
[data-theme="dark"] .border-r-4.border-teal-500 {
    background-color: var(--bg-secondary) !important;
}

/* --- Back-to-top button --- */
[data-theme="dark"] #back-to-top {
    background: var(--bg-secondary) !important;
    color: #2dd4bf !important;
    border: 1px solid var(--border-color);
}

/* --- Border on image in hero --- */
[data-theme="dark"] .border-8.border-white {
    border-color: var(--border-color) !important;
}

/* --- Hero "حلقات مباشرة" floating badge --- */
[data-theme="dark"] .bg-white\/60 {
    background: rgba(30, 41, 59, 0.85) !important;
}

/* --- Hero trial button dark mode --- */
[data-theme="dark"] section#hero .bg-white.text-teal-900 {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: #2dd4bf !important;
}

/* --- Teacher Card (page-teachers.php inline styles) --- */
[data-theme="dark"] .teacher-card {
    background: linear-gradient(135deg, #1e293b 0%, #1e293b 100%) !important;
}

[data-theme="dark"] .teacher-card h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .teacher-card .text-slate-700,
[data-theme="dark"] .teacher-card .text-slate-600 {
    color: var(--text-secondary) !important;
}

/* --- Testimonial Card (page-testimonials.php inline styles) --- */
[data-theme="dark"] .testimonial-card {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .testimonial-card .text-slate-700 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .testimonial-card .text-slate-900 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .testimonial-card .border-t {
    border-color: var(--border-color) !important;
}

/* --- Tutorials page background --- */
[data-theme="dark"] .tutorials-page {
    background: #0f172a !important;
}

[data-theme="dark"] .tutorials-page .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .tutorials-page .border-t {
    border-color: var(--border-color) !important;
}

/* --- Sponsor page dark mode overrides --- */
[data-theme="dark"] .sponsor-page {
    --white: #1e293b;
    --light-bg: #0f172a;
    --dark-color: #f1f5f9;
    --text-color: #e2e8f0;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .sponsor-page .section {
    background-color: #0f172a;
}

[data-theme="dark"] .sponsor-page .section[style*="background: var(--light-bg)"],
[data-theme="dark"] .sponsor-page .section[style*="background: linear-gradient"] {
    background: #0f172a !important;
}

[data-theme="dark"] .sponsor-page .why-card,
[data-theme="dark"] .sponsor-page .step-item,
[data-theme="dark"] .sponsor-page .story-card,
[data-theme="dark"] .sponsor-page .testimonial-card,
[data-theme="dark"] .sponsor-page .faq-item,
[data-theme="dark"] .sponsor-page .sponsorship-form {
    background: #1e293b !important;
    border-color: #334155;
}

[data-theme="dark"] .sponsor-page .why-card h3,
[data-theme="dark"] .sponsor-page .step-item h4,
[data-theme="dark"] .sponsor-page .story-content h4,
[data-theme="dark"] .sponsor-page .section-title {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .sponsor-page .why-card p,
[data-theme="dark"] .sponsor-page .step-item p,
[data-theme="dark"] .sponsor-page .story-content p,
[data-theme="dark"] .sponsor-page .testimonial-text,
[data-theme="dark"] .sponsor-page .faq-answer-content {
    color: #94a3b8 !important;
}

[data-theme="dark"] .sponsor-page .faq-question {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .sponsor-page .sponsorship-table table {
    background: #1e293b !important;
}

[data-theme="dark"] .sponsor-page .sponsorship-table td {
    border-bottom-color: #334155 !important;
    color: #e2e8f0;
}

[data-theme="dark"] .sponsor-page .sponsorship-table tr:hover {
    background: rgba(45, 212, 191, 0.05) !important;
}

[data-theme="dark"] .sponsor-page .form-group label {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .sponsor-page .form-group input,
[data-theme="dark"] .sponsor-page .form-group select,
[data-theme="dark"] .sponsor-page .form-group textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .sponsor-page .form-group input:focus,
[data-theme="dark"] .sponsor-page .form-group select:focus,
[data-theme="dark"] .sponsor-page .form-group textarea:focus {
    border-color: #2dd4bf !important;
}

[data-theme="dark"] .sponsor-page .radio-option {
    border-color: #334155 !important;
    color: #e2e8f0;
}

[data-theme="dark"] .sponsor-page .radio-option:hover,
[data-theme="dark"] .sponsor-page .radio-option.selected {
    background: rgba(45, 212, 191, 0.1) !important;
    border-color: #2dd4bf !important;
}

[data-theme="dark"] .sponsor-page .progress-circle {
    background: #334155;
}

[data-theme="dark"] .sponsor-page .progress-step::before {
    background: #334155;
}

[data-theme="dark"] .sponsor-page .testimonial-author {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .sponsor-page .testimonial-role {
    color: #94a3b8 !important;
}

/* --- Tutors page (page-tutors.php) --- */
[data-theme="dark"] section#tutors .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] section#tutors .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] section#tutors .text-gray-600 {
    color: var(--text-secondary) !important;
}

/* --- Generic section bg-white override for all pages --- */
[data-theme="dark"] section.bg-white {
    background-color: var(--bg-primary) !important;
}

/* --- Contact/Info boxes with gradient backgrounds --- */
[data-theme="dark"] .bg-gradient-to-br.from-teal-50.to-green-50.border.border-teal-100 {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* --- "page active" wrapper for courses, tutors etc. --- */
[data-theme="dark"] section.page.active {
    background-color: var(--bg-primary);
}



[data-theme="dark"] .prose {
    color: var(--text-secondary);
}

[data-theme="dark"] .prose h1,
[data-theme="dark"] .prose h2,
[data-theme="dark"] .prose h3,
[data-theme="dark"] .prose h4 {
    color: var(--text-primary);
}

/* ============================================
   Base Styles - الأساسيات
   ============================================ */
* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .site-header {
    background: rgba(30, 41, 59, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .header-scrolled {
    background: rgba(30, 41, 59, 0.97);
}

.header-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* --- Logo --- */
.header-logo {
    flex-shrink: 0;
}

.header-logo-img {
    height: 36px;
    width: auto;
}

/* ============================================
   Brand Logo - شعار الأكاديمية
   ============================================ */
.brand-logo-link {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-icon-wrapper {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0d9488 0%, #065f46 60%, #d4af37 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.brand-logo-link:hover .brand-icon-wrapper {
    transform: scale(1.05);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-main-title {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0d9488, #065f46);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.55rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.01em;
    white-space: nowrap;
    margin-top: 1px;
}

/* Dark mode brand */
[data-theme="dark"] .brand-main-title {
    background: linear-gradient(135deg, #2dd4bf, #5eead4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .brand-subtitle {
    color: #64748b;
}

[data-theme="dark"] .brand-icon-wrapper {
    box-shadow: 0 3px 10px rgba(45, 212, 191, 0.2);
}

/* --- Desktop Navigation --- */
.header-desktop-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.desktop-nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav-list li {
    list-style: none;
}

.desktop-nav-list li a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.desktop-nav-list li a:hover {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.06);
}

.desktop-nav-list li.current-menu-item a,
.desktop-nav-list li.current_page_item a {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.08);
    font-weight: 700;
}

[data-theme="dark"] .desktop-nav-list li a {
    color: #cbd5e1;
}

[data-theme="dark"] .desktop-nav-list li a:hover {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.08);
}

[data-theme="dark"] .desktop-nav-list li.current-menu-item a,
[data-theme="dark"] .desktop-nav-list li.current_page_item a {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.1);
}

/* Hide desktop menu on mobile */
@media (max-width: 768px) {
    .header-desktop-menu {
        display: none;
    }
}

/* --- Header Actions (buttons on the left) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Header buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.header-btn-text {
    display: inline;
}

/* Login button */
.header-btn-login {
    background: #0d9488;
    color: white;
}

.header-btn-login:hover {
    background: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* Register button */
.header-btn-register {
    background: #065f46;
    color: white;
}

.header-btn-register:hover {
    background: #064e3b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
}

/* Dashboard button */
.header-btn-dashboard {
    background: linear-gradient(135deg, #0d9488, #065f46);
    color: white;
}

.header-btn-dashboard:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.header-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

/* Logout button */
.header-btn-logout {
    background: transparent;
    color: #ef4444;
    border: 1.5px solid #fecaca;
    padding: 0.35rem 0.6rem;
}

.header-btn-logout:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

[data-theme="dark"] .header-btn-logout {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

[data-theme="dark"] .header-btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Icon buttons (language, dark mode, mobile menu) */
.header-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.header-icon-btn:hover {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
    transform: scale(1.05);
}

[data-theme="dark"] .header-icon-btn {
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .header-icon-btn:hover {
    background: #2dd4bf;
    color: #0f172a;
    border-color: #2dd4bf;
}

/* Mobile-only elements */
.header-mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .header-mobile-only {
        display: flex;
    }

    .header-btn-text {
        display: none;
    }

    .header-btn {
        padding: 0.35rem 0.5rem;
        border-radius: 50%;
        font-size: 0.8rem;
    }

    .header-btn i {
        font-size: 0.85rem;
    }

    .header-avatar {
        width: 22px;
        height: 22px;
    }

    .header-nav {
        height: 50px;
        padding: 0 0.5rem;
        gap: 0.3rem;
    }

    .brand-main-title {
        font-size: 0.75rem;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-logo-link {
        gap: 0.3rem;
    }

    .header-logo-img {
        height: 30px;
    }

    .brand-icon-wrapper {
        width: 26px;
        height: 26px;
        border-radius: 7px;
        font-size: 0.75rem;
    }

    .header-icon-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-width: 1px;
    }

    .header-actions {
        gap: 0.2rem;
    }

    /* Hide logout text on mobile */
    .header-btn-logout .header-btn-text {
        display: none;
    }
}

/* ============================================
   Mobile Menu Overlay
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .mobile-menu-overlay {
    background: rgba(15, 23, 42, 0.98);
}

.mobile-menu-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .mobile-menu-head {
    border-color: #334155;
}

.mobile-menu-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0d9488;
}

[data-theme="dark"] .mobile-menu-title {
    color: #2dd4bf;
}

.mobile-menu-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

[data-theme="dark"] .mobile-menu-close {
    background: #334155;
    color: #94a3b8;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list li {
    list-style: none;
}

.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-nav-list li a:hover {
    background: rgba(13, 148, 136, 0.06);
    color: #0d9488;
}

.mobile-nav-list li.current-menu-item a,
.mobile-nav-list li.current_page_item a {
    background: rgba(13, 148, 136, 0.08);
    color: #0d9488;
    font-weight: 700;
}

[data-theme="dark"] .mobile-nav-list li a {
    color: #e2e8f0;
}

[data-theme="dark"] .mobile-nav-list li a:hover {
    background: rgba(45, 212, 191, 0.08);
    color: #2dd4bf;
}

/* Mobile Auth Section */
.mobile-auth-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

[data-theme="dark"] .mobile-auth-section {
    border-color: #334155;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-btn-dashboard {
    background: linear-gradient(135deg, #0d9488, #065f46);
    color: white;
}

.mobile-btn-logout {
    background: #ef4444;
    color: white;
}

.mobile-btn-login {
    background: #0d9488;
    color: white;
}

.mobile-btn-register {
    background: #065f46;
    color: white;
}

.mobile-whatsapp-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

[data-theme="dark"] .mobile-whatsapp-section {
    border-color: #334155;
}

.mobile-btn-whatsapp {
    background: #25d366;
    color: white;
}

/* ============================================
   Buttons - الأزرار
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--teal-primary), var(--teal-secondary));
    color: white;
    font-weight: 800;
    border-radius: var(--radius-full);
    padding: 1rem 2.5rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--teal-primary);
    border: 3px solid var(--teal-primary);
    font-weight: 800;
    border-radius: var(--radius-full);
    padding: 0.875rem 2.5rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--teal-primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   WhatsApp Float Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 24px;
    right: 24px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* ============================================
   Theme & Language Toggle Buttons
   ============================================ */
.theme-toggle,
.lang-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.125rem;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--teal-primary);
    color: white;
    border-color: var(--teal-primary);
    transform: scale(1.05);
}

/* Fixed Controls Container */
.fixed-controls {
    position: fixed;
    left: 24px;
    bottom: 100px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#mobile-menu.active,
#mobile-menu.flex {
    display: flex;
}

/* ============================================
   Cards - الكروت
   ============================================ */
.card-hover {
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: rgba(13, 148, 136, 0.1);
}

/* ============================================
   Text Effects
   ============================================ */
.text-gradient,
.gradient-text {
    background: linear-gradient(135deg, var(--teal-primary), var(--teal-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Forms
   ============================================ */
input,
textarea,
select {
    transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teal-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* ============================================
   Images
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform var(--transition-slow);
}

.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* ============================================
   Line Clamp
   ============================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--teal-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--teal-secondary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-bounce-slow:hover {
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* --- Delight Animations --- */
@keyframes blob-spin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    to { transform: rotate(360deg) scale(1); }
}
.blob-spin {
    animation: blob-spin 20s infinite linear;
}

.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-shine:hover::after {
    transform: rotate(30deg) translateX(100%);
}

.icon-pop {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-hover:hover .icon-pop {
    transform: scale(1.2) translateY(-5px);
}

/* ============================================
   Skip Link (Accessibility)
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 1rem;
}

/* ============================================
   Print Optimization
   ============================================ */
@media print {

    .whatsapp-float,
    .fixed-controls,
    .btn-primary,
    .btn-secondary,
    #mobile-menu-button,
    .theme-toggle,
    .lang-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Extra Small devices (phones, 360px and down) */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
    }

    .fixed-controls {
        left: 16px;
        bottom: 80px;
    }

    .theme-toggle,
    .lang-toggle {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* Small devices (phones, 640px and down) */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 0.9375rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }

    h2 {
        font-size: 1.625rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }

    /* Stack buttons on mobile */
    .flex-wrap .btn-primary,
    .flex-wrap .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Mobile menu improvements */
    #mobile-menu ul {
        width: 100%;
        padding: 0 1.5rem;
    }

    #mobile-menu ul li {
        width: 100%;
        text-align: center;
    }

    #mobile-menu ul li a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    /* Cards stack on mobile */
    .grid {
        gap: 1rem;
    }

    /* Better touch targets */
    a,
    button {
        min-height: 44px;
    }

    /* Hero section mobile */
    section#hero {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    section#hero h1 {
        font-size: 1.875rem !important;
    }

    /* Stats section mobile */
    section#stats .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    section#stats h3 {
        font-size: 1.75rem !important;
    }

    /* FAQ mobile */
    .faq-question {
        font-size: 1rem;
        padding: 0.5rem 0;
    }

    /* Footer mobile */
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Fixed controls position */
    .fixed-controls {
        left: 16px;
        bottom: 90px;
    }

    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 20px;
        right: 20px;
    }
}

/* Tablets (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    /* Two columns for most grids */
    .grid.md\\:grid-cols-3,
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.md\\:grid-cols-4,
    .grid.lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens (1025px and up) */
@media (min-width: 1025px) {
    .container {
        max-width: 1280px;
    }
}

/* Touch devices optimization */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
    }

    .img-hover-zoom:hover img {
        transform: none;
    }

    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }

    /* Active states for touch */
    .card-hover:active {
        transform: scale(0.98);
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    section#hero {
        min-height: auto;
        padding: 2rem 0;
    }

    #mobile-menu {
        padding: 1rem;
        justify-content: flex-start;
        overflow-y: auto;
    }

    #mobile-menu ul {
        gap: 0.5rem;
    }
}

/* ============================================
   RTL Specific Fixes
   ============================================ */
[dir="rtl"] .fa-arrow-left {
    transform: scaleX(-1);
}

[dir="rtl"] .fa-arrow-right {
    transform: scaleX(-1);
}

/* ============================================
   Language Selector Dropdown
   ============================================ */
.lang-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    min-width: 140px;
}

.lang-toggle:hover .lang-dropdown,
.lang-toggle:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.lang-dropdown a:hover {
    background: var(--bg-tertiary);
}

.lang-dropdown a.active {
    background: var(--teal-primary);
    color: white;
}

/* ============================================
   Video Enhancements
   ============================================ */
video {
    border-radius: var(--radius-lg);
    max-width: 100%;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   Focus Visible (Keyboard Navigation)
   ============================================ */
.keyboard-navigation *:focus {
    outline: 3px solid var(--teal-primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--teal-primary);
    outline-offset: 2px;
}

/* ============================================
   PWA - Install Banner
   ============================================ */
.pwa-install-banner {
    position: fixed;
    bottom: -120px;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 0 1rem 1rem;
    transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.pwa-install-banner.show {
    bottom: 0;
    pointer-events: all;
}

.pwa-install-content {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(13, 148, 136, 0.3);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3), 0 0 60px rgba(13, 148, 136, 0.1);
    backdrop-filter: blur(20px);
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0d9488 0%, #065f46 60%, #d4af37 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-text strong {
    display: block;
    color: #f1f5f9;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-text span {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-btn {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #0d9488, #065f46);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.pwa-dismiss-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

/* PWA Offline Indicator */
.pwa-offline-indicator {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 12px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: top 0.4s ease;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.pwa-offline-indicator.show {
    top: 0;
}

/* PWA Standalone Mode Adjustments */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
    }

    .whatsapp-float {
        bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
    }

    .pwa-install-banner {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .pwa-install-content {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .pwa-install-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .pwa-install-text strong {
        font-size: 0.8rem;
    }

    .pwa-install-text span {
        font-size: 0.7rem;
    }

    .pwa-install-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}