/* ── Root Variables ── */
:root {
    --gold: #C9A84C;
    --gold-light: #D4B65C;
    --gold-dark: #B8962E;
    --black: #000000;
    --white: #FFFFFF;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #CCCCCC;
    --gray-400: #999999;
    --gray-500: #666666;
    --gray-600: #444444;
    --gray-700: #333333;
    --gray-800: #1A1A1A;
    --gray-900: #0D0D0D;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* ── RTL & Multi-language Support ── */
[dir="rtl"] {
    font-family: 'Cairo', 'Inter', sans-serif;
}
[dir="rtl"] body {
    font-family: 'Cairo', 'Inter', sans-serif;
}
[dir="rtl"] #lang-dropdown {
    right: auto;
    left: 0;
}
[dir="rtl"] #close-modal-x {
    right: auto;
    left: 1rem;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select,
[dir="rtl"] .form-input,
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"] {
    text-align: right !important;
    direction: rtl !important;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder,
[dir="rtl"] .form-input::placeholder {
    text-align: right !important;
    direction: rtl !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--black);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ── Utility: Gold ── */
.text-gold {
    color: var(--gold);
}
.border-gold {
    border-color: var(--gold);
}
.bg-gold {
    background-color: var(--gold);
}

.gold-gradient-text {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glassmorphism ── */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.1);
}
.glass-dark {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.glass-nav {
    background: rgba(10, 10, 15, 0.45) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.glass-nav.scrolled {
    background: rgba(8, 8, 12, 0.75) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    backdrop-filter: blur(16px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
    border-bottom: 1px solid rgba(201, 168, 76, 0.35) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
}

/* ── Language Trigger Button & Glass Dropdown Panel ── */
#lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

#lang-btn:hover {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.4);
}

/* Glass Language Panel */
#lang-dropdown {
    background: rgba(14, 14, 20, 0.45) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    backdrop-filter: blur(32px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), inset 0 1.5px 0 0 rgba(255, 255, 255, 0.4) !important;
    border-radius: 1rem !important;
    overflow: hidden;
}

#lang-dropdown button {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    z-index: 1;
}

#lang-dropdown button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--gold) !important;
    padding-left: 1.25rem !important;
}

[dir="rtl"] #lang-dropdown button:hover {
    padding-left: 1rem !important;
    padding-right: 1.25rem !important;
}

/* ── Scroll Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 {
    transition-delay: 0.1s;
}
.delay-2 {
    transition-delay: 0.2s;
}
.delay-3 {
    transition-delay: 0.3s;
}
.delay-4 {
    transition-delay: 0.4s;
}
.delay-5 {
    transition-delay: 0.5s;
}
.delay-6 {
    transition-delay: 0.6s;
}
.delay-7 {
    transition-delay: 0.7s;
}

/* ── Shimmer Button ── */
.btn-shimmer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    background-size: 200% auto;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-shimmer:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}
.btn-shimmer:active {
    transform: translateY(0) scale(0.98);
}

/* ── Gold Border Button ── */
.btn-gold-border {
    position: relative;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-gold-border:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}
.btn-gold-border:active {
    transform: scale(0.97);
}

/* ── Hero Grid ── */
.hero-bg {
    position: relative;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
.grid-lines {
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── Split Tabs ── */
.split-tab {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.split-tab.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    background-size: 200% auto;
    border-color: var(--gold);
    color: var(--black);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}
.split-tab:not(.active) {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
}
.split-tab:not(.active):hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold);
}

.split-panel {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.split-panel.hidden-panel {
    opacity: 0;
    position: absolute;
    pointer-events: none;
    transform: translateY(16px);
    width: 100%;
}
.split-panel.visible-panel {
    opacity: 1;
    position: relative;
    pointer-events: all;
    transform: translateY(0);
}

/* ── Form Elements ── */
.form-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.25s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
    background: rgba(255, 255, 255, 0.07);
}
.form-input::placeholder {
    color: var(--gray-500);
}
.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--white);
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset;
    transition: background-color 5000s ease-in-out 0s;
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23D4AF37' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
select.form-input option {
    background: var(--gray-900);
    color: var(--white);
}

