/* 
    AFRA DRIVER - Cyber-Safety Premium Design System
    Created for Auto Ecole AFRA DRIVER (Ouarzazate)
*/

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cairo:wght@400;600;700;900&display=swap');

/* RTL Global Font — applies from first paint via [dir=rtl] + after JS via .rtl-active */
[dir="rtl"] *:not(.fas):not(.fab):not(.far),
.rtl-active *:not(.fas):not(.fab):not(.far) {
    font-family: 'Almarai', sans-serif !important;
    line-height: 1.7 !important;
}

/* Font warmer: 1px (not 0) so browser actually downloads the font */
.font-warmer {
    font-family: 'Almarai', sans-serif;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    font-size: 1px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

:root {
    /* Color Palette */
    --primary: #FF6B00; /* Safety Orange */
    --primary-dark: #E65100;
    --primary-glow: rgba(255, 107, 0, 0.4);
    
    --bg-dark: #0A0A0A;
    --bg-card: #141414;
    --bg-accent: #1A1A1A;
    
    --text-white: #FFFFFF;
    --text-gray: #A0A0A0;
    --text-muted: #666666;
    
    /* Layout */
    --container-width: 1300px;
    --border-radius: 20px;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(10, 10, 10, 0.85);
    
    /* Animations */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

:root.light-theme {
    --bg-dark: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-accent: #E9ECEF;
    --text-white: #1A1A1A;
    --text-gray: #495057;
    --text-muted: #6C757D;
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.9);
    --primary-glow: rgba(255, 107, 0, 0.2);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Accounts for fixed header */
    overflow-x: hidden;
}

.mobile-only {
    display: none !important;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .nav-brand {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { 
    background: var(--primary); 
    border-radius: 5px;
    border: 3px solid var(--bg-dark);
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 95px; /* صغرنا اللوغو لـ 95px */
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.3)); /* وهج ليموني خفيف */
    animation: logoFloat 3s ease-in-out infinite; /* حركة عائمة */
}

/* حركة عائمة احترافية */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* فاش يكون الـ Theme بيض، اللوغو ديال الـ Navbar بوحدو اللي كايولي كحل */
.light-theme .navbar .logo-img {
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));
}

.logo-img:hover {
    transform: scale(1.1) rotate(2deg); /* تكبير مع دورة خفيفة */
    filter: drop-shadow(0 0 15px rgba(255, 107, 0, 0.6)); /* وهج أقوى فـ الـ Hover */
}

.footer-logo .logo-img {
    height: 160px;
    margin-bottom: 2rem;
    animation: logoFloat 4s ease-in-out infinite; /* حركة أبطأ شوية لتحت */
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand span { color: var(--primary); }

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    background: rgba(40, 167, 69, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.light.green {
    background: #28a745;
    box-shadow: 0 0 10px #28a745;
    animation: pulse 2s infinite;
}

.light.red {
    background: #dc3545;
    box-shadow: 0 0 10px #dc3545;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-rating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    color: #FFD700 !important;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.header-rating:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.5);
}

.header-rating.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.theme-toggle, .lang-selector {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-weight: 700;
}

.lang-selector {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FF6B00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 0.8rem) center;
    padding-right: 2.2rem;
    border-radius: 12px;
    width: auto;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    padding-left: 0.8rem;
    font-size: 0.85rem;
    background-color: rgba(255, 107, 0, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.2);
    color: var(--text-white);
    font-weight: 700;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.lang-selector:hover {
    background-color: rgba(255, 107, 0, 0.1);
    border-color: var(--primary);
}

.lang-selector option {
    background: #1a1a1a;
    color: #fff;
    padding: 10px;
}

.theme-toggle:hover {
    background: rgba(255, 107, 0, 0.1);
    border-color: var(--primary);
}

.nav-link {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-gray);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-cta .cta-btn {
    background: var(--primary);
    color: #000;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 800;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-cta .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
    filter: brightness(1.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-text h1 span {
    color: var(--primary);
    position: relative;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.hero-btns-top {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.2rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #ff6b00;
    color: #000;
}

.btn-secondary {
    background: var(--bg-accent);
    color: var(--text-white);
    border: 1px solid var(--glass-border);
}

.light-theme .btn-secondary {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #dee2e6;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.btn-primary:hover {
    background: #ff8533;
}

.image-box {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 0, 0.4);
    box-shadow: 0 0 80px rgba(255, 107, 0, 0.4), 0 0 20px rgba(255, 107, 0, 0.2);
    transition: var(--transition);
}

.image-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 50px rgba(255, 107, 0, 0.2);
    pointer-events: none;
}

.image-box img {
    width: 100%;
    height: auto;
    display: block;
    transition: 1s ease;
}

.image-box:hover img {
    transform: scale(1.05);
}

/* Permit Categories */
.section {
    padding: 100px 0;
}

.section.bg-accent {
    background: var(--bg-accent);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.permits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.permit-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.permit-card.popular {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.05);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.1);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    border: 1.5px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.3), inset 0 0 10px rgba(255, 107, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 100;
    color: var(--text-white);
}

.popular-badge i {
    color: var(--primary);
    font-size: 0.9rem;
    filter: drop-shadow(0 0 5px var(--primary));
    animation: star-pulse 2s infinite ease-in-out;
}

@keyframes star-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.popular-badge span {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    animation: none !important;
}

.permit-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 18px;
    margin-bottom: 2rem;
}

.permit-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.price-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.price-old {
    font-size: 1.1rem;
    color: var(--text-gray);
    text-decoration: line-through;
    font-weight: 600;
    opacity: 0.7;
    display: none; /* Shown via JS */
}

.permit-card .price {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary);
    margin: 0; /* Margin moved to container */
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
    transition: var(--transition);
    position: relative;
}

