/* ==========================================================================
   Al Khayrat Kindergarten — Official Brand Tokens & Shared Primitives
   Laravel-ready CSS custom properties (no build step required)
   ========================================================================== */

:root {
  /* Mandatory Official Brand Identity */
  --brand-primary: #00897B;
  --brand-primary-hover: #00695C;
  --brand-secondary: #E5C72E;
  --brand-accent: #FFF01F;

  /* Official Logo Colors */
  --logo-green: #56A844;
  --logo-sun: #F9DF1E;
  --logo-orange: #F39223;
  --logo-red: #C9242B;

  /* Neutral Colors */
  --surface-bg: #FFFFFF;
  --surface-alt: #F8F9FA;
  --text-main: #1E293B;
  --text-muted: #64748B;

  /* Harmonious Supporting Pastel Palette (derived from official identity) */
  --pastel-cream: #FFFBF2;
  --pastel-beige: #FAF3E6;
  --pastel-oat: #F6EFE2;
  --pastel-mint: #E8F6F3;
  --pastel-mint-deep: #CBEBE5;
  --pastel-sage: #EDF5EE;
  --pastel-sky: #EBF5FC;
  --pastel-peach: #FFF0E5;
  --pastel-yellow: #FFF9DC;
  --pastel-lavender: #F3EEFA;
  --pastel-coral-soft: #FDECEB;

  /* Derived Brand Tints & Shades */
  --brand-primary-soft: rgba(0, 137, 123, 0.1);
  --brand-primary-border: rgba(0, 137, 123, 0.22);
  --brand-primary-deep: #004D45;
  --border-subtle: rgba(30, 41, 59, 0.08);
  --shadow-soft: 0 10px 30px rgba(30, 41, 59, 0.06);
  --shadow-medium: 0 18px 45px rgba(0, 105, 92, 0.10);
  --shadow-card: 0 12px 28px rgba(30, 41, 59, 0.055);

  /* Layout & Radius */
  --container-max: 1220px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  /* Motion */
  --ease-playful: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text-main);
  background: var(--surface-bg);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 2.25rem, var(--container-max));
  margin-inline: auto;
}

/* Placeholder / Proposed Content Badge (Honest & Clear) */
.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(243, 146, 35, 0.11);
  color: #9A5508;
  border: 1px dashed rgba(243, 146, 35, 0.45);
}

.image-credit-badge {
  position: absolute;
  bottom: 12px;
  inset-inline-start: 12px;
  z-index: 4;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

/* Official Logo Slot (preserves exact 1.77:1 wide proportions & transparency) */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-slot {
  height: 70px;
  width: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
}

.brand-logo-slot img.official-logo-img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}

footer .brand-logo-slot {
  height: 98px;
}

footer .brand-lockup.has-official-logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.mobile-drawer .brand-logo-slot {
  height: 62px;
}

/* Official logo shines cleanly on its own in headers & Arabic footers (no duplicate or cramped text) */
header .brand-lockup.has-official-logo .brand-logo-text,
.mobile-drawer .brand-lockup.has-official-logo .brand-logo-text,
[dir="rtl"] .brand-lockup.has-official-logo .brand-logo-text {
  display: none;
}

@media (max-width: 820px) {
  .brand-logo-slot {
    height: 54px;
  }
  footer .brand-logo-slot {
    height: 84px;
  }
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-logo-name {
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--brand-primary-deep);
}

.brand-logo-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Tasteful Lightweight Keyframe Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes floatGentleX {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(12px); }
}

@keyframes swayGentle {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}

@keyframes sunSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes starTwinkle {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.22); opacity: 1; }
}

@keyframes butterflyFlutter {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  33% { transform: translate(8px, -10px) rotate(5deg); }
  66% { transform: translate(-5px, -14px) rotate(-3deg); }
}

@keyframes wingFlap {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.68); }
}

@keyframes giraffeBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

@keyframes giraffeSway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.8deg); }
}

@keyframes paperPlaneGlide {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  50% { transform: translate(12px, -9px) rotate(3deg); }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -48; }
}

.anim-float { animation: floatSlow 5.5s ease-in-out infinite; }
.anim-float-delayed { animation: floatSlow 6.5s ease-in-out 1.4s infinite; }
.anim-drift { animation: floatGentleX 9s ease-in-out infinite; }
.anim-sway { animation: swayGentle 5s ease-in-out infinite; transform-origin: bottom center; }
.anim-twinkle { animation: starTwinkle 3.4s ease-in-out infinite; }
.anim-butterfly { animation: butterflyFlutter 6.5s ease-in-out infinite; }
.anim-plane { animation: paperPlaneGlide 5.2s ease-in-out infinite; }
.anim-giraffe-head { animation: giraffeSway 5.5s ease-in-out infinite; transform-origin: 50% 85%; }
.anim-giraffe-eye { animation: giraffeBlink 4.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-sun-rays { animation: sunSpin 36s linear infinite; transform-box: fill-box; transform-origin: center; }

/* Shared Interactive Lightbox & Info Modals */
.ak-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ak-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.ak-lightbox-card {
  position: relative;
  width: min(92vw, 880px);
  background: #FFFFFF;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-playful);
}

.ak-modal-backdrop.is-open .ak-lightbox-card {
  transform: scale(1);
}

.ak-lightbox-media {
  position: relative;
  background: var(--pastel-cream);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.ak-lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ak-lightbox-footer {
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ak-lightbox-caption {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
}

.ak-lightbox-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ak-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pastel-mint);
  color: var(--brand-primary-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.2s var(--ease-playful), background 0.2s ease;
}

.ak-icon-btn:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
  transform: scale(1.06);
}

.ak-modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s var(--ease-playful), background 0.2s ease;
}

.ak-modal-close:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
  transform: rotate(90deg);
}

/* Info / Registration Preview Modal */
.ak-dialog-card {
  position: relative;
  width: min(92vw, 520px);
  background: #FFFFFF;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.3s var(--ease-playful);
}

.ak-modal-backdrop.is-open .ak-dialog-card {
  transform: translateY(0) scale(1);
}

.ak-dialog-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  background: var(--pastel-mint);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-dialog-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text-main);
}

.ak-dialog-body {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.ak-dialog-meta {
  background: var(--pastel-cream);
  border: 1px dashed var(--brand-primary-border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--brand-primary-deep);
  margin-bottom: 1.4rem;
  word-break: break-all;
}

.ak-dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.ak-btn-dialog-primary {
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.2s ease, transform 0.2s var(--ease-playful);
}

.ak-btn-dialog-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
}

.ak-btn-dialog-secondary {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
}

/* Mobile Navigation Drawer Shared Base */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 950;
  width: min(86vw, 340px);
  background: var(--pastel-cream);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
  transform: translateX(105%);
  transition: transform 0.34s var(--ease-smooth);
  overflow-y: auto;
}

[dir="rtl"] .mobile-drawer {
  transform: translateX(-105%);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.14);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
