/* =============================================
   HAJJ & UMRAH DIRECTORY — MAIN CSS
   Design System, Variables, Reset, Typography
   ============================================= */

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

/* ─── CSS Custom Properties ─────────────────── */
:root {
  /* Colors — Original Dark Mode Theme */
  --bg:            #070C09;
  --bg-2:          #0C1410;
  --surface:       #111A14;
  --surface-2:     #182018;
  --surface-3:     #1E2820;
  --border:        rgba(201, 168, 76, 0.12);
  --border-hover:  rgba(201, 168, 76, 0.35);

  --gold:          #C9A84C;
  --gold-light:    #E8C97A;
  --gold-dark:     #9A7830;
  --gold-glow:     rgba(201, 168, 76, 0.15);

  --green:         #1A6B4A;
  --green-light:   #22885E;
  --green-dark:    #0D3B2E;
  --green-glow:    rgba(26, 107, 74, 0.2);

  --text:          #EDE8DC;
  --text-muted:    #8A9488;
  --text-dim:      #556058;

  --white:         #FFFFFF;
  --black:         #000000;

  --glass:         rgba(255, 255, 255, 0.04);
  --glass-border:  rgba(255, 255, 255, 0.08);

  --featured-bg:   rgba(201, 168, 76, 0.06);
  --featured-border: rgba(201, 168, 76, 0.3);

  --error:         #E05252;
  --success:       #52C87A;
  --warning:       #E0A652;

  /* Typography */
  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-arabic:   'Amiri', serif;

  /* Font Sizes (fluid) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --max-width: 1280px;
  --content-width: 1100px;
  --nav-height: 72px;

  /* Borders */
  --radius-sm:  6px;
  --radius:     12px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.2);
  --shadow-green: 0 4px 24px rgba(26,107,74,0.25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition:      250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index layers */
  --z-base:   1;
  --z-sticky: 100;
  --z-modal:  1000;
  --z-toast:  2000;
}

/* ─── Reset & Base ──────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26,107,74,0.15) 0%, transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
}

/* ─── Islamic Geometric Pattern ─────────────── */
.pattern-bg {
  position: relative;
}

.pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='rgba(201%2C168%2C76%2C0.06)' stroke-width='0.5'%3E%3Cpolygon points='40%2C2 52%2C28 80%2C28 58%2C44 66%2C70 40%2C54 14%2C70 22%2C44 0%2C28 28%2C28'/%3E%3Cpolygon points='40%2C14 49%2C30 67%2C30 53%2C40 59%2C58 40%2C47 21%2C58 27%2C40 13%2C30 31%2C30'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, var(--text-7xl));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, var(--text-4xl));
  font-weight: 600;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.heading-sm {
  font-size: var(--text-xl);
  font-weight: 600;
}

.body-lg { font-size: var(--text-lg); }
.body-md { font-size: var(--text-base); }
.body-sm { font-size: var(--text-sm); }
.body-xs { font-size: var(--text-xs); }

.text-gold       { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.text-green      { color: var(--green-light); }
.text-muted      { color: var(--text-muted); }
.text-dim        { color: var(--text-dim); }
.text-white      { color: var(--white); }

.font-display { font-family: var(--font-display); }
.font-arabic  { font-family: var(--font-arabic); }

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

.gradient-text-green {
  background: linear-gradient(135deg, #52D49A 0%, var(--green-light) 60%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Layout ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

/* ─── Dividers ──────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-8) 0;
}

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: var(--space-8) 0;
}

/* ─── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ─── Selection ─────────────────────────────── */
::selection {
  background: var(--gold-glow);
  color: var(--gold-light);
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }
  .container { padding: 0 var(--space-4); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--space-16) 0; }
  .section-sm { padding: var(--space-10) 0; }
  .display-xl { font-size: clamp(2rem, 8vw, 3rem); }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
}
