/* ========================================
   Near Range - Dark Theme Styles
   ======================================== */

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

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent: #0066ff;
  --accent-hover: #0055dd;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(0,102,255,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: white; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* --- Navigation --- */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.02em;
}
.logo-icon { flex-shrink: 0; }
.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  font-size: 14px; color: var(--text-muted);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }
.admin-link { color: var(--accent) !important; }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 5px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(10,10,10,0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 20px 24px; gap: 0;
    border-top: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0;
    pointer-events: none; transition: all 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0); opacity: 1; pointer-events: all;
  }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; }
}

/* --- Hero --- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('../assets/hero-bg.jpg') center/cover no-repeat;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.5) 50%, var(--bg) 100%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1280px; width: 100%; margin: 0 auto;
  padding: 140px 24px 80px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid rgba(0,102,255,0.3);
  background: rgba(0,102,255,0.1);
  margin-bottom: 32px;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-badge-text {
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--accent); letter-spacing: 0.05em; text-transform: uppercase;
}
.hero-headline {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900; line-height: 0.95;
  letter-spacing: -0.03em; margin-bottom: 24px;
}
.hl-line1 { color: var(--text); }
.hl-line2 { color: var(--accent); }
.hero-desc {
  font-size: 18px; color: var(--text-muted);
  max-width: 560px; line-height: 1.7; margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--accent); color: white;
  font-size: 14px; font-weight: 500; border-radius: var(--radius-sm);
  transition: all 0.3s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 32px rgba(0,102,255,0.25); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: transparent; color: white;
  font-size: 14px; font-weight: 500; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }
.hero-stats { display: flex; gap: 48px; }
.hero-stats strong {
  display: block; font-size: 32px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--text);
}
.hero-stats .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; display: block; }
.hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 128px;
  background: linear-gradient(to top, var(--bg), transparent);
}

@media (max-width: 768px) {
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 24px; }
  .hero-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* --- Services --- */
.services { padding: 100px 0; }
.section-header { margin-bottom: 56px; }
.section-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.label-line { width: 32px; height: 2px; background: var(--accent); }
.section-label span {
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase;
}
.section-header h2 {
  font-size: clamp(32px, 4vw, 52px); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 16px;
}
.section-header p {
  font-size: 16px; color: var(--text-muted); max-width: 600px; line-height: 1.7;
}
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  position: relative; padding: 28px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); cursor: pointer;
  transition: all 0.4s ease; overflow: hidden;
}
.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.service-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,102,255,0.04), transparent);
  opacity: 0; transition: opacity 0.4s; pointer-events: none; border-radius: var(--radius);
}
.service-card:hover::after { opacity: 1; }
.service-num {
  position: absolute; top: 16px; right: 20px;
  font-family: ui-monospace, monospace; font-size: 12px; color: #333;
  transition: color 0.3s;
}
.service-card:hover .service-num { color: rgba(0,102,255,0.4); }
.service-inner { display: flex; gap: 20px; }
.service-icon {
  flex-shrink: 0; width: 48px; height: 48px;
  border-radius: var(--radius-sm); background: rgba(0,102,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.service-card:hover .service-icon { background: rgba(0,102,255,0.2); }
.service-icon svg { width: 20px; height: 20px; color: var(--accent); }
.service-body { flex: 1; min-width: 0; }
.service-body h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 8px; transition: color 0.3s;
}
.service-card:hover h3 { color: var(--accent); }
.service-body p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.service-meta {
  margin-top: 16px; display: flex; align-items: center; justify-content: space-between;
}
.service-code {
  font-family: ui-monospace, monospace; font-size: 10px;
  color: var(--text-dim); letter-spacing: 0.05em;
}
.service-link {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--accent); opacity: 0;
  transform: translateX(8px); transition: all 0.3s;
}
.service-card:hover .service-link { opacity: 1; transform: translateX(0); }

/* --- About --- */
.about { padding: 40px 0 100px; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin-bottom: 64px;
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
@media (max-width: 1024px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-left h2 {
  font-size: clamp(32px, 4vw, 52px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 32px;
}
.text-muted { color: var(--text-muted); }
.about-image { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 32px; }
.about-image img { width: 100%; height: 300px; object-fit: cover; display: block; }
.img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,0.8), transparent); }
.img-badge { position: absolute; bottom: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.about-text p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.about-right { display: flex; flex-direction: column; gap: 24px; }

.card-glow {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid rgba(0,102,255,0.2);
  background: linear-gradient(135deg, rgba(0,102,255,0.05), transparent);
}
.card-glow-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.glow-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,102,255,0.2); display: flex; align-items: center; justify-content: center;
}
.glow-title { font-size: 14px; font-weight: 600; color: var(--text); }
.glow-sub { font-size: 11px; color: var(--text-muted); }
.glow-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.card-dark {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
}
.card-dark h3 { font-size: 18px; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.01em; }
.license-text p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }

/* --- Contact --- */
.contact { padding: 40px 0 100px; }
.contact-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 48px; }
@media (max-width: 1024px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); transition: all 0.3s;
}
.info-card:hover { border-color: var(--border-hover); }
.info-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(0,102,255,0.1); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-icon svg { width: 16px; height: 16px; color: var(--accent); }
.info-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.info-value { font-size: 14px; color: var(--text); }
.info-card a.info-value:hover { color: var(--accent); }

.contact-form-wrapper { padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  font-family: var(--font); transition: all 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: rgba(0,102,255,0.5);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group select { cursor: pointer; appearance: none; }
.form-group select option { background: var(--bg-card); }

.btn-submit {
  width: 100%; padding: 14px; background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 500; font-family: var(--font); cursor: pointer;
  transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
.btn-submit:hover { background: var(--accent-hover); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-text, .btn-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { text-align: center; padding: 48px 0; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(34,197,94,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.form-success h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.form-success p { font-size: 14px; color: var(--text-muted); }

/* --- Footer --- */
.footer { border-top: 1px solid var(--border); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  padding: 64px 0;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand .logo { margin-bottom: 20px; }
.footer-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.footer-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-dim); }
.footer-meta a { color: var(--text-muted); transition: color 0.3s; }
.footer-meta a:hover { color: var(--accent); }
.footer h4 { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a, .footer-links span { font-size: 14px; color: var(--text-muted); transition: color 0.3s; }
.footer-links a:hover { color: var(--text); }

.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; padding: 24px; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 11px; color: var(--text-dim); }
.tasjeel-link { color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }

.footer-giant { border-top: 1px solid var(--border); padding: 48px 0 64px; overflow: hidden; }
.giant-link {
  display: block; font-size: clamp(32px, 6vw, 80px); font-weight: 900;
  letter-spacing: -0.03em; line-height: 1; color: rgba(255,255,255,0.05);
  transition: color 0.5s; white-space: nowrap;
}
.giant-link:hover { color: rgba(0,102,255,0.15); }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate { opacity: 0; }
.animate.visible { animation: fadeUp 0.7s ease forwards; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }
