/* ----------------------------------------------------
   GLOBAL STYLES
---------------------------------------------------- */

:root {
    --navy: #0a2342;
    --blue: #185adb;
    --blue-soft: #1f6fff;
    --gray-bg: #f2f4f7;
    --gray-dark: #1c1f22;
    --white: #ffffff;
    --radius: 18px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);

    /* Dark mode colors */
    --d-bg: #0d1117;
    --d-card: #161b22;
    --d-text: #c9d1d9;
    --d-sub: #8b949e;
    --d-border: #30363d;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top, #eef2fb 0%, #cfd5e0 40%, #b9c0cb 100%);
    transition: background 0.4s ease, color 0.4s ease;
    color: var(--gray-dark);
}

/* Arabic font */
body.ar {
    font-family: "Tajawal", sans-serif;
}

/* Dark Mode */
body.dark {
    background: var(--d-bg);
    color: var(--d-text);
}

img {
    user-select: none;
}

/* ----------------------------------------------------
   NAVBAR
---------------------------------------------------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    padding: 10px 40px;
    z-index: 2000;

    background: linear-gradient(
        180deg,
        rgba(10, 35, 66, 0.95) 0%,
        rgba(10, 35, 66, 0.4) 60%,
        transparent 100%
    );

    display: flex;
    align-items: center;
    justify-content: space-between;

    transition: 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 35, 66, 0.98);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo {
    height: 55px;
}

.navbar-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.nav-center {
    display: flex;
    gap: 16px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flag {
    width: 26px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: 0.2s;
}

.flag:hover {
    transform: scale(1.1);
}

.dark-toggle {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: 0.2s;
}

.dark-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ----------------------------------------------------
   MENU BUTTON (MOBILE)
---------------------------------------------------- */

.menu-btn {
    display: none;
    font-size: 26px;
    cursor: pointer;
    color: white;
}

/* ----------------------------------------------------
   FIXED MOBILE DRAWER (NEW)
---------------------------------------------------- */

.mobile-drawer {
    position: fixed;
    top: 0;
    width: 300px;
    height: 100vh;
    background: #0a2342;
    padding: 25px 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease-in-out;
    box-shadow: -3px 0 20px rgba(0,0,0,0.45);

    /* Default = English (LTR) -> opens from left */
    left: 0;
    transform: translateX(-100%);
}

/* Arabic = open from right */
body.ar .mobile-drawer {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

/* Active drawer */
.mobile-drawer.active {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.drawer-logo {
    width: 140px;
}

.drawer-close {
    font-size: 32px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

/* Drawer links */
.mobile-link {
    font-size: 18px !important;
    padding: 16px 0 !important;
    color: #e4e9f2;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
}

.mobile-link:hover {
    color: #5bb0ff !important;
}

/* Drawer footer */
.drawer-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-lang img {
    width: 32px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.drawer-dark {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ----------------------------------------------------
   MOBILE RESPONSIVE
---------------------------------------------------- */

@media (max-width: 900px) {
    .nav-center {
        display: none;
    }
    .menu-btn {
        display: block;
    }
}

/* ----------------------------------------------------
   NAV LINKS (DESKTOP)
---------------------------------------------------- */

.nav-link {
    color: #dfe6ff;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    transition: 0.2s;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: #fff;
}

/* ----------------------------------------------------
   HERO SECTION
---------------------------------------------------- */

.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    padding: 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url("images/hero.jpg") center center / cover no-repeat;
    filter: brightness(65%);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10,35,66,0.92) 0%,
        rgba(10,35,66,0.5) 50%,
        rgba(10,35,66,0.2) 100%
    );
}

body.dark .hero-bg {
    filter: brightness(35%);
}

.hero-content {
    max-width: 520px;
    padding: 34px;
    background: rgba(255,255,255,0.12);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    color: white;
}

.hero-content h1 {
    font-size: 40px;
    font-weight: 600;
}

.hero-content p {
    font-size: 17px;
    line-height: 1.7;
    color: #e4ebff;
}

.hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-badge {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #185adb, #5bb0ff);
    padding: 10px 20px;
    border-radius: 999px;
    color: white;
    display: inline-block;
    font-size: 14px;
    margin-right: 10px;
    transition: 0.2s;
}

.btn-secondary {
    padding: 10px 20px;
    border-radius: 999px;
    color: white;
    border: 1px solid white;
    font-size: 14px;
    transition: 0.2s;
}

.btn-primary:hover { transform: translateY(-3px); }
.btn-secondary:hover {
    background: white;
    color: #0a2342;
}

/* ----------------------------------------------------
   GENERIC SECTIONS
---------------------------------------------------- */

.section-block {
    max-width: 1180px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
}

body.dark .section-block {
    background: var(--d-card);
    color: var(--d-text);
    box-shadow: none;
}

.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--navy);
}

body.dark .section-title {
    color: var(--d-text);
}

/* ----------------------------------------------------
   IMAGE FIX
---------------------------------------------------- */

section img {
    width: 100%;
    max-height: 380px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

/* ----------------------------------------------------
   ABOUT
---------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------
   SERVICES
---------------------------------------------------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 18px;
}

.service-card {
    background: #f6f7fb;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid #dde2f0;
    transition: 0.3s;
}

body.dark .service-card {
    background: var(--d-card);
    border-color: var(--d-border);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #185adb, #5bb0ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 28px;
    height: 28px;
}

/* ----------------------------------------------------
   WHY US
---------------------------------------------------- */

.why-section {
    background: radial-gradient(circle at top left, #185adb 0%, #0a2342 40%, #050913 100%);
    color: #e2eaff;
    border-radius: 20px;
    padding: 50px;
}

body.dark .why-section {
    background: linear-gradient(180deg, #0d1117, #000);
}

.why-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.why-list li {
    padding: 6px 0;
}

/* ----------------------------------------------------
   CONTACT
---------------------------------------------------- */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; }
}

.contact-card {
    background: #f4f6fb;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid #dde2f0;
}

body.dark .contact-card {
    background: var(--d-card);
    border-color: var(--d-border);
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #222;
}

body.dark footer {
    color: var(--d-text);
}

/* ----------------------------------------------------
   SCROLL ANIMATION
---------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 0.8s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
