@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;900&family=Rajdhani:wght@400;500;600;700;900&display=swap');

:root {
    --primary: #0a0a0f;
    --secondary: #111118;
    --card-bg: #16161f;
    --accent: #e8192c;
    --accent-dark: #b5101e;
    --accent-glow: rgba(232, 25, 44, 0.18);
    --silver: #c8d0e0;
    --silver-shiny: linear-gradient(120deg, #ffffff 0%, #c0c8d8 30%, #e8ecf4 50%, #9aa4b8 70%, #ffffff 100%);
    --text: #f0f0f8;
    --text-muted: #6b7280;
    --border: rgba(255,255,255,0.07);
    --glass: rgba(16, 16, 26, 0.85);
    --header-bg: rgba(10, 10, 15, 0.92);
    --shadow: 0 8px 32px rgba(0,0,0,0.45);
}

html.light-mode,
body.light-mode {
    --primary: #f4f6fb;
    --secondary: #ffffff;
    --card-bg: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --glass: rgba(255,255,255,0.9);
    --header-bg: rgba(255,255,255,0.95);
    --border: rgba(0,0,0,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--primary);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    overflow-x: hidden;
    transition: background 0.35s, color 0.35s;
}

/* ══════════ HEADER ══════════ */
header {
    height: 68px;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-container img {
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

.logo-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--text);
}

.logo-text span { color: var(--accent); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    /* Always visible — contains switch + auth buttons on desktop */
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ══════════ SWITCH TOGGLE ══════════ */
.switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.switch-label input[type="checkbox"] {
    display: none;
}

.switch-track {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 99px;
    transition: background 0.35s, border-color 0.35s;
    display: flex;
    align-items: center;
    padding: 2px;
}

.switch-label input:checked + .switch-track {
    background: var(--accent);
    border-color: var(--accent);
}

.switch-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* RTL: start from right side (dark=right, light=left) */
    transform: translateX(0);
}

.switch-label input:checked + .switch-track .switch-thumb {
    transform: translateX(-24px);
}

.switch-icon-moon,
.switch-icon-sun {
    position: absolute;
    font-size: 11px;
    transition: opacity 0.3s;
}

.switch-icon-moon { color: #4a5568; opacity: 1; }
.switch-icon-sun  { color: #f59e0b; opacity: 0; }

.switch-label input:checked + .switch-track .switch-thumb .switch-icon-moon { opacity: 0; }
.switch-label input:checked + .switch-track .switch-thumb .switch-icon-sun  { opacity: 1; }

.theme-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 28px;
}

/* ══════════ BUTTONS ══════════ */
.btn {
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,25,44,0.35);
}

/* ══════════ HAMBURGER ══════════ */
.hamburger {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger:hover { background: var(--card-bg); }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════ MOBILE MENU ══════════ */
.mobile-menu {
    /* Hidden by default on all screen sizes */
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px 6%;
    gap: 4px;
    z-index: 999;
    transform: translateY(-110%);
    opacity: 0;
    transition: opacity 0.25s, transform 0.3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    /* Hide completely on desktop */
    visibility: hidden;
}

.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--accent); }
.mobile-menu a:last-child { border-bottom: none; }

/* ══════════ HERO ══════════ */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 8% 40px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('bk.jpg') no-repeat center center / cover;
    z-index: -2;
    transform: scale(1.05);
    animation: heroZoom 12s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1.12); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(10,10,15,0.88) 0%,
        rgba(10,10,15,0.52) 45%,
        rgba(10,10,15,0.78) 100%
    );
    z-index: -1;
}

body.light-mode .hero-overlay {
    background: linear-gradient(
        105deg,
        rgba(244,246,251,0.88) 0%,
        rgba(244,246,251,0.45) 45%,
        rgba(244,246,251,0.80) 100%
    );
}

.hero-content {
    flex: 1;
    max-width: 520px;
    animation: fadeUp 0.9s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-glow);
    border: 1px solid rgba(232,25,44,0.3);
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 22px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(26px, 4.5vw, 52px);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 18px;
    color: #fff;
}

body.light-mode .hero-title { color: var(--text); }

.hero-title .highlight {
    color: var(--accent);
    display: block;
}

.hero-desc {
    font-size: 15px;
    line-height: 1.9;
    color: rgba(240,240,248,0.75);
    margin-bottom: 36px;
    max-width: 440px;
}

