html, body {
  margin: 0;
  padding: 0;
}

/* Always light.
   The site has a single, light design. `color-scheme: only light` tells the browser
   not to restyle the page for dark mode: it stops forced/auto-darkening on Chrome,
   Edge, Samsung Internet and similar mobile browsers, and keeps form controls and
   scrollbars light. The page-root background is also pinned with !important so no
   user stylesheet or dark-mode rule can recolor it. (Deliberately not applied to
   every Tailwind background utility: that would also break their hover states.) */
:root {
  color-scheme: only light;
}
html, body {
  background-color: #fff8f5 !important;
  color-scheme: only light;
}
@media (prefers-color-scheme: dark) {
  :root,
  html,
  body {
    color-scheme: only light;
    background-color: #fff8f5 !important;
  }
}
input, select, textarea, button {
  color-scheme: only light;
}

/* Keep anchor-link targets clear of the fixed site header on both breakpoints */
[id] {
  scroll-margin-top: 7rem;
}

body {
  overscroll-behavior: none;
}

::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.lucide-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.bg-parchment-texture {
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px);
}

/* ============================================================
   Shared site header / footer motion system
   Timings follow: 150-300ms micro-interactions, ease-out on
   enter, ease-in on exit, exit ~60-70% of enter duration,
   transform+opacity only (no layout properties animated).
   ============================================================ */

.site-nav-link {
  position: relative;
  padding-bottom: 4px;
}
.site-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: #e7ad2b;
  transition: right 0.22s ease-out;
}
.site-nav-link:hover::after {
  right: 0;
}
.site-nav-link.nav-active {
  color: #7b5800;
  font-weight: 600;
}
.site-nav-link.nav-active::after {
  right: 0;
}

/* Mobile drawer
   Opening: overlay fades in while the panel glides in from the inline-end edge
   (left under dir=rtl) with a soft deceleration, then the links rise in one by
   one. Closing is shorter and uses an accelerating curve. The drawer element is
   shown/hidden with the `hidden` class by site-nav.js *after* the transition, so
   there is no visibility toggle cutting the close animation short. */
#site-mobile-drawer .drawer-overlay {
  opacity: 0;
  transition: opacity 0.4s ease;
}
#site-mobile-drawer.drawer-open .drawer-overlay {
  opacity: 1;
}
#site-mobile-drawer .drawer-panel {
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
#site-mobile-drawer.drawer-open .drawer-panel {
  transform: translateX(0);
}
/* RTL: the panel sits at the inline-end (left), so it slides in from the left. */
[dir="rtl"] #site-mobile-drawer .drawer-panel {
  transform: translateX(-100%);
}
[dir="rtl"] #site-mobile-drawer.drawer-open .drawer-panel {
  transform: translateX(0);
}
#site-mobile-drawer.drawer-closing .drawer-panel {
  transition: transform 0.3s cubic-bezier(0.55, 0, 0.8, 0.4);
}
#site-mobile-drawer.drawer-closing .drawer-overlay {
  transition: opacity 0.3s ease-in;
}

/* Staggered entrance for the drawer content */
#site-mobile-drawer .drawer-panel > div:first-child,
#site-mobile-drawer nav > a,
#site-mobile-drawer .drawer-panel > div:last-child {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.15s ease, color 0.15s ease;
}
[dir="rtl"] #site-mobile-drawer .drawer-panel > div:first-child,
[dir="rtl"] #site-mobile-drawer nav > a,
[dir="rtl"] #site-mobile-drawer .drawer-panel > div:last-child {
  transform: translateX(-14px);
}
#site-mobile-drawer.drawer-open .drawer-panel > div:first-child,
#site-mobile-drawer.drawer-open nav > a,
#site-mobile-drawer.drawer-open .drawer-panel > div:last-child {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.15s ease, color 0.15s ease;
}
#site-mobile-drawer.drawer-open .drawer-panel > div:first-child { transition-delay: 0.08s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(1) { transition-delay: 0.14s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(2) { transition-delay: 0.19s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(3) { transition-delay: 0.24s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(4) { transition-delay: 0.29s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(5) { transition-delay: 0.34s; }
#site-mobile-drawer.drawer-open nav > a:nth-child(6) { transition-delay: 0.39s; }
#site-mobile-drawer.drawer-open .drawer-panel > div:last-child { transition-delay: 0.46s; }

/* Hamburger button feedback */
#site-drawer-open {
  transition: background-color 0.2s ease, transform 0.15s ease;
}
#site-drawer-open:active {
  transform: scale(0.92);
}

