/* Local font fallback + Google Fonts */
@import url('../assets/fonts/cairo.css');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --background: #EDE6F5;
  --foreground: #1A0A2E;
  --primary: #2D1B4E;
  --primary-foreground: #F5F0FF;
  --secondary: #4A2B7A;
  --secondary-foreground: #F5F0FF;
  --accent: #D4AF37;
  --accent-foreground: #1A0A2E;
  --muted: #C5B8DC;
  --muted-foreground: #6B5A8E;
  --card: #FFFFFF;
  --card-foreground: #1A0A2E;
  --border: #D5C8E8;
  --input: #E8E0F2;
  --ring: #4A2B7A;
  --radius: 1.25rem;
  --font-sans: 'Cairo', system-ui, -apple-system, sans-serif;
  --gold-light: #F0D060;
  --gold-main: #D4AF37;
  --gold-dark: #B8860B;
  --purple-deep: #1A0A2E;
  --purple-mid: #3D2466;
  --purple-glass: rgba(45, 27, 78, 0.75);

  /* Spacing Safety Tokens */
  --section-py-desktop: 7.5rem;
  --section-py-mobile: 4.5rem;
  --header-mb-desktop: 4.5rem;
  --header-mb-mobile: 2.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  line-height: 1.7;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Base Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Section Safety Padding Utility */
.section-padding {
  padding-top: var(--section-py-desktop);
  padding-bottom: var(--section-py-desktop);
}

.section-header-spacing {
  margin-bottom: var(--header-mb-desktop);
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: var(--section-py-mobile);
    padding-bottom: var(--section-py-mobile);
  }

  .section-header-spacing {
    margin-bottom: var(--header-mb-mobile);
  }

  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Typography Utilities */
.text-hero-ar {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.text-hero-en {
  font-size: clamp(1.1rem, 2.5vw, 2.2rem);
  line-height: 1.35;
  font-weight: 400;
  font-style: italic;
}

.text-section-title {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.25;
  font-weight: 800;
}

/* Gradients */
.gradient-purple-deep {
  background: linear-gradient(135deg, #1A0A2E 0%, #2D1B4E 40%, #4A2B7A 70%, #6B3FA0 100%);
}

.gradient-gold {
  background: linear-gradient(135deg, #B8860B 0%, #D4AF37 50%, #F0D060 100%);
}

.text-gradient-gold {
  background: linear-gradient(135deg, #B8860B 0%, #D4AF37 50%, #F0D060 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-overlay-hero {
  background: linear-gradient(
    135deg,
    rgba(26, 10, 46, 0.94) 0%,
    rgba(45, 27, 78, 0.85) 40%,
    rgba(74, 43, 122, 0.65) 70%,
    rgba(107, 63, 160, 0.45) 100%
  );
}

/* Glassmorphism Cards */
.glass-card-purple {
  background: rgba(45, 27, 78, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(45, 27, 78, 0.12);
  box-shadow: 0 15px 35px rgba(45, 27, 78, 0.06);
}

/* Borders & Accents */
.gold-border-right {
  border-right: 4px solid var(--accent);
}

.gold-border-left {
  border-left: 4px solid var(--accent);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  width: 100%;
}

/* Noise & Atmospheric Overlays */
.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Header & Navigation Styles */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
  padding: 1.5rem 0;
}

header.site-header.scrolled {
  padding: 0.85rem 0;
  background: rgba(26, 10, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-pill-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
  padding: 0.55rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.22);
}

.cta-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--foreground);
  background: linear-gradient(135deg, #B8860B, #D4AF37, #F0D060);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
}

.cta-btn-gold:hover {
  opacity: 0.94;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.cta-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2.25rem;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.cta-btn-outline:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
}

/* Mobile Overlay Menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(26, 10, 46, 0.97);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-link {
  font-size: 2.2rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 1.75rem;
  text-align: center;
  transition: color 0.3s ease;
}

.mobile-menu-link:hover {
  color: var(--accent);
}

.mobile-menu-link span {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

/* Hamburger Toggle Button */
.hamburger-btn {
  display: none;
  padding: 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  z-index: 1001;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .desktop-nav {
    display: none !important;
  }
}

/* Animations & Reveal Effects */
.reveal-hidden {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card Hover Effects */
.service-card-hover {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.service-card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(45, 27, 78, 0.2);
}

.work-image-hover {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.work-image-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-image-hover:hover img {
  transform: scale(1.08);
}

/* Keyframe Animations */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes pulse-gold {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.animate-pulse-gold {
  animation: pulse-gold 3s ease-in-out infinite;
}

/* Grid & Layout Helpers */
.grid {
  display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gap-3 { gap: 0.85rem; }
.gap-4 { gap: 1.25rem; }
.gap-6 { gap: 1.75rem; }
.gap-8 { gap: 2.5rem; }
.gap-12 { gap: 3.5rem; }
.gap-16 { gap: 4.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }

.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.overflow-hidden { overflow: hidden; }

/* Image Utilities */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer Styling */
footer.site-footer {
  background: var(--purple-deep);
  color: #FFFFFF;
  padding: 5rem 0 2.5rem 0;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}
