/* ==========================================================================
   AYAT QURAN ACADEMY - MAIN STYLESHEET
   Design System, CSS Variables, Typography, Layout, Reset
   ========================================================================== */

:root {
  /* Brand Color Palette */
  --color-primary: #0d4637;          /* Deep Islamic Emerald */
  --color-primary-dark: #07271e;     /* Rich Forest Black-Green */
  --color-primary-light: #16634f;    /* Balanced Leaf Emerald */
  --color-primary-soft: #edf5f1;     /* Soft Sage Tint */
  --color-primary-subtle: #f4f8f6;   /* Extremely faint green background */

  --color-gold: #c59b27;             /* Muted Islamic Warm Gold */
  --color-gold-hover: #d8ad32;       /* Bright Warm Gold */
  --color-gold-light: #fbf5e6;       /* Soft Gold Tint */
  --color-gold-border: #e6ce8a;      /* Delicate Gold Border */

  --color-bg: #faf8f4;               /* Warm Ivory / Off-white */
  --color-surface: #ffffff;          /* Pure White Card Surface */
  --color-surface-alt: #fdfbf8;      /* Cream Surface */

  --color-text-main: #1c2b26;        /* Deep Charcoal Green */
  --color-text-muted: #53645e;       /* Muted Neutral Slate */
  --color-text-light: #7b8e87;       /* Subtle Secondary Text */
  --color-border: #e5ede8;           /* Clean Border */
  --color-border-subtle: #edf3f0;

  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1eb956;
  --color-whatsapp-dark: #128c7e;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6rem;

  /* Borders & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-subtle: 0 2px 8px rgba(13, 70, 55, 0.04);
  --shadow-sm: 0 4px 12px rgba(13, 70, 55, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 70, 55, 0.08);
  --shadow-lg: 0 16px 40px rgba(13, 70, 55, 0.10);
  --shadow-hover: 0 12px 32px rgba(197, 155, 39, 0.15);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 900px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 84px;
  --header-height-scrolled: 70px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-main);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4vw + 1rem, 3.25rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.35rem, 2vw + 0.3rem, 1.75rem);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

p.lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-text-main);
}

.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.4em;
  color: var(--color-primary);
  line-height: 1.8;
}

/* Subtle Islamic Motif Decorators */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  background-color: var(--color-primary-soft);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(13, 70, 55, 0.15);
  margin-bottom: var(--space-md);
}

.section-badge::before {
  content: "✦";
  color: var(--color-gold);
  font-size: 0.9em;
}

.section-badge.gold {
  background-color: var(--color-gold-light);
  color: #8c6812;
  border-color: var(--color-gold-border);
}

.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

.section-title-wrap.text-left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: var(--space-md) auto;
  color: var(--color-gold);
}

.gold-divider::before,
.gold-divider::after {
  content: "";
  height: 1px;
  width: 40px;
  background: linear-gradient(90deg, transparent, var(--color-gold-border));
}

.gold-divider::after {
  background: linear-gradient(90deg, var(--color-gold-border), transparent);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* Section Spacing */
.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
}

.section-sm {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section-subtle {
  background-color: var(--color-primary-subtle);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-ivory {
  background-color: var(--color-bg);
}

.section-white {
  background-color: var(--color-surface);
}

/* Subtle Islamic Background Pattern */
.bg-islamic-pattern {
  background-image: radial-gradient(circle at 50% 50%, rgba(13, 70, 55, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Layout Utilities */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.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;
}

.align-center {
  align-items: center;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.breadcrumbs a {
  color: var(--color-primary);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--color-gold);
}

.breadcrumbs .sep {
  color: var(--color-gold);
  font-size: 0.75rem;
}

.breadcrumbs .current {
  color: var(--color-text-muted);
}