.permit-card:hover .price {
    transform: scale(1.1);
    color: #fff;
    text-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
}

.permit-card .price span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-gray);
    text-shadow: none;
}

/* Promo Tag */
.promo-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff3d00, #ff8f00);
    color: white;
    padding: 4px 12px;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3);
    z-index: 10;
    display: none; /* Shown via JS */
    animation: promoPulse 2s infinite ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes promoPulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 61, 0, 0.5); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3); }
}

.permit-card ul {
    text-align: left;
    width: 100%;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.permit-card ul li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.permit-card ul li i {
    color: var(--primary);
    font-size: 1.1rem;
}

.permit-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: var(--primary);
    color: #000;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.permit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.3);
    filter: brightness(1.1);
}

/* Light Theme Overrides for Cards */
.light-theme .permit-card {
    background: #fff;
    border-color: #eee;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.light-theme .permit-card h3 { color: #111; }
.light-theme .permit-card ul li { color: #444; }
.light-theme .permit-btn { color: #fff; }

.stats {
    background: var(--bg-dark);
    padding: 80px 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 0, 0.2);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
    transition: var(--transition);
    line-height: 1;
}

.stat-item:hover h3 {
    transform: scale(1.1);
    text-shadow: 0 0 35px rgba(255, 107, 0, 0.7);
}

.stat-item p {
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-item {
    padding: 2rem;
    border-radius: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: var(--transition);
}

.service-item:hover {
    background: rgba(255, 107, 0, 0.05);
    border-color: var(--primary);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Permit Calculator Utility Classes */
.permit-calc {
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid var(--primary);
}

.calc-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calc-header h2 {
    color: var(--primary);
}

.calc-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.calc-step h4 {
    margin-bottom: 1.5rem;
}

.calc-step-options {
    display: flex;
    gap: 1rem;
}

#calc-result {
    margin-top: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.newsletter-box {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    padding: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    width: 100%;
}

/* Quiz Utility Classes */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.quiz-question-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.quiz-question-text {
    margin-bottom: 2rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quiz-feedback {
    margin-top: 2rem;
    font-weight: 700;
    display: none;
}

/* Integrated Quiz Styles */
.quiz-container-large {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

/* --- STATS SECTION --- */

.quiz-footer-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-next-btn {
    display: none;
    padding: 0.8rem 1.5rem;
}

.series-picker {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.series-btn {
    background: var(--bg-accent);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

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

.series-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
}

.score-circle-small {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
}

.score-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.stars {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 5px;
}

.testi-text {
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.testi-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.user-info h4 {
    font-size: 1.1rem;
}

.user-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.testi-badge {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.rate-us-box {
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--primary);
    padding: 3rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    margin: 0 auto;
}

.user-rating {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin: 1.5rem 0;
    cursor: pointer;
}

.user-rating i {
    transition: var(--transition);
    margin: 0 5px;
}

.user-rating i.active, .user-rating i.hover {
    color: #FFD700;
    transform: scale(1.2);
}

.rate-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.rate-form input, .rate-form textarea {
    background: var(--bg-accent);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-white);
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.rate-form textarea {
    resize: vertical;
    max-width: 100%;
    min-height: 80px;
}

.rate-form input:focus, .rate-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    text-align: left;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    background: rgba(255, 107, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-card i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition);
}

.contact-card:hover i {
    background: var(--primary);
    color: var(--bg-dark);
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group input, .form-group textarea, .form-select {
    width: 100%;
    background: var(--bg-accent);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-white);
    font-family: inherit;
    transition: var(--transition);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FF6B00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 1.2rem) center;
    padding-right: 3rem;
    cursor: pointer;
}

[dir="rtl"] .form-select {
    background-position: 1.2rem center;
    padding-right: 1rem;
    padding-left: 3rem;
}

.lang-selector:focus, .form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FF6B00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 4.86 12.043 10.342c.566.645.106 1.658-.753 1.658H1.702c-.859 0-1.319-1.013-.753-1.658l4.796-5.482a1 1 0 0 1 1.502 0z'/%3E%3C/svg%3E");
    border-color: var(--primary);
    outline: none;
}

.form-select option {
    background: #1A1A1A; /* Fixed dark background */
    color: #FFFFFF;
    padding: 10px;
}

.form-group input:focus, .form-group textarea:focus, .form-select:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(255, 107, 0, 0.05);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--primary-glow);
    filter: brightness(1.1);
}

.submit-btn i {
    font-size: 1rem;
}

/* Light Theme Overrides */
.light-theme .form-group input, 
.light-theme .form-group textarea, 
.light-theme .form-select {
    background: #f9f9f9;
    border-color: #ddd;
    color: #333;
}

.light-theme .form-select option {
    background: #FFFFFF;
    color: #333333;
}

.light-theme .header-rating {
    background: rgba(255, 160, 0, 0.1);
    border-color: rgba(255, 160, 0, 0.3);
    color: #E65100 !important;
}

.light-theme .header-rating i {
    filter: none;
}

.light-theme .nav-link {
    color: #333;
}

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

.light-theme .theme-toggle, .light-theme .lang-selector {
    background-color: #fff;
    border-color: #ddd;
    color: #333;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Footer */
footer {
    padding: 80px 0 30px;
    background: #050505;
    color: #FFFFFF;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p, footer li a {
    color: #A0A0A0 !important;
}

footer h2, footer h4 {
    color: #FFFFFF !important;
}

footer a:hover {
    color: var(--primary) !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 50px;
}

.footer-logo h2 {
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    background: var(--primary);
    color: #000000 !important;
    transform: rotate(15deg);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.designer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.designer-link:hover {
    filter: brightness(1.2);
    text-decoration: underline;
}

/* --- Responsive & Mobile Optimizations --- */

/* Hamburger Menu Styles */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-white);
    transition: var(--transition);
}

.nav-toggle:hover {
    color: var(--primary);
}

.nav-close-container {
    list-style: none;
    width: 100%;
}

.nav-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-white);
    display: none; /* Only show in mobile menu */
}

.nav-close:hover {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .navbar {
        padding: 0 2rem;
    }

    .nav-menu .nav-close {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: 250px; /* رديناها رقيقة بزاف بـ 250px ثابتة */
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 6rem;
        padding-bottom: 2rem;
        overflow-y: auto;
        gap: 1.8rem; /* نقصنا المسافة بين الروابط */
        transition: transform 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        border-left: 1px solid var(--primary);
        visibility: hidden;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    /* RTL Fix: فاش تكون العربية، السايدبار كايخرج من اليسار */
    html[dir="rtl"] .nav-menu {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        border-left: none;
        border-right: 1px solid var(--primary);
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    html[dir="rtl"] .nav-menu.active {
        transform: translateX(0);
    }

    html[dir="rtl"] .nav-close {
        right: auto;
        left: 2rem;
    }

    .navbar {
        padding: 0 0.5rem;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.2rem;
        height: clamp(65px, 9vw, 80px);
    }

    .nav-brand {
        font-size: min(7.5vw, 2.2rem) !important;
        letter-spacing: -1.5px;
        flex-shrink: 1;
        white-space: nowrap;
    }

    .nav-toggle {
        display: flex !important;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        color: #ffffff;
        align-items: center;
        justify-content: center;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        cursor: pointer;
        order: 10;
        flex-shrink: 0;
    }

    .nav-cta {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        order: 9;
        flex-shrink: 0;
        margin-left: auto;
    }

    .header-rating {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 107, 0, 0.1);
        border: 1px solid rgba(255, 107, 0, 0.3);
        font-weight: 800;
        text-decoration: none !important;
        color: var(--text-white) !important;
    }

    .header-rating span {
        display: none;
    }

    .header-rating i {
        color: var(--primary);
    }

    .theme-toggle, .lang-selector {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    .lang-selector {
        width: auto !important;
        padding: 0 0.6rem !important;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .loading-reviews {
        text-align: center;
        padding: 3rem;
        color: var(--text-muted);
        grid-column: 1 / -1;
    }
} /* Closing max-width: 1024px */

/* Global Testimonials System Styles */
.see-more-container {
    display: flex;
    justify-content: center;
    margin: 4rem 0;
    width: 100%;
}

#load-more-btn {
    padding: 0.8rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
}

#load-more-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.3);
}

.pagination-container {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    width: 100%;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    background: rgba(255, 107, 0, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-dark);
}

/* Override Rate Us dashed to solid */
.rate-us-box {
    border: 1px solid var(--primary) !important;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    /* Rate Success Styles */
    .rate-success-card {
        text-align: center;
        padding: 3rem 2rem;
        background: rgba(255, 107, 0, 0.05);
        border-radius: 20px;
        border: 1px solid var(--primary);
    }

    .rate-success-icon {
        font-size: 4rem;
        color: var(--primary);
        margin-bottom: 1.5rem;
    }

    .rate-success-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        font-family: 'Outfit', sans-serif;
    }

    .rate-success-desc {
        color: var(--text-gray);
        font-size: 1.1rem;
    }

    .theme-toggle:active {
        transform: scale(0.9);
        background: rgba(255, 107, 0, 0.1);
    }

    .hero-content, .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 5rem;
    }

    .hero-btns-top {
        flex-direction: row !important; /* Keep buttons side by side on iPad */
        justify-content: center;
        gap: 1rem;
    }

    .hero-btns-top .btn {
        width: auto !important;
        min-width: 180px;
    }

    .contact-hero-btn {
        width: auto !important;
        min-width: 250px;
        margin: 1rem auto 0;
    }

    /* RTL Header Fixes for Mobile/Tablet */
    [dir="rtl"] .nav-brand {
        margin-left: 0;
        margin-right: 0;
    }

    [dir="rtl"] .nav-cta {
        margin-left: 0;
        margin-right: auto; /* Pushes to the left in RTL */
    }

    [dir="rtl"] .nav-toggle {
        margin-left: 0;
    }
    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p { margin: 0 auto 2.5rem; }
    .hero-actions { 
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-btns-top {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .navbar {
        height: clamp(60px, 12vw, 75px);
        padding: 0 0.5rem;
    }

    .nav-brand {
        font-size: clamp(1.1rem, 4.5vw, 1.5rem);
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .navbar {
        height: clamp(65px, 9vw, 80px);
    }

    .stats-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 2rem; 
    }

    .permit-calc {
        padding: 2rem;
    }

    .calc-step-options {
        flex-wrap: wrap;
        justify-content: center;
    }

    .series-picker {
        flex-wrap: wrap;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 1.5rem;
    }

    .permits-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .social-icons { justify-content: center; }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .gallery-item.large {
        grid-row: span 1;
        height: 300px;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .nav-brand {
        font-size: 1rem !important;
    }
    
    .header-rating span {
        display: none;
    }
    
    .header-rating {
        padding: 0 0.5rem !important;
        width: clamp(30px, 8vw, 36px);
        justify-content: center;
    }

    .stat-item h3 {
        font-size: 2.2rem;
    }
}

/* Rare Feature: Headlight Glow Animation */
@keyframes headlight {
    0% { filter: drop-shadow(0 0 10px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 30px var(--primary)); }
    100% { filter: drop-shadow(0 0 10px var(--primary-glow)); }
}
/* Permit Simulator Styling */
.permit-calc-container {
    background: #0d0d0d;
    border: 1px solid var(--primary);
    border-radius: 30px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(255, 107, 0, 0.1);
}

.calc-step h4 {
    margin-bottom: 2rem;
    font-size: 1.3rem;
    color: var(--text-white);
}

.calc-step-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calc-opt {
    min-width: 150px;
    justify-content: center;
}

.calc-opt.active {
    border-color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

#calc-result p {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quiz Options Grid */
.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .calc-step-options {
        flex-direction: column;
        align-items: center;
    }
    
    .calc-opt {
        width: 100%;
    }
}

.headlight-active {
    animation: headlight 2s infinite;
}

/* Arabic Specific Styling */
body.rtl-active {
    font-family: 'Cairo', sans-serif;
}

body.rtl-active h1, 
body.rtl-active h2, 
body.rtl-active h3, 
body.rtl-active .nav-brand {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
}

body.rtl-active .nav-menu {
    gap: 3rem;
}

body.rtl-active .cta-btn {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

body.rtl-active .hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.3;
}
/* RTL (Arabic) Layout & Typography Adjustments */
[dir="rtl"] body,
.rtl-active {
    direction: rtl;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
.rtl-active h1,
.rtl-active h2,
.rtl-active h3 {
    font-weight: 800 !important;
    text-shadow: 0 2px 10px rgba(255, 107, 0, 0.2);
    letter-spacing: 0 !important;
}

[dir="rtl"] .nav-link,
[dir="rtl"] .cta-btn,
[dir="rtl"] .btn,
.rtl-active .nav-link,
.rtl-active .cta-btn,
.rtl-active .btn {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

[dir="rtl"] .navbar,
.rtl-active .navbar {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-brand,
.rtl-active .nav-brand {
    margin-right: 0;
    margin-left: 1.5rem;
}

[dir="rtl"] .nav-menu,
.rtl-active .nav-menu {
    margin-left: 0;
    margin-right: 2rem;
}

[dir="rtl"] .nav-cta,
.rtl-active .nav-cta {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .nav-toggle,
.rtl-active .nav-toggle {
    margin-right: auto;
    margin-left: 0;
}
/* Floating Mobile CTA */
.floating-cta {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--primary);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.4);
    z-index: 9999;
    font-family: 'Almarai', sans-serif;
    transition: all 0.3s ease;
}

.floating-cta i {
    font-size: 1.4rem;
}

.floating-cta:active {
    transform: scale(0.9);
}

@media (min-width: 769px) {
    .floating-cta {
        display: none !important;
    }
}

.rtl-active .nav-cta {
    margin-left: 0;
    margin-right: auto;
}

.rtl-active .nav-toggle {
    margin-right: auto;
    margin-left: 0;
}

/* Extra Hours Card Styling */
.permit-card.extra-hours {
    border: 2px dashed var(--primary);
    background: rgba(255, 107, 0, 0.05);
}

/* Instructor Select Styling */
.instructor-select {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.select-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.instructor-btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instructor-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.instructor-card:hover {
    background: rgba(255, 107, 0, 0.08);
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .instructor-card:hover {
    transform: translateX(-8px);
}

.inst-avatar {
    width: 42px;
    height: 42px;
    background: var(--bg-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
}

.instructor-card:hover .inst-avatar {
    background: var(--primary);
    color: #000;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 15px var(--primary-glow);
}

.inst-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.inst-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-white);
}

.inst-phone {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 500;
    direction: ltr !important;
    display: inline-block;
}

.inst-actions {
    display: flex;
    gap: 8px;
}

.inst-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.inst-action-btn.call {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
}

.inst-action-btn.call:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.inst-action-btn.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.2);
}

.inst-action-btn.whatsapp:hover {
    background: #25D366;
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

[dir="rtl"] .inst-info {
    text-align: right;
}

[dir="rtl"] .inst-info {
    text-align: right;
}

[dir="rtl"] .instructor-btn:hover {
    transform: translateX(-5px);
}

/* Premium Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex !important;
    opacity: 1;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.lightbox-media {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

.lightbox-media img, .lightbox-media video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-media img,
.lightbox.active .lightbox-media video {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
    line-height: 1;
}

.close-lightbox:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.lightbox-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    z-index: 10002;
}

.zoom-controls {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 40px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.zoom-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.zoom-btn:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.lightbox-nav {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.lightbox-caption {
    margin-top: 20px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Gallery Item Enhancements */
.gallery-item {
    position: relative;
    cursor: zoom-in;
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
}

/* Fix mobile header overlap */
@media (max-width: 1024px) {
    .nav-cta .cta-btn {
        display: none !important;
    }
    
    .nav-cta {
        gap: 0.8rem;
    }

    .header-rating {
        display: flex !important;
    }
}

/* Rating Summary (Testimonials Section) */
.rating-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.stars-row {
    color: #ffb400;
    font-size: 1.4rem;
    display: flex;
    gap: 6px;
}

.rating-value {
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--text-white);
}

.rating-count {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Light Mode Refinements */
.light-theme .series-btn,
.light-theme .calc-opt,
.light-theme .quiz-option,
.light-theme .newsletter-input,
.light-theme .social-icons a,
.light-theme .rate-form input,
.light-theme .rate-form textarea {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #dee2e6 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

.light-theme .series-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

.light-theme .quiz-container {
    background: #ffffff !important;
    border-color: #eee !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05) !important;
}

.light-theme .testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #ffffff !important;
}

/* Site Toast Notifications */
.site-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    color: var(--text-white);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}
.site-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
.site-toast.error {
    border-left-color: #dc3545;
}
html[dir="rtl"] .site-toast {
    border-left: none;
    border-right: 4px solid var(--primary);
}
html[dir="rtl"] .site-toast.error {
    border-right-color: #dc3545;
}

/* RTL Arrow Flipping (Arabic Mode) */
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left {
    transform: scaleX(-1);
    display: inline-block; /* Ensure transform applies */
}

/* Custom Cursor System */
@media (min-width: 1025px) {
    body {
        cursor: none;
    }
    
    a, button, select, input, textarea, .gallery-item, .permit-card, .btn, .nav-link, .header-rating, .logo-link {
        cursor: none;
    }

    .custom-cursor {
        width: 10px;
        height: 10px;
        background: var(--primary);
        border-radius: 50%;
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 10001;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
        box-shadow: 0 0 10px var(--primary-glow);
    }

    .cursor-follower {
        width: 35px;
        height: 35px;
        border: 2px solid var(--primary);
        border-radius: 50%;
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
    }

    /* Active/Hover State */
    .cursor-active .custom-cursor {
        width: 6px;
        height: 6px;
        background: #fff;
    }

    .cursor-active .cursor-follower {
        width: 70px;
        height: 70px;
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 107, 0, 0.1);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
}

@media (max-width: 1024px) {
    .custom-cursor, .cursor-follower {
        display: none;
    }
    
    .lang-selector, .form-select, .lang-selector:focus, .form-select:focus {
        background-image: none !important;
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }
}

/* 3D Preloader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    overflow: hidden;
}

.loader-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero.png');
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.2);
    transform: scale(1.15); /* Avoid blur edges */
    z-index: -2;
    opacity: 0.6;
    animation: slowZoom 20s infinite alternate linear;
}

@keyframes slowZoom {
    0% { transform: scale(1.15); }
    100% { transform: scale(1.3); }
}

/* Background Glow Effects */
.loader-wrapper::before, .loader-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: -1;
    animation: moveGlow 15s infinite alternate ease-in-out;
}

.loader-wrapper::after {
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    width: 300px;
    height: 300px;
    opacity: 0.05;
    animation-duration: 20s;
    animation-delay: -7s;
}

@keyframes moveGlow {
    0% { transform: translate(-30%, -30%); }
    100% { transform: translate(30%, 30%); }
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-3d {
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.steering-wheel-container {
    perspective: 1000px;
}

.steering-wheel {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    animation: driveWheel3D 3s infinite ease-in-out;
}

@keyframes driveWheel3D {
    0% { transform: rotate(0deg) rotateY(0deg) rotateX(20deg); }
    25% { transform: rotate(-45deg) rotateY(30deg) rotateX(25deg); }
    50% { transform: rotate(0deg) rotateY(0deg) rotateX(20deg); }
    75% { transform: rotate(45deg) rotateY(-30deg) rotateX(25deg); }
    100% { transform: rotate(0deg) rotateY(0deg) rotateX(20deg); }
}

.loader-text-3d {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 10px;
    margin-top: 2rem;
    transform-style: preserve-3d;
    animation: floatingText3D 3s infinite ease-in-out;
    /* Layered shadows to create 3D depth */
    text-shadow: 
        1px 1px 0px #d95d00,
        2px 2px 0px #b34d00,
        3px 3px 0px #8c3c00,
        4px 4px 0px #662b00,
        0 10px 20px rgba(0,0,0,0.5);
}

@keyframes floatingText3D {
    0%, 100% { 
        transform: translateZ(0) rotateX(10deg); 
        text-shadow: 1px 1px 0px #d95d00, 2px 2px 0px #b34d00, 3px 3px 0px #8c3c00, 4px 4px 0px #662b00, 0 10px 20px rgba(0,0,0,0.5);
    }
    50% { 
        transform: translateZ(60px) rotateX(-10deg); 
        color: #fff;
        text-shadow: 1px 1px 0px #eee, 2px 2px 0px #ccc, 3px 3px 0px #aaa, 4px 4px 0px #888, 0 15px 30px rgba(255,107,0,0.4);
    }
}

body.loading {
    overflow: hidden !important;
}
