/* ================================================================
   Geedystar Institutions — Main Stylesheet
   ================================================================ */

/* ── CSS Custom Properties ── */
:root {
  --burgundy: #6B1D2A;
  --burgundy-d: #4A1320;
  --gold: #D4952B;
  --gold-l: #E8B04A;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255,255,255,0.75);
  --glass-blur: blur(12px);
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

::selection { background: rgba(107,29,42,0.12); color: #1A1118; }

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
  transform-origin: left; transform: scaleX(0);
  transition: none; will-change: transform;
}

/* ── Glass Effect ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* ── Section Divider ── */
.section-divider {
  width: 60px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-l));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Page Loading Overlay ── */
.page-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #FAFAF8;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s, visibility 0.4s;
}
.page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.page-loader .spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid #E2D9D3; border-top-color: var(--burgundy);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero Slider ── */
.hero-slider { position: relative; min-height: 100vh; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1s ease-in-out; z-index: 0;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: ken-burns 20s ease-in-out infinite alternate;
}
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-slide__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(74,19,32,0.82) 0%, rgba(107,29,42,0.65) 50%, rgba(26,17,24,0.70) 100%);
}
.hero-slide__content {
  position: relative; z-index: 2; display: flex;
  align-items: center; min-height: 100vh; padding-top: 6rem; padding-bottom: 4rem;
}
.hero-slide__text > * {
  opacity: 0; transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-slide.active .hero-slide__text > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay:0.3s; }
.hero-slide.active .hero-slide__text > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay:0.5s; }
.hero-slide.active .hero-slide__text > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay:0.7s; }
.hero-slide.active .hero-slide__text > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay:0.9s; }

/* Hero Arrows */
.hero-arrow {
  position: absolute; top: 50%; z-index: 10;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-arrow:hover { background: rgba(255,255,255,0.25); }
.hero-arrow--prev { left: 1.5rem; transform: translateY(-50%); }
.hero-arrow--next { right: 1.5rem; transform: translateY(-50%); }
@media(max-width:768px) { .hero-arrow { display:none; } }

/* Hero Dots */
.hero-dots {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; gap: 0.5rem;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: var(--transition);
}
.hero-dot.active { background: var(--gold); width: 28px; border-radius: 5px; }

/* ── Floating Shapes ── */
.floating-shapes { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.floating-shape {
  position: absolute; opacity: 0.08; color: #fff;
  font-size: 3rem;
}
.floating-shape:nth-child(1) { top:15%; right:10%; animation: float 6s ease-in-out infinite; }
.floating-shape:nth-child(2) { top:60%; right:20%; animation: float 8s ease-in-out 1s infinite; }
.floating-shape:nth-child(3) { top:30%; right:35%; animation: float 7s ease-in-out 2s infinite; }
.floating-shape:nth-child(4) { bottom:20%; right:5%; animation: float 9s ease-in-out 0.5s infinite; }
@keyframes float { 0%,100% { transform:translateY(0) rotate(0deg); } 50% { transform:translateY(-20px) rotate(5deg); } }

/* ── Sticky Header ── */
.header-scrolled .header-inner {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important;
  border-color: rgba(226,217,211,0.5) !important;
  box-shadow: 0 2px 20px rgba(107,29,42,0.06);
}

/* ── News Ticker ── */
.news-ticker {
  background: linear-gradient(90deg, var(--burgundy-d), var(--burgundy));
  overflow: hidden; white-space: nowrap;
}
.news-ticker__track {
  display: inline-flex; animation: marquee 35s linear infinite;
}
.news-ticker__track:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }

/* ── Mega Menu ── */
.mega-menu-trigger { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 600px; background: #fff; border: 1px solid #E2D9D3;
  border-radius: 1rem; box-shadow: 0 12px 40px rgba(107,29,42,0.12);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 100; padding: 1.5rem;
}
.mega-menu-trigger:hover .mega-menu,
.mega-menu-trigger:focus-within .mega-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ── Scroll Reveal ── */
[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
[data-reveal-left] {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal-left].revealed { opacity: 1; transform: translateX(0); }
[data-reveal-right] {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal-right].revealed { opacity: 1; transform: translateX(0); }

/* ── Cards ── */
.programme-card,
.news-card,
.staff-card,
.school-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.programme-card:hover,
.news-card:hover,
.staff-card:hover,
.school-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(107,29,42,0.12);
}

/* ── Stat Counter ── */
.stat-counter { font-variant-numeric: tabular-nums; }

/* ── Testimonial Carousel ── */
.testimonial-track {
  display: flex; transition: transform 0.5s ease;
}
.testimonial-slide {
  min-width: 100%; padding: 0 1rem; box-sizing: border-box;
}
@media(min-width:768px) { .testimonial-slide { min-width: 50%; } }
@media(min-width:1024px) { .testimonial-slide { min-width: 33.333%; } }

/* ── FAQ Accordion ── */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.3s ease; }

/* ── WhatsApp Float ── */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,0.45); }
.whatsapp-float .pulse-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #25D366; animation: wa-pulse 2s ease-out infinite;
}
@keyframes wa-pulse { 0% { transform:scale(1); opacity:0.6; } 100% { transform:scale(1.5); opacity:0; } }

/* ── Back to Top ── */
.back-to-top {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 998;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--burgundy); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(107,29,42,0.2);
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: rgba(26,17,24,0.95); backdrop-filter: blur(8px);
  color: #fff; padding: 1rem 1.5rem;
  transform: translateY(100%); transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }

/* ── Popup Modal ── */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9997;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.popup-overlay.active { opacity: 1; visibility: visible; }
.popup-content {
  background: #fff; border-radius: 1.5rem; max-width: 500px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15); overflow: hidden;
  transform: scale(0.9); transition: transform 0.3s ease;
}
.popup-overlay.active .popup-content { transform: scale(1); }

/* ── Breadcrumb ── */
.breadcrumb-item + .breadcrumb-item::before {
  content: '›'; margin: 0 0.5rem; color: rgba(255,255,255,0.5);
}

/* ── Hero Page Banner ── */
.page-hero {
  position: relative; min-height: 320px;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--burgundy-d), var(--burgundy));
  overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}
.page-hero > * { position: relative; z-index: 1; }

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9996;
  background: rgba(0,0,0,0.92); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img { max-width: 90%; max-height: 85vh; border-radius: 0.5rem; }

/* ── Animated Gradient BG ── */
.animated-gradient {
  background: linear-gradient(-45deg, var(--burgundy-d), var(--burgundy), #8B2E3E, var(--gold));
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Typing Effect ── */
.typing-cursor::after {
  content: '|'; animation: blink 1s step-end infinite; color: var(--gold);
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F2EE; }
::-webkit-scrollbar-thumb { background: var(--burgundy); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--burgundy-d); }

/* ── Mobile Drawer ── */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 9990;
  visibility: hidden; opacity: 0;
  transition: visibility 0.3s, opacity 0.3s;
}
.mobile-drawer.open { visibility: visible; opacity: 1; }
.mobile-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 85vw;
  background: #fff; box-shadow: -4px 0 30px rgba(0,0,0,0.15);
  transform: translateX(100%); transition: transform 0.35s ease;
  overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer__panel { transform: translateX(0); }
.mobile-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
}

/* ── Float Badge ── */
.float-badge { animation: float 4s ease-in-out infinite; }

/* ── Responsive ── */
@media(max-width:640px) {
  .hero-slider { min-height: 90vh; }
  .hero-slide__content { padding-top: 5rem; }
  .mega-menu { min-width: 300px; }
}
