:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary: #eab308;
    --primary-hover: #ca8a04;
    --secondary: #fef08a;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --success: #10b981;
    --danger: #ef4444;
}

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

/* ─── Font Handling (RTL/LTR) ─── */
html[dir="rtl"] * { font-family: 'Tajawal', sans-serif; }
html[dir="ltr"] * { font-family: 'Inter', sans-serif; }
html[dir="ltr"] .glass-table th,
html[dir="ltr"] .glass-table td { text-align: left; }

/* ─── Base ─── */
body {
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Layout Utilities ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.pt-5 { padding-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.text-center { text-align: center; }
.d-inline { display: inline-block; }
.d-inline-block { display: inline-block; }
.w-100 { width: 100%; }
.mobile-only { display: none !important; }
.desktop-only { display: flex !important; }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { color: #ffffff; }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }

.gradient-text {
    color: var(--primary);
    display: inline-block;
}

.lead { font-size: 1.25rem; color: #e2e8f0; }
.text-muted { color: #94a3b8; }

/* ─── Navbar / Header ─── */
.glass-header {
    background: #000000;
    border-bottom: 1px solid #1c1c1c;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

/* ─── NAV LOGO (الصورة الأصلية في الشريط العلوي) ─── */
.nav-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.nav-logo-link:hover { opacity: 0.85; }

.nav-logo-img-brand {
    height: 52px;        /* حجم واضح وبارز في الشريط */
    width: auto;
    object-fit: contain;
    display: block;
}

/* ─── BRAND LOGO ─── */
/* Link wrapper */
.brand-logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s ease;
}
.brand-logo-link:hover { opacity: 0.85; }

/* Logo container — NAV */
.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

/* English line — NAV */
.brand-logo .brand-en {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1;
}

/* Arabic line — NAV */
.brand-logo .brand-ar {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
}

/* ─── Logo Colors (shared between nav & splash) ─── */
.brand-casting { color: #ffffff; }
.brand-house   { color: #eab308; }

/* ─── SPLASH LOGO ─── */
.splash-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.9s ease forwards;
}

.splash-brand .brand-en {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 0 40px rgba(234,179,8,0.15);
}

.splash-brand .brand-ar {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
}

/* ─── Nav Links ─── */
.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.25s;
    letter-spacing: 0.5px;
}
.nav-link:hover { color: var(--primary); }

/* ─── Buttons ─── */
button, .btn-primary, .btn-outline, .btn-success, .btn-danger {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.top-back-btn {
    position: absolute;
    top: 90px;
    right: 20px;
    z-index: 100;
    padding: 8px 15px;
}

.btn-primary {
    background: var(--primary);
    color: #000000;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: #ffffff;
}
.btn-outline:hover { background: var(--primary); color: #000; }

.btn-block { display: block; width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 0.875rem; }
.btn-success { background-color: var(--success); color: white; }
.btn-danger  { background-color: var(--danger); color: white; }

/* ─── Old logo classes (kept for compat) ─── */
.nav-logo-img { height: 38px; width: auto; max-width: 180px; object-fit: contain; border-radius: 4px; }
.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 800; color: #ffffff; text-decoration: none; }

/* ─── Cards & Grid ─── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 179, 8, 0.3);
}

.card-img {
    height: 250px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
}

.badge {
    background: rgba(234, 179, 8, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

/* ─── Forms ─── */
.join-container { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 20px; }
.half { flex: 1; }

label { display: block; margin-bottom: 8px; font-weight: 600; color: #e2e8f0; }

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #ffffff;
    outline: none;
    transition: 0.3s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.15);
}
option { background: #000000; color: #ffffff; }

/* ─── Admin Tables ─── */
.table-responsive { overflow-x: auto; }
.glass-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
}
.glass-table th, .glass-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--glass-border);
    color: #ffffff;
}
.glass-table th { background: rgba(0,0,0,0.4); color: var(--primary); font-weight: 700; }
.glass-table a { color: var(--primary); }

/* ─── Modal ─── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    width: 100%;
    max-width: 500px;
    position: relative;
    padding: 30px;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 16px;
}
.close-btn {
    position: absolute;
    top: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}
html[dir="rtl"] .close-btn { left: 20px; }
html[dir="ltr"] .close-btn { right: 20px; }
.close-btn:hover { color: #ffffff; }

/* ─── Alerts ─── */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; text-align: center; }
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid var(--success); color: #6ee7b7; }
.alert-danger  { background: rgba(239, 68, 68, 0.15);  border: 1px solid var(--danger);  color: #fca5a5; }

/* ─── Footer ─── */
footer {
    margin-top: auto;
    padding: 30px 0;
    border-top: 1px solid #1a1a1a;
    color: #94a3b8;
}

/* ─── City Selector ─── */
.city-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}
.city-card {
    flex: 1;
    min-width: 0;
    height: 450px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}
.city-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}
.city-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(234, 179, 8, 0.25);
}
.video-card { background: #000; }
.card-bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
}
.city-card h2 {
    font-size: 3rem;
    color: var(--primary);
    z-index: 2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    text-align: center;
    font-weight: 800;
}

/* ─── Squares Grid ─── */
.squares-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 40px auto 0;
}
.squares-grid .city-card {
    flex: none;
    width: 350px;
    height: 350px;
    aspect-ratio: 1 / 1;
    border-radius: 30px;
}
.city-arrow { display: none; }

