/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0F0F0D;
  --bg-elevated: #1A1916;
  --bg-card: #1E1D19;
  --cream: #F5E6C8;
  --cream-dim: #C4B99A;
  --gold: #C8A84E;
  --gold-bright: #E4C76B;
  --burgundy: #7A1F2E;
  --burgundy-deep: #5A1520;
  --white: #FAF8F3;
  --text: #E8E2D4;
  --text-dim: #9B9484;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.4s var(--ease);
}

.navbar.scrolled {
  background: rgba(15, 15, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200, 168, 78, 0.1);
  padding: 0.75rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.04em;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  border-radius: 50%;
}

.nav-logo span {
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--cream-dim);
  letter-spacing: 0.03em;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover { color: var(--cream); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--gold) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 500 !important;
  transition: all 0.3s !important;
}

.nav-cta:hover {
  background: var(--gold-bright) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

.nav-close {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 168, 78, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(200, 168, 78, 0.4);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(200, 168, 78, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(122, 31, 46, 0.08) 0%, transparent 50%);
}

/* Islamic geometric pattern overlay */
.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(200, 168, 78, 0.5) 50px, rgba(200, 168, 78, 0.5) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(200, 168, 78, 0.5) 50px, rgba(200, 168, 78, 0.5) 51px),
    repeating-linear-gradient(45deg, transparent, transparent 70.7px, rgba(200, 168, 78, 0.3) 70.7px, rgba(200, 168, 78, 0.3) 71.7px),
    repeating-linear-gradient(-45deg, transparent, transparent 70.7px, rgba(200, 168, 78, 0.3) 70.7px, rgba(200, 168, 78, 0.3) 71.7px);
}

.hero-pattern::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(200, 168, 78, 0.06);
  border-radius: 50%;
  animation: pulse-ring 8s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 2;
  padding-bottom: 5rem;
  animation: fadeUp 1s var(--ease-out) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-logo {
  width: 140px;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 50%;
  box-shadow: 0 8px 40px rgba(200, 168, 78, 0.15);
  animation: fadeUp 0.8s var(--ease-out) both;
}

.hero-tag {
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
  direction: rtl;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--cream-dim);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  animation: fadeUp 1s 0.5s var(--ease-out) both;
}

.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; height: 40px; }
  50% { opacity: 0.3; height: 20px; }
}

/* ===== SECTION LABELS ===== */
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-label-light { color: var(--gold-bright); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3rem;
}

.section-title-light { color: var(--cream); }

.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ===== ABOUT ===== */
.about {
  padding: 8rem 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.about-text h2 em {
  font-style: italic;
  color: var(--gold);
}

.about-text p {
  color: var(--cream-dim);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.mission-card {
  background: var(--bg-card);
  border: 1px solid rgba(200, 168, 78, 0.12);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.mission-card .geometric-accent {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(200, 168, 78, 0.1);
  transform: rotate(45deg);
}

.mission-card .geometric-accent::before {
  content: '';
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(200, 168, 78, 0.08);
}

.mission-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.mission-card p {
  color: var(--cream-dim);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 6rem 0 8rem;
  background: var(--bg-elevated);
  position: relative;
}

.gallery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.2), transparent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.7);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.03em;
}

.gallery-item-tall {
  grid-row: span 2;
}

.gallery-item-wide {
  grid-column: span 2;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  cursor: pointer;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.9);
  transition: transform 0.3s var(--ease-out);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--gold);
}

/* ===== PROGRAMS ===== */
.programs {
  padding: 6rem 0 8rem;
  background: var(--bg-elevated);
  position: relative;
}

.programs::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.2), transparent);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.program-card {
  background: var(--bg-card);
  border: 1px solid rgba(200, 168, 78, 0.08);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s var(--ease);
  cursor: default;
}

.program-card:hover {
  border-color: rgba(200, 168, 78, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.program-icon {
  width: 48px;
  height: 48px;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.program-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.program-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.program-card-cta {
  background: linear-gradient(135deg, var(--burgundy-deep), var(--burgundy));
  border-color: rgba(200, 168, 78, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.program-card-cta h3 { color: var(--gold-bright); }
.program-card-cta p { color: rgba(245, 230, 200, 0.7); margin-bottom: 1.5rem; }

.geometric-pattern-small {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 150px;
  height: 150px;
  opacity: 0.1;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, var(--gold) 10px, var(--gold) 11px),
    repeating-linear-gradient(-45deg, transparent, transparent 10px, var(--gold) 10px, var(--gold) 11px);
}

/* ===== IMPACT ===== */
.impact {
  padding: 8rem 0;
  position: relative;
  background: linear-gradient(135deg, var(--burgundy-deep) 0%, #2A0A12 50%, var(--bg) 100%);
  overflow: hidden;
  text-align: center;
}

.impact-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 25% 25%, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, var(--gold) 1px, transparent 1px);
  background-size: 60px 60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.stat {
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--gold-bright);
  display: inline;
}

.stat-plus {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gold);
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--cream-dim);
  letter-spacing: 0.03em;
}

/* ===== EVENTS ===== */
.events {
  padding: 8rem 0;
}

.events-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(200, 168, 78, 0.06);
  border-radius: 12px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}

.event-card:hover {
  border-color: rgba(200, 168, 78, 0.2);
  transform: translateX(8px);
  background: var(--bg-card);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.event-month {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.event-info { flex: 1; }

.event-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.event-info p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.event-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.75rem;
  background: rgba(200, 168, 78, 0.1);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 100px;
}

.event-arrow {
  width: 24px;
  height: 24px;
  color: var(--text-dim);
  transition: all 0.3s;
  flex-shrink: 0;
}

.event-card:hover .event-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

/* ===== GET INVOLVED ===== */
.involved {
  padding: 6rem 0 8rem;
  background: var(--bg-elevated);
  position: relative;
}

.involved::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.2), transparent);
}

.involved-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.involved-card {
  padding: 2.5rem;
  border: 1px solid rgba(200, 168, 78, 0.08);
  border-radius: 16px;
  transition: all 0.4s var(--ease);
  position: relative;
}

.involved-card:hover {
  border-color: rgba(200, 168, 78, 0.2);
  transform: translateY(-4px);
}

.involved-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(200, 168, 78, 0.1);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}

.involved-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.involved-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.link-arrow {
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
}

.link-arrow:hover {
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

/* ===== FOOTER ===== */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(200, 168, 78, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo-img {
  height: 36px;
  width: auto;
  border-radius: 50%;
}

.footer-brand p {
  color: var(--text-dim);
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(200, 168, 78, 0.06);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-close {
    display: block;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    transition: right 0.4s var(--ease);
    border-left: 1px solid rgba(200, 168, 78, 0.1);
  }

  .nav-links.open { right: 0; }

  .nav-links a { font-size: 1.1rem; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-item-tall { grid-row: span 1; }
  .gallery-item-wide { grid-column: span 1; }

  .programs-grid { grid-template-columns: 1fr; }
  .involved-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }

  .event-card { gap: 1rem; padding: 1.25rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