body.light-mode .hero-desc { color: var(--text-muted); }

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-brand-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeUp 0.9s 0.2s ease both;
}

.hero-brand {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(60px, 10vw, 130px);
    font-weight: 900;
    background: linear-gradient(120deg, #ffffff 0%, #c0c8d8 30%, #e8ecf4 50%, #9aa4b8 70%, #ffffff 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.15));
    line-height: 1;
    letter-spacing: 3px;
    animation: shine 4s linear infinite;
    text-align: center;
}

@keyframes shine {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ══════════ STATS ══════════ */
.stats-section {
    position: relative;
    z-index: 10;
    margin: -50px auto 0;
    width: 88%;
    max-width: 1000px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 36px 24px;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 130px;
    padding: 8px;
}

.stat-number {
    display: block;
    font-size: 40px;
    font-weight: 900;
    color: var(--accent);
    font-family: 'Rajdhani', sans-serif;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

/* ══════════ ABOUT ══════════ */
.about-section {
    padding: 90px 6%;
    text-align: center;
}

.section-badge {
    display: inline-block;
    background: var(--accent-glow);
    border: 1px solid rgba(232,25,44,0.25);
    color: var(--accent);
    border-radius: 30px;
    padding: 5px 18px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(22px, 3.5vw, 38px);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-text {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 2;
}

.about-text strong { color: var(--accent); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-glow);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: var(--accent);
}

.feature-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ══════════ BRANDS ══════════ */
.brands-section {
    padding: 80px 6%;
    background: var(--secondary);
}

.brands-section .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.brand-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 16px 22px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
}

.brand-card.display-only {
    pointer-events: auto;
    cursor: default;
}

.brand-card.display-only:hover {
    transform: translateY(-6px);
    border-color: rgba(232,25,44,0.35);
    box-shadow: 0 12px 30px var(--accent-glow);
}

.brand-img-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.brand-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
}

/* ══════════ FOOTER ══════════ */
footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 56px 6% 28px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    font-size: 26px;
    margin-bottom: 10px;
    display: block;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 260px;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links ul li a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom span {
    color: var(--accent);
    font-weight: 700;
}

/* ══════════ DESKTOP — hide hamburger and lock mobile-menu ══════════ */
@media (min-width: 901px) {
    .hamburger { display: none !important; }
    .mobile-menu,
    .mobile-menu.open {
        transform: translateY(-110%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

/* ══════════ RESPONSIVE — TABLET (≤ 900px) ══════════ */
@media (max-width: 900px) {
    /* Header: hide desktop auth, show hamburger */
    .auth-links  { display: none; }
    .hamburger   { display: flex; }
    .nav-actions { gap: 10px; }

    /* Hero */
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 30px;
        padding-top: 90px;
        padding-bottom: 40px;
        min-height: 100svh;
    }

    .hero-content  { max-width: 100%; }
    .hero-actions  { justify-content: center; }
    .hero-desc     { margin: 0 auto 32px; }
    .hero-badge    { margin: 0 auto 18px; }
    .hero-brand-wrap { flex: unset; }
    .hero-brand    { font-size: clamp(50px, 15vw, 90px); }

    /* Stats */
    .stats-section { margin-top: -30px; }
    .stat-divider  { display: none; }

    /* Grids */
    .brands-grid  { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }

    /* Footer */
    .footer-inner { flex-direction: column; gap: 28px; }
    .footer-brand p { max-width: 100%; }
}

/* ══════════ RESPONSIVE — MOBILE (≤ 500px) ══════════ */
@media (max-width: 500px) {
    /* Header */
    header { padding: 0 4%; }
    .logo-text { font-size: 17px; }
    .switch-label .theme-label { display: none; }

    /* Hero */
    .hero { padding: 80px 5% 32px; }
    .hero-title { font-size: 26px; }
    .hero-desc  { font-size: 14px; }
    .hero-brand { font-size: 52px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { padding: 11px 20px; font-size: 14px; }

    /* Stats */
    .stats-section {
        width: 94%;
        padding: 24px 16px;
        gap: 12px;
    }
    .stat-number { font-size: 32px; }

    /* About */
    .about-section { padding: 60px 5%; }

    /* Brands */
    .brands-section { padding: 60px 5%; }
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .brand-img-wrap { width: 64px; height: 64px; }

    /* Features */
    .features-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Footer */
    footer { padding: 44px 5% 24px; }
}