/* ─── Category Menu ─── */
.category-menu {
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.category-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    transition: 0.3s;
}
.category-menu-item:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── Responsive (Mobile) ─── */
@media (max-width: 768px) {
    .mobile-only { display: block !important; }
    .desktop-only { display: none !important; }
    .category-menu.mobile-only { display: flex !important; flex-direction: column !important; }
    .mobile-only .category-menu-item {
        width: 100%;
        padding: 22px 30px;
        font-size: 1.5rem;
        border-radius: 14px;
    }

    .container { padding: 0 10px; }
    .form-row { flex-direction: column; gap: 0; }

    .top-back-btn {
        position: absolute;
        top: 115px;
        right: 15px;
        margin-bottom: 0;
        padding: 14px 20px;
        font-size: 1.1rem;
        font-weight: bold;
        background: #0d0d0d;
        border: 2px solid var(--primary);
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        z-index: 9999;
        border-radius: 12px;
    }

    .city-grid { gap: 10px; }
    .city-card { height: 300px; }
    .city-card h2 { font-size: 1.1rem; }

    .squares-grid { flex-direction: column; gap: 20px; padding: 0 10px; }
    .squares-grid .city-card { width: 100%; height: 220px; border-radius: 20px; }
    .squares-grid .city-card h2 { font-size: 1.4rem; color: #ffffff; font-weight: 700; }

    .hero-section h1 { font-size: 1.8rem; line-height: 1.4; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    .lead { font-size: 1.15rem; font-weight: 600; }

    /* Navbar */
    .nav-wrapper { flex-direction: column; height: auto; padding: 12px 0; gap: 12px; }
    nav { flex-wrap: wrap; justify-content: center; }
    .nav-link { font-size: 0.9rem; }
    .pt-5 { padding-top: 6rem; }

    /* Grids */
    .cards-grid { grid-template-columns: 1fr; gap: 15px; }
    .card-img { height: 300px; }

    /* Modal */
    .modal-content { width: 95%; padding: 20px; }

    /* Tables */
    .glass-table th, .glass-table td { padding: 10px; font-size: 0.8rem; }

    /* Splash Logo */
    .splash-brand .brand-en { font-size: 2.2rem; letter-spacing: 4px; }
    .splash-brand .brand-ar { font-size: 1.2rem; letter-spacing: 1px; }

    /* Nav Logo */
    .brand-logo .brand-en { font-size: 1.1rem; letter-spacing: 3px; }
    .brand-logo .brand-ar { font-size: 0.7rem; }
}

/* ─── Splash Screen ─── */
.splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

/* لوقو الصورة الأصلية في Splash */
.splash-logo-img {
    width: 420px;
    max-width: 88vw;
    height: auto;
    object-fit: contain;
    display: block;
    animation: fadeInUp 1s ease forwards;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
