/* ============================================================
   SAFAA SCHOOL — Modern Redesign
   ============================================================ */

:root {
  --primary:       #ef6603;
  --primary-dark:  #c95200;
  --dark:          #1a1c2e;
  --dark-2:        #252740;
  --text:          #2d2d2d;
  --text-muted:    #6b7280;
  --bg-light:      #f7f8fc;
  --white:         #ffffff;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.06);
  --shadow:        0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.16);
  --radius:        14px;
  --radius-lg:     24px;
  --transition:    0.3s ease;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(34px, 5.5vw, 68px); }
h2 { font-size: clamp(26px, 3.5vw, 46px); }
h3 { font-size: clamp(18px, 2vw, 22px); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
section { padding: 100px 0; }

/* ── Labels / Tags ──────────────────────────── */
.section-tag {
  display: inline-block;
  background: rgba(239,102,3,0.10);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.section-tag-light {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ── Shared section header ──────────────────── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}
.section-header h2 { color: var(--dark); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 17px; }

/* ── Buttons ────────────────────────────────── */
.btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Raleway', sans-serif;
  transition: var(--transition);
}
.btn-orange:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(239,102,3,0.35);
  color: #fff;
}


/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.35s ease;
}
#header.scrolled {
  background: #fff;
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.nav-logo img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}
#header.scrolled .nav-logo img { border-color: var(--primary); }
.nav-logo-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  transition: color 0.3s;
}
#header.scrolled .nav-logo-text { color: var(--dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links li a {
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s;
}
.nav-links li a:hover { color: #fff; }
#header.scrolled .nav-links li a { color: var(--text-muted); }
#header.scrolled .nav-links li a:hover { color: var(--primary); }

.btn-nav-donate {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 10px 26px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: all 0.3s !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-nav-donate:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239,102,3,0.35);
  color: #fff !important;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
#header.scrolled .nav-toggle span { background: var(--dark); }
.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Overlay */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 1000;
  }
  .nav-open .nav-links { display: flex; }
  .nav-links li a {
    font-size: 22px;
    color: rgba(255,255,255,0.85) !important;
  }
  .nav-links li a:hover { color: var(--primary) !important; }
  .btn-nav-donate {
    font-size: 18px !important;
    padding: 14px 36px !important;
  }
}


/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26,28,46,0.94) 0%,
    rgba(26,28,46,0.80) 55%,
    rgba(26,28,46,0.50) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  padding-top: 90px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.88);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  width: fit-content;
}
.hero-badge i { color: var(--primary); }

#hero h1 {
  color: #fff;
  margin-bottom: 22px;
  max-width: 680px;
}
#hero h1 em {
  font-style: normal;
  color: var(--primary);
}

#hero .hero-sub {
  color: rgba(255,255,255,0.80);
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  padding: 18px 48px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  transition: all 0.3s;
  box-shadow: 0 8px 32px rgba(239,102,3,0.45);
}
.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 44px rgba(239,102,3,0.55);
  color: #fff;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat span {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.2);
  align-self: stretch;
  display: block;
}

@media (max-width: 600px) {
  #hero h1 { font-size: 34px; }
  .hero-stats { gap: 24px; }
  .hero-stat-divider { display: none; }
  .hero-cta { padding: 15px 36px; font-size: 15px; }
}


/* ══════════════════════════════════════════════
   IMPACT BAND
══════════════════════════════════════════════ */
.impact-band {
  background: var(--primary);
}
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.impact-item {
  padding: 36px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.20);
}
.impact-item:last-child { border-right: none; }
.impact-item i {
  font-size: 26px;
  color: rgba(255,255,255,0.65);
  display: block;
  margin-bottom: 10px;
}
.impact-num {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  line-height: 1;
  margin-bottom: 6px;
}
.impact-label {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
}

@media (max-width: 768px) {
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-item:nth-child(2) { border-right: none; }
  .impact-item:nth-child(1),
  .impact-item:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.20); }
  .impact-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.20); }
}


/* ══════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════ */
#about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-images {
  position: relative;
  padding-bottom: 60px;
}
.about-img-main {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about-img-float {
  position: absolute;
  bottom: 0;
  right: -24px;
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 6px solid #fff;
  box-shadow: var(--shadow);
}

.about-content h2 { color: var(--dark); margin-bottom: 18px; }
.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.85;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 28px 0 36px;
}
.about-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
}
.about-highlight i { color: var(--primary); font-size: 17px; flex-shrink: 0; }

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-images { padding-bottom: 40px; }
  .about-img-float { right: 0; }
}
@media (max-width: 480px) {
  .about-img-float { display: none; }
  .about-images { padding-bottom: 0; }
}


/* ══════════════════════════════════════════════
   SERVICES
══════════════════════════════════════════════ */
#services { background: var(--bg-light); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.3s;
  border: 1px solid transparent;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(239,102,3,0.12);
}
.service-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.service-card h3 { color: var(--dark); margin-bottom: 10px; font-size: 18px; }
.service-card p { color: var(--text-muted); font-size: 14px; line-height: 1.75; }

@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }


