/* ==========================================================================
   Haj Nimr Tamimi — Design System
   Brand: Deep Navy (#0B2A4A), Sky Blue (#1E88C7), Gold Accent (#D4AF37)
   ========================================================================== */

:root {
  --color-primary: #0B2A4A;
  --color-secondary: #1E88C7;
  --color-accent: #D4AF37;
  --color-bg: #F7F9FC;
  --color-surface: #FFFFFF;
  --color-text: #1A2333;
  --color-text-muted: #5B6B82;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 40px -10px rgba(11, 42, 74, 0.15);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --color-bg: #0A1420;
  --color-surface: #101C2E;
  --color-text: #EAF1F8;
  --color-text-muted: #9AAAC0;
  --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

html, body {
  background: var(--color-bg);
  color: var(--color-text);
  scroll-behavior: smooth;
}

/* ---------------- Glassmorphism ---------------- */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
[data-theme="dark"] .glass {
  background: rgba(16, 28, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(11, 42, 74, 0.06);
}
[data-theme="dark"] .glass-nav {
  background: rgba(10, 20, 32, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------------- Gradients ---------------- */
.gradient-brand {
  background: linear-gradient(135deg, var(--color-primary) 0%, #14406b 55%, var(--color-secondary) 100%);
}
.gradient-gold-text {
  background: linear-gradient(90deg, var(--color-accent), #f3d878);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-overlay {
  background: linear-gradient(180deg, rgba(11,42,74,0.15) 0%, rgba(11,42,74,0.85) 100%);
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition-base);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: #0e355e; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-accent {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn-accent:hover { background: #e0bd4c; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}
[data-theme="dark"] .btn-outline { border-color: #EAF1F8; color: #EAF1F8; }
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* ---------------- Reveal on scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---------------- Animations ---------------- */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes pulse-soft { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.animate-pulse-soft { animation: pulse-soft 2.5s ease-in-out infinite; }

@keyframes skeleton-shine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e9edf3 25%, #f5f7fa 37%, #e9edf3 63%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease infinite;
}

/* ---------------- Nav link underline ---------------- */
.nav-link { position: relative; padding-bottom: 4px; }
.nav-link::after {
  content: '';
  position: absolute;
  right: 0; left: 0; bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform .3s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* ---------------- Nav dropdown (grouped header links) ---------------- */
.nav-dropdown { transform-origin: top center; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.badge-gold { background: rgba(212,175,55,.15); color: #a9821f; }
.badge-blue { background: rgba(30,136,199,.12); color: var(--color-secondary); }
.badge-placeholder { background: rgba(240, 173, 78, .18); color: #a9670c; }
.badge-soon { background: rgba(91,107,130,.15); color: var(--color-text-muted); }

/* ---------------- Hero media mask ---------------- */
.hero-media-mask {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-media-mask::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,42,74,0) 40%, rgba(11,42,74,.55) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------------- Hero section polish (premium redesign) ---------------- */
.hero-section { isolation: isolate; }
.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-1 {
  width: 420px; height: 420px;
  top: -140px; inset-inline-end: -120px;
  background: radial-gradient(circle, rgba(212,175,55,.35), transparent 70%);
}
.hero-glow-2 {
  width: 360px; height: 360px;
  bottom: -160px; inset-inline-start: -100px;
  background: radial-gradient(circle, rgba(30,136,199,.35), transparent 70%);
}
.hero-media-frame {
  box-shadow: 0 25px 60px -15px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12), 0 0 0 10px rgba(255,255,255,.06);
}
.hero-media-frame::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-accent), rgba(255,255,255,.15), var(--color-secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
/* Elegant logo fallback (used when no admin slider images exist yet) */
.hero-logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.14), rgba(255,255,255,.02) 70%);
  padding: 2.5rem;
}
.hero-logo-img {
  max-width: 78%;
  max-height: 78%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  padding: 1.5rem;
  box-shadow: 0 20px 45px -12px rgba(0,0,0,.5);
}
[data-slide-video] { display: block; }

/* ---------------- Hero slider (animated header images) ---------------- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.opacity-0 {
  opacity: 0;
  pointer-events: none;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide-caption {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  padding: 1.25rem 1.5rem;
  z-index: 2;
}
.hero-slide-dots {
  position: absolute;
  bottom: 1rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 3;
}
[dir="rtl"] .hero-slide-dots { transform: translateX(50%); }
.hero-slide-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  padding: 0;
}
.hero-slide-dot.w-8 {
  width: 2rem;
  background: var(--color-accent);
}

/* ---------------- Gold divider ---------------- */
.divider-gold {
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-accent), #f3d878);
}

/* ---------------- Stat number ---------------- */
.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-primary);
}
[data-theme="dark"] .stat-number { color: #fff; }

/* ---------------- Timeline ---------------- */
.timeline-line { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(11,42,74,.15); }
[data-theme="dark"] .timeline-line { background: rgba(255,255,255,.15); }
.timeline-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 3px rgba(212,175,55,.3);
}

/* ---------------- Aspect ratio helpers ---------------- */
.aspect-4-3 { aspect-ratio: 4/3; }
.aspect-16-9 { aspect-ratio: 16/9; }
.aspect-1-1 { aspect-ratio: 1/1; }

/* ---------------- Accessibility ---------------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-primary); color: #fff;
  padding: .5rem 1rem; z-index: 999;
}
.skip-link:focus { left: 0; }
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ---------------- Line clamp ---------------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- Marquee (RTL-aware) ---------------- */
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}
[dir="rtl"] .marquee-track { animation: marquee-scroll-rtl 30s linear infinite; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-scroll-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------------- Card hover ---------------- */
.card-hover { transition: var(--transition-base); }
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }

/* ---------------- Product card ---------------- */
.product-card { background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; }

/* ---------------- Custom scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(11,42,74,.25); border-radius: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
