@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Premium CSS Design System - Jumixa Agency */
:root {
  /* Dynamic Dark Palette Theme tokens (Default) */
  --bg-primary: #08080a;
  --bg-secondary: #0f0f13;
  --bg-tertiary: #16161c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: 45, 100%, 60%;      /* #f1c40f equivalent HSL */
  --accent-blue: 217, 91%, 60%;      /* Stripe/Apple Blue HSL */
  --accent-glow: rgba(0, 112, 243, 0.15);
  
  --glass-bg: rgba(15, 15, 19, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(20px);
  
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px -4px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.9);
  
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Dynamic Light Palette Theme Override */
[data-theme="light"] {
  --bg-primary: #F8F8FA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --border-color: #E2E8F0;
  --border-color-hover: #CBD5E1;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --accent-gold: 45, 68%, 47%;      /* #C9A227 Luxury Gold */
  --accent-blue: 221, 83%, 53%;      /* #2563EB Primary Blue */
  --accent-glow: rgba(37, 99, 235, 0.08);
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(226, 232, 240, 0.8);
  
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px -4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0B132B !important;
}

/* Redesign secondary button for light mode */
[data-theme="light"] .btn-secondary {
  background-color: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .btn-secondary:hover {
  background-color: #F8F8FA;
  border-color: #CBD5E1;
}

/* Correct hero section visuals for light mode */
[data-theme="light"] .hero-title span.gold-gradient {
  background: linear-gradient(135deg, #C9A227 30%, #0B132B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .logo-text {
  color: #0B132B;
}

[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: #0B132B;
}

[data-theme="light"] .nav-link.active {
  color: #C9A227;
}

/* Redesign contact forms / dropdowns for light mode */
[data-theme="light"] .client-dropdown-trigger {
  color: #475569 !important;
}

[data-theme="light"] .client-dropdown-menu {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .client-dropdown-menu a {
  color: #475569 !important;
}

[data-theme="light"] .client-dropdown-menu a:hover {
  background-color: #F1F5F9 !important;
  color: #C9A227 !important;
}

/* Reset and Globals */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.2rem;
  }
}

/* Dynamic Grids */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Luxury Spacing */
.section-padding {
  padding: 8rem 0;
}
@media (max-width: 768px) {
  .section-padding {
    padding: 5rem 0;
  }
}

/* Typography & Titles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
}

.serif-font {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, hsl(var(--accent-blue)) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient {
  background: linear-gradient(135deg, hsl(var(--accent-gold)) 30%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons & Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: hsl(var(--accent-blue));
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 4px 15px -3px rgba(0, 112, 243, 0.4);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(var(--accent-blue)), hsl(var(--accent-gold)));
  z-index: -1;
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 112, 243, 0.5);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background-color: transparent;
  color: hsl(var(--accent-gold));
  border: 1px solid hsl(var(--accent-gold));
}

.btn-outline-gold:hover {
  background-color: hsl(var(--accent-gold));
  color: #000000;
  box-shadow: 0 6px 20px -5px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

/* Glassmorphism Accents */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg);
}

/* Premium Card Designs */
.premium-card {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.premium-card::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--accent-glow) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.premium-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 112, 243, 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

.premium-card * {
  position: relative;
  z-index: 1;
}

.premium-card-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: hsl(var(--accent-blue));
}

.premium-card:hover .premium-card-icon {
  color: hsl(var(--accent-gold));
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.05);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-sans);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: hsl(var(--accent-blue));
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: var(--bg-secondary);
}

/* Alert Notification Boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  border: 1px solid transparent;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ThreeJS Hero overlay container */
#three-hero-container {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

/* Header & Footer elements */
.header-glass {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 80px;
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  z-index: 999;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.header-glass.scrolled {
  height: 70px;
  background-color: var(--glass-bg);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  margin-inline-start: 2rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active {
  color: hsl(var(--accent-gold));
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.logo-x {
  color: hsl(var(--accent-gold));
}

/* Theme Switcher Button (Hidden as page is Dark Mode only) */
.theme-toggle-btn {
  display: none !important;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Arabic RTL Layout Overrides & Tajawal Premium Typography */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

[dir="rtl"] {
  --font-sans: 'Tajawal', sans-serif;
  --font-serif: 'Tajawal', sans-serif;
  text-align: end;
  line-height: 1.7;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  line-height: 1.5;
}

[dir="rtl"] .logo-text {
  direction: ltr !important;
  unicode-bidi: embed !important;
}

[dir="rtl"] .btn i {
  transform: scaleX(-1); /* Flip icons direction */
}

[dir="rtl"] .premium-card {
  text-align: end;
}

[dir="rtl"] .form-label {
  text-align: end;
}



/* RTL Specific Adjustments */
html[dir="rtl"] {
    font-family: 'Inter', system-ui, -apple-system, sans-serif; /* Keep inter for latin, but system will fallback to native arabic fonts */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
}

html[dir="rtl"] .fa-chevron-right {
    transform: scaleX(-1);
}
html[dir="rtl"] .fa-arrow-right {
    transform: scaleX(-1);
}