/* ══════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════ */
#gallery { background: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px;
  gap: 14px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,28,46,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  cursor: pointer;
}
.gallery-overlay i {
  font-size: 36px;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s;
}
.gallery-item:hover .gallery-overlay { background: rgba(26,28,46,0.45); }
.gallery-item:hover .gallery-overlay i { opacity: 1; transform: scale(1); }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-item.tall { grid-row: auto; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
}


/* ══════════════════════════════════════════════
   DONATE (GoFundMe)
══════════════════════════════════════════════ */
.donate-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  text-align: center;
}

.donate-inner {
  max-width: 740px;
  margin: 0 auto;
}
.donate-section h2 { color: #fff; margin-bottom: 18px; }
.donate-section .donate-lead {
  color: rgba(255,255,255,0.74);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 52px;
}

.donation-impacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 52px;
  text-align: left;
}
.impact-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.3s;
}
.impact-card:hover { background: rgba(255,255,255,0.11); }
.impact-card-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Raleway', sans-serif;
  flex-shrink: 0;
  min-width: 60px;
}
.impact-card-desc {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.5;
}

.btn-donate-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: #fff;
  padding: 20px 60px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  transition: all 0.3s;
  box-shadow: 0 8px 36px rgba(239,102,3,0.45);
}
.btn-donate-main:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(239,102,3,0.55);
  color: #fff;
}

.donate-note {
  color: rgba(255,255,255,0.38);
  font-size: 13px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .donation-impacts { grid-template-columns: 1fr; }
  .btn-donate-main { padding: 16px 40px; font-size: 16px; }
}


/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
#contact { background: var(--bg-light); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: 0.3s;
}
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(239,102,3,0.10);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 21px;
  flex-shrink: 0;
}
.contact-card h4 { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 5px; font-family: 'Raleway', sans-serif; }
.contact-card p, .contact-card a { font-size: 14px; color: var(--text-muted); }
.contact-card a:hover { color: var(--primary); }

@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }


/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
#footer {
  background: var(--dark);
  padding: 52px 0 28px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo { display: flex; align-items: center; gap: 14px; }
.footer-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
}
.footer-logo-text strong {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.footer-logo-text span { font-size: 13px; color: rgba(255,255,255,0.45); }

.footer-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Raleway', sans-serif;
  transition: 0.3s;
}
.footer-donate-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
}
.footer-bottom a { color: rgba(255,255,255,0.38); }
.footer-bottom a:hover { color: rgba(255,255,255,0.65); }

@media (max-width: 640px) {
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; }
}


/* ══════════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(239,102,3,0.45);
  transition: all 0.3s;
  z-index: 999;
}
.back-to-top.active { display: flex; }
.back-to-top:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(239,102,3,0.5);
}


/* ══════════════════════════════════════════════
   AOS overrides — ensure elements appear
══════════════════════════════════════════════ */
[data-aos][data-aos][data-aos-duration='600'] { transition-duration: 600ms; }


/* ══════════════════════════════════════════════
   LANGUAGE SWITCHER
══════════════════════════════════════════════ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.38);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  line-height: 1;
}

/* thin divider between buttons */
.lang-btn + .lang-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 11px;
  width: 1px;
  background: rgba(255,255,255,0.18);
}

.lang-btn:hover { color: rgba(255,255,255,0.75); }

.lang-btn.active {
  color: #fff;
}
/* orange dot under active language */
.lang-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

/* scrolled state */
#header.scrolled .lang-btn { color: rgba(0,0,0,0.28); }
#header.scrolled .lang-btn + .lang-btn::before { background: rgba(0,0,0,0.12); }
#header.scrolled .lang-btn:hover { color: var(--dark); }
#header.scrolled .lang-btn.active { color: var(--dark); }
#header.scrolled .lang-btn.active::after { background: var(--primary); }

@media (max-width: 900px) {
  .lang-btn { font-size: 13px; padding: 10px 14px; color: rgba(255,255,255,0.5); }
  .lang-btn.active { color: #fff; }
  .lang-btn + .lang-btn::before { background: rgba(255,255,255,0.15); }
}


/* ══════════════════════════════════════════════
   RTL OVERRIDES (Arabic)
══════════════════════════════════════════════ */
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .hero-badge { flex-direction: row-reverse; }
[dir="rtl"] .hero-stats { justify-content: flex-start; }

[dir="rtl"] .about-grid { direction: rtl; }
[dir="rtl"] .about-img-float { right: auto; left: -24px; }
[dir="rtl"] .about-highlight { flex-direction: row-reverse; }

[dir="rtl"] .service-card { text-align: right; }
[dir="rtl"] .impact-card { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .contact-card { flex-direction: row-reverse; text-align: right; }

[dir="rtl"] .footer-top { flex-direction: row-reverse; }
[dir="rtl"] .footer-logo { flex-direction: row-reverse; }
[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }

[dir="rtl"] .nav-container { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }

@media (max-width: 900px) {
  [dir="rtl"] .nav-links { flex-direction: column; }
  [dir="rtl"] .nav-container { flex-direction: row-reverse; }
}
