/* =============================================
   KYEBAMBE GIRLS' SECONDARY SCHOOL
   Global Stylesheet — The Star Empire
   Developed by David Lavil Isingoma
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

/* ============= CSS CUSTOM PROPERTIES ============= */
:root {
  --primary-blue: #0B57A4;
  --accent-pink: #E6007E;
  --uniform-orange: #E36017;
  --uniform-brown: #6B3E2E;
  --soft-lavender: #B69AD6;
  --light-bg: #F4F7FB;
  --white: #FFFFFF;
  --gold: #FFD700;
  --dark-text: #1A1A2E;
  --green-cta: #25D366;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --navbar-height: 80px;
}

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

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

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark-text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.7;
  padding-top: 122px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

button {
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  border: none;
  outline: none;
}

/* ============= PAGE LOADER ============= */
#page-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--uniform-brown) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-badge {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: logoPulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.4));
}

.loader-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.35em;
  margin-top: 18px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
  text-transform: uppercase;
}

.loader-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.2em;
  margin-top: 6px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

.loader-bar-wrap {
  width: 260px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  margin-top: 28px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 10px;
  animation: loadProgress 2s linear forwards;
  width: 0%;
}

/* ============= MARQUEE BAR ============= */
.marquee-bar {
  background: var(--uniform-orange);
  border-bottom: 2px solid var(--gold);
  padding: 8px 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marqueeScroll 35s linear infinite;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  padding-right: 60px;
}

/* ============= NAVBAR ============= */
.navbar {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(11, 87, 164, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-badge {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}

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

.school-name {
  font-size: clamp(0.65rem, 1.1vw, 0.85rem);
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.navbar.scrolled .school-name {
  color: var(--white);
}

.tagline {
  font-size: 0.72rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent-pink);
}

.navbar.scrolled .tagline {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--dark-text);
  padding: 6px 10px;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}

.navbar.scrolled .nav-links a {
  color: rgba(255,255,255,0.9);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-pink);
  background: rgba(230, 0, 126, 0.08);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--gold);
  background: rgba(255,215,0,0.1);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-pink);
  border-radius: 2px;
}

.navbar.scrolled .nav-links a.active::after {
  background: var(--gold);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--primary-blue);
  border-radius: 3px;
  transition: var(--transition);
}

.navbar.scrolled .hamburger span {
  background: var(--white);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-blue);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  padding: 14px 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--gold);
  border-color: var(--gold);
}

.mobile-nav-logo {
  margin-bottom: 24px;
}

.mobile-nav-logo img {
  width: 70px;
  margin: 0 auto;
}

.mobile-nav-logo p {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.1em;
}

/* ============= PAGE HERO BANNER ============= */
.page-hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0a3d7a 100%);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  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.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-badge {
  width: 80px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.page-hero h1 span {
  color: var(--gold);
}

.page-hero p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.8);
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}

.breadcrumb a {
  color: var(--gold);
}

.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ============= SECTION COMMONS ============= */
.section-tag {
  display: inline-block;
  background: var(--uniform-orange);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--dark-text);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--primary-blue);
}

.section-subtitle {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: #555;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-pink));
  border-radius: 4px;
  margin: 16px auto 32px;
}

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

.section-pad {
  padding: 80px 0;
}

.section-pad-sm {
  padding: 50px 0;
}

.bg-light { background: var(--light-bg); }
.bg-blue { background: var(--primary-blue); }
.text-center { text-align: center; }

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-pink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,0,126,0.3);
}

.btn-accent {
  background: var(--accent-pink);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,87,164,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn-outline:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: var(--green-cta);
  color: var(--white);
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
}

/* ============= CARDS ============= */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ============= FOOTER ============= */
.site-footer {
  background: linear-gradient(135deg, var(--uniform-brown) 0%, var(--dark-text) 100%);
  color: var(--white);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent-pink);
}

/* Footer Brand */
.footer-logo {
  width: 70px;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.footer-school-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.footer-motto {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--soft-lavender);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--accent-pink);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(230,0,126,0.4);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.footer-links a i {
  color: var(--uniform-orange);
  font-size: 0.75rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(5px);
}

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

/* Footer Contact */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

.footer-contact-item i {
  color: var(--gold);
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Footer Copyright */
.footer-copyright {
  background: rgba(0,0,0,0.3);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--soft-lavender);
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ============= FLOATING BUTTONS ============= */
/* Email Float */
.float-email {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 56px;
  height: 56px;
  background: var(--green-cta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  animation: pulseGlow 2s infinite;
  transition: transform 0.3s ease;
}

.float-email:hover {
  transform: scale(1.15);
  animation: none;
  box-shadow: 0 6px 30px rgba(37,211,102,0.6);
}

.float-email-tooltip {
  position: absolute;
  right: 64px;
  background: var(--dark-text);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.float-email:hover .float-email-tooltip {
  opacity: 1;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 48px;
  height: 48px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top:hover {
  background: var(--accent-pink);
  transform: scale(1.1);
}

/* ============= SCROLL REVEAL ============= */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============= KEYFRAME ANIMATIONS ============= */
@keyframes logoPulse {
  0%, 100% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
}

@keyframes loadProgress {
  from { width: 0%; }
  to { width: 100%; }
}

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

@keyframes marqueeScroll {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.7); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============= RESPONSIVE — NAVBAR ============= */
@media (max-width: 1024px) {
  .nav-links a { font-size: 0.72rem; padding: 6px 7px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }
}

/* ============= RESPONSIVE — FOOTER ============= */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-col:first-child {
    text-align: center;
  }

  .footer-col:first-child h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ============= RESPONSIVE — PAGE HERO ============= */
@media (max-width: 600px) {
  .page-hero {
    padding: 60px 20px 40px;
  }
}

/* ============= GRID UTILITIES ============= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 28px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 18px; }
}

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

@media (min-width: 769px) and (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