/* ── Role Cards ── */
.role-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.role-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.03);
    transform: translateY(-2px);
}
.role-card:active {
    transform: translateY(0) scale(0.98);
}
.role-card.active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.08);
}
.role-card .check-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.role-card.active .check-dot {
    border-color: var(--gold);
    background: var(--gold);
}
.role-card.active .check-dot::after {
    content: '✓';
    color: var(--black);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}



/* ── Stats ── */
.stat-number {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ── Glow ── */
.glow-gold {
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.12);
}

/* ── Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Success Animation ── */
@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.success-icon {
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── Particles ── */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.25;
    animation: float 6s ease-in-out infinite;
}
.particle:nth-child(2n) {
    animation-delay: 2s;
    opacity: 0.12;
}
.particle:nth-child(3n) {
    animation-delay: 4s;
    opacity: 0.18;
    width: 2px;
    height: 2px;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ── Mobile Nav Overlay ── */
.mobile-nav-open {
    overflow: hidden;
}

/* ── Image Loading ── */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img.loaded,
img[src*=".png"] {
    opacity: 1;
}

/* ── Touch-friendly min-tap targets ── */
@media (pointer: coarse) {
    .min-tap-44 {
        min-height: 44px;
        min-width: 44px;
    }
    .btn-shimmer,
    .btn-gold-border,
    .role-card,
    .split-tab,
    .nav-link {
        min-height: 44px;
    }
}

/* ── Responsive breakpoint tweaks ── */
@media (max-width: 639px) {
    .hero-ring-mobile {
        display: none;
    }
    .split-tab svg {
        width: 18px;
        height: 18px;
    }
    .split-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .split-tab {
        padding: 14px 40px;
        font-size: 15px;
    }
}

/* ── Shake ── */
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    50%,
    90% {
        transform: translateX(-6px);
    }
    30%,
    70% {
        transform: translateX(6px);
    }
}
.shake {
    animation: shake 0.5s ease;
}

/* ── Loading shimmer for skeleton ── */
@keyframes shimmer-bg {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ── Centered Content (Split Panels) ── */
.split-panel .reveal-left,
.split-panel .reveal-right {
    text-align: center;
}
.split-panel ul li {
    justify-content: center;
}

/* ── Logo Animation ── */
.splash-logo-container {
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeScaleBounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeScaleBounce {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.taxi-checkerboard {
    position: absolute;
    top: -45px; 
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 15px);
    grid-template-rows: repeat(2, 15px);
    z-index: 20;
}

.checker-square {
    background-color: #C5A86B;
    opacity: 0;
    transform: scale(0);
}

.sq-bottom-left { grid-column: 1; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.0s forwards; }
.sq-top-left { grid-column: 2; grid-row: 1; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.2s forwards; }
.sq-center { grid-column: 3; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.4s forwards; }
.sq-top-right { grid-column: 4; grid-row: 1; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.6s forwards; }
.sq-bottom-right { grid-column: 5; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.8s forwards; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

.taxi-checkerboard-sm {
    position: absolute;
    top: -6px; 
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 3px);
    grid-template-rows: repeat(2, 3px);
    z-index: 20;
}

.checker-square-sm {
    background-color: #C5A86B;
    opacity: 0;
    transform: scale(0);
}

.sq-bottom-left-sm { grid-column: 1; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.0s forwards; }
.sq-top-left-sm { grid-column: 2; grid-row: 1; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.2s forwards; }
.sq-center-sm { grid-column: 3; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.4s forwards; }
.sq-top-right-sm { grid-column: 4; grid-row: 1; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.6s forwards; }
.sq-bottom-right-sm { grid-column: 5; grid-row: 2; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.8s forwards; }