@media (prefers-reduced-motion: reduce) {
  #site-mobile-drawer .drawer-overlay,
  #site-mobile-drawer .drawer-panel,
  #site-mobile-drawer .drawer-panel > div,
  #site-mobile-drawer nav > a {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ============================================================
   Arabic typography (RTL pages only)
   Noto Naskh Arabic: major/display headings
   Cairo: headings + body
   IBM Plex Sans Arabic: technical labels / tags / caps
   ============================================================ */
.font-ar-display {
  font-family: 'Noto Naskh Arabic', 'Cairo', serif;
  font-weight: 700;
  line-height: 1.3;
}
.font-ar-heading {
  font-family: 'Noto Naskh Arabic', 'Cairo', serif;
  font-weight: 700;
  line-height: 1.4;
}
.font-ar-heading-alt {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  line-height: 1.4;
}
.font-ar-body {
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  line-height: 1.8;
}
.font-ar-label {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.font-ar-button {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 600;
}

/* Directional icons (arrows) that must mirror in RTL contexts */
[dir="rtl"] .icon-flip {
  display: inline-block;
  transform: scaleX(-1);
}

/* Primary "Enroll Now" CTA micro-interaction */
.nav-cta {
  transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out;
}
.nav-cta:hover {
  transform: translateY(-1px);
}
.nav-cta:active {
  transform: translateY(0) scale(0.97);
}

/* ============================================================
   Unified closing CTA component (sitewide)
   Structure: pure-CSS gradient/dot-grid surface + copy/action grid.
   No photos, no JS-driven visuals. Tone is controlled by
   [data-cta-tone] on the outer section and only changes the
   gradient color mix / accent glow, never layout or the dot grid.
   ============================================================ */
.cta-card {
  background-color: #1a1108;
}
.cta-overlay {
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  background-size: 24px 24px, auto, auto, auto;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.4), inset 0 0 190px rgba(0, 0, 0, 0.8);
}
.cta-final[data-cta-tone="warm"] .cta-overlay {
  background-image:
    radial-gradient(rgba(255, 237, 227, 0.12) 1.5px, transparent 1.5px),
    radial-gradient(ellipse at 15% 20%, rgba(249, 189, 59, 0.65) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 82%, rgba(131, 84, 0, 0.75) 0%, transparent 55%),
    linear-gradient(135deg, #3a2410 0%, #140c05 100%);
}
.cta-final[data-cta-tone="deep"] .cta-overlay {
  background-image:
    radial-gradient(rgba(255, 237, 227, 0.12) 1.5px, transparent 1.5px),
    radial-gradient(ellipse at 20% 15%, rgba(122, 95, 71, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(58, 46, 38, 0.75) 0%, transparent 55%),
    linear-gradient(135deg, #2a1f16 0%, #0d0906 100%);
}
.cta-final[data-cta-tone="gold"] .cta-overlay {
  background-image:
    radial-gradient(rgba(255, 237, 227, 0.12) 1.5px, transparent 1.5px),
    radial-gradient(ellipse at 15% 25%, rgba(228, 197, 35, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(249, 189, 59, 0.65) 0%, transparent 55%),
    linear-gradient(135deg, #3a2b12 0%, #140d05 100%);
}

.cta-final[data-cta-tone="gold"] .cta-btn-primary {
  box-shadow: 0 4px 24px rgba(228, 197, 35, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.cta-final[data-cta-tone="gold"] .cta-btn-secondary {
  border-color: #f9bd3b;
}

/* Staggered scroll-triggered entrance */
.cta-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cta-reveal-1 { transition-delay: 0ms; }
.cta-reveal-2 { transition-delay: 120ms; }
.cta-reveal-3 { transition-delay: 240ms; }
.cta-card.cta-in-view .cta-reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered scroll-reveal for icon-only cards (benefits, admission steps, related items). */
.gc-card--icon {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.gc-card--icon.gc-reveal-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .gc-card--icon {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Sitewide form validation-error state. Drawn as an inset ring rather than a
   real border so an invalid field doesn't grow and shift the layout. */
.gc-input-invalid {
  box-shadow: inset 0 0 0 2px #ef4444 !important;
}
.gc-input-invalid:focus {
  box-shadow: 0 0 0 2px #ef4444 !important;
}
.gc-input-invalid[type="checkbox"] {
  box-shadow: none !important;
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}
.gc-error-msg {
  color: #ba1a1a;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 4px;
}

/* Outline pill (hero + closing CTA secondary action). Hover fill is gated to
   hover-capable pointers so it doesn't stick after a tap on touch screens. */
.cta-btn-secondary {
  border: 1.5px solid #E7AD2B;
  border-radius: 9999px;
  background-color: transparent;
  color: #E7AD2B;
}
@media (hover: hover) {
  .cta-btn-secondary:hover {
    background-color: #E7AD2B;
    color: #5e4300;
  }
}

/* Closing CTA buttons: reuse the site's established solid/outline/ghost pill styles */
.cta-btn-primary,
.cta-btn-secondary,
.cta-btn-ghost {
  transition: background-color 0.2s ease-out, color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out;
}
.cta-btn-primary:hover,
.cta-btn-secondary:hover,
.cta-btn-ghost:hover {
  transform: translateY(-1px);
}
.cta-btn-primary:active,
.cta-btn-secondary:active,
.cta-btn-ghost:active {
  transform: translateY(0) scale(0.97);
}

/* ============================================================
   Shared card design system (Phase 1)
   Existing cards sitewide are on a white surface (bg-white) over
   the site's cream page background, not a dark surface — this is
   the LIGHT variant of the spec'd .gc-card, matching that reality
   instead of introducing a jarring dark card into a light layout.
   ============================================================ */
.gc-card {
  position: relative;
  border-radius: 16px;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid rgba(231, 173, 43, 0.15);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.gc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(231, 173, 43, 0.5);
  box-shadow: 0 16px 32px -12px rgba(36, 25, 18, 0.18), 0 0 0 1px rgba(231, 173, 43, 0.08);
}
.gc-card--image {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gc-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.gc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gc-card--image:hover .gc-card__media img {
  transform: scale(1.06);
}
.gc-card--icon {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gc-card__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(231, 173, 43, 0.12);
  color: #7b5800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s ease, color 0.35s ease;
}
.gc-card--icon:hover .gc-card__icon-wrap,
.gc-card--image:hover .gc-card__icon-wrap {
  background: #e7ad2b;
  color: #5e4300;
}
.gc-card__body {
  padding: 20px 20px 22px;
}
.gc-card__badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #7b5800;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.gc-card__title {
  color: #241912;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.gc-card__meta {
  color: rgba(79, 69, 52, 0.75);
  font-size: 14px;
}

/* ============================================================
   Scroll-triggered fade-up (js/scroll-reveal.js)
   The script adds .sr (hidden, shifted down) and then .sr-in when the
   element scrolls into view; both are removed once the animation ends.
   The leading `body` raises specificity above Tailwind's own transition
   utilities so the reveal always wins while it is running.
   ============================================================ */
body .sr {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--sr-delay, 0ms);
}
body .sr.sr-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body .sr {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Scroll motion (js/smooth-scroll.js)
   - header gains a soft shadow once the page is scrolled
   - the target of an in-page jump (e.g. the enroll form) pulses gold on arrival
   - a back-to-top button fades in on long scrolls
   - drawer links give press feedback
   ============================================================ */
#site-header-desktop,
#site-header-mobile {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
#site-header-desktop.site-header-scrolled,
#site-header-mobile.site-header-scrolled {
  box-shadow: 0 8px 26px -12px rgba(36, 25, 18, 0.32) !important;
}

@keyframes gc-flash {
  0% { box-shadow: 0 0 0 0 rgba(231, 173, 43, 0); }
  30% { box-shadow: 0 0 0 7px rgba(231, 173, 43, 0.45), 0 22px 44px -14px rgba(231, 173, 43, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(231, 173, 43, 0); }
}
.gc-flash {
  animation: gc-flash 1.5s ease-out 1;
}

.gc-to-top {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 16px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #e7ad2b;
  color: #5e4300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(36, 25, 18, 0.5);
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}
.gc-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.gc-to-top:hover {
  background: #f9bd3b;
}
.gc-to-top.is-visible:active {
  transform: scale(0.9);
}
.gc-to-top svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Drawer link press feedback. The extra pseudo-classes lift the specificity above
   the drawer's staggered-entrance rules so the press responds immediately. */
#site-mobile-drawer.drawer-open nav > a:nth-child(n):active {
  transform: scale(0.97);
  transition-delay: 0s;
  transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .gc-flash {
    animation: none;
  }
  .gc-to-top,
  #site-header-desktop,
  #site-header-mobile {
    transition: none;
  }
}

/* ============================================================
   Floating WhatsApp button (partials/footer.html)
   Sits at the inline-start bottom corner (right in RTL); the back-to-top button
   sits at the opposite corner. Below the header (z 50) and the drawer (z 60).
   ============================================================ */
.gc-whatsapp {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px -8px rgba(18, 140, 70, 0.65), 0 4px 10px rgba(36, 25, 18, 0.25);
  text-decoration: none;
  animation: gc-wa-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}
.gc-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #25d366;
  z-index: -1;
  animation: gc-wa-pulse 2.6s ease-out 2.2s infinite;
}
.gc-whatsapp svg {
  width: 30px;
  height: 30px;
}
.gc-whatsapp:hover {
  transform: scale(1.08);
  background: #1ebe5b;
}
.gc-whatsapp:active {
  transform: scale(0.94);
}
@keyframes gc-wa-in {
  from { opacity: 0; transform: translateY(18px) scale(0.7); }
  to { opacity: 1; transform: none; }
}
@keyframes gc-wa-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gc-whatsapp { animation: none; transition: none; }
  .gc-whatsapp::before { animation: none; display: none; }
}

/* Gentle floating motion for the "coming soon" page icon (online.html) */
@keyframes gc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.gc-float {
  animation: gc-float 3.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .gc-float { animation: none; }
}
