/* =============================================
   SAI PUBLIC SCHOOL — REVAMPED DESIGN SYSTEM
   Aesthetic: Refined Academic Elegance
   Palette: Deep Navy + Warm Gold + Cream
   Fonts: Playfair Display + DM Sans
   ============================================= */

:root {
  --navy:    #0d1b3e;
  --navy-md: #1a2f5a;
  --navy-lt: #2a4480;
  --gold:    #c8952a;
  --gold-lt: #e8b84b;
  --cream:   #fdf8f0;
  --white:   #ffffff;
  --gray-1:  #f5f5f7;
  --gray-2:  #e8e8ee;
  --gray-3:  #9a9ab0;
  --text:    #1a1a2e;
  --radius:  14px;
  --shadow:  0 4px 24px rgba(13,27,62,0.10);
  --shadow-lg: 0 12px 48px rgba(13,27,62,0.18);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid var(--gold);
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,149,42,0.35);
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--navy);
  padding: 13px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-outline-white {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid rgba(255,255,255,0.7);
  transition: var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }
.btn-full { width: 100%; text-align: center; border: none; }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(13,27,62,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,149,42,0.2);
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(13,27,62,0.99);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.nav-logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.brand-name { display: block; font-family: 'Playfair Display', serif; color: var(--white); font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.brand-sub { display: block; color: var(--gold-lt); font-size: 0.7rem; letter-spacing: 0.05em; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--gold-lt); background: rgba(200,149,42,0.1); }
.nav-link .arrow { font-size: 0.7rem; }
.nav-cta {
  background: var(--gold);
  color: var(--white) !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  margin-left: 8px;
}
.nav-cta:hover { background: var(--gold-lt); transform: translateY(-1px); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: 8px;
  transition: var(--transition);
}
.dropdown-menu a:hover { background: var(--gray-1); color: var(--navy); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed; top: 72px; left: 0; right: 0; z-index: 999;
  background: var(--navy);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
  border-bottom: 2px solid var(--gold);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--gold-lt); background: rgba(200,149,42,0.1); }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-md) 50%, #122060 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 60px 80px;
  gap: 60px;
  position: relative;
  overflow: hidden;
}

/* Background shapes */
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: var(--gold);
}
.shape-1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.shape-2 { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.shape-3 { width: 200px; height: 200px; top: 40%; right: 40%; background: var(--white); opacity: 0.03; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,149,42,0.15);
  border: 1px solid rgba(200,149,42,0.4);
  color: var(--gold-lt);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
}
.badge-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); } 50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } }

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero-title em { color: var(--gold-lt); font-style: italic; }
.hero-desc {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
  animation: fadeUp 0.7s ease 0.2s both;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeUp 0.7s ease 0.3s both;
}
.hero-actions .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.5); }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: fadeUp 0.7s ease 0.4s both;
}
.stat { text-align: left; }
.stat-num { display: block; font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--gold-lt); }
.stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); letter-spacing: 0.03em; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* Hero image grid */
.hero-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  animation: fadeIn 1s ease 0.3s both;
}
.img-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.img-card--tall { grid-row: span 2; }
.img-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.img-card:hover img { transform: scale(1.04); }
.img-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(13,27,62,0.85));
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 20px 12px 10px;
  letter-spacing: 0.02em;
}

@keyframes fadeUp { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ========== TOPPERS BANNER ========== */
.toppers-banner {
  background: linear-gradient(135deg, #1a3a6e 0%, var(--navy) 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.toppers-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 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='%23c8952a' fill-opacity='0.05'%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");
  pointer-events: none;
}
.toppers-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.toppers-text h2 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.toppers-text p { color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.toppers-img {
  flex-shrink: 0;
  max-width: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(200,149,42,0.4);
}

/* ========== SECTION HEADERS ========== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  background: rgba(200,149,42,0.1);
  color: var(--gold);
  border: 1px solid rgba(200,149,42,0.3);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  color: var(--gray-3);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========== OFFERS ========== */
.offers-section {
  padding: 100px 0;
  background: var(--cream);
}
.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.offer-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
  position: relative;
  overflow: hidden;
}
.offer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.offer-card--primary::before { background: var(--gold); }
.offer-card--secondary::before { background: #3b82f6; }
.offer-card--tertiary::before { background: #22c55e; }

.offer-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.offer-icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
  display: block;
}
.offer-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-2);
}
.offer-card li {
  color: #555;
  font-size: 0.9rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.offer-card li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ========== GALLERY STRIP ========== */
.gallery-strip {
  padding: 80px 0;
  background: var(--white);
  overflow: hidden;
}
.gallery-scroll { overflow: hidden; }
.gallery-track {
  display: flex;
  gap: 16px;
  animation: scrollTrack 28s linear infinite;
  width: max-content;
  padding: 8px 0;
}
.gallery-track:hover { animation-play-state: paused; }
@keyframes scrollTrack { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.g-item {
  width: 280px;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.g-item:hover img { transform: scale(1.07); }

/* ========== REVIEWS ========== */
.reviews-section {
  padding: 100px 0;
  background: var(--cream);
}
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 24px;
  align-items: start;
}
.review-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.review-card--featured {
  background: var(--navy);
  color: var(--white);
}
.review-card--featured p { color: rgba(255,255,255,0.82); }
.stars {
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.review-card p {
  color: #444;
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.reviewer { display: flex; align-items: center; gap: 12px; }
.reviewer-avatar {
  width: 40px; height: 40px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.reviewer strong { display: block; font-size: 0.9rem; }
.reviewer small { color: var(--gray-3); font-size: 0.78rem; }
.review-card--featured .reviewer strong { color: var(--white); }
.review-card--featured .reviewer small { color: rgba(255,255,255,0.55); }

.review-badges {
  background: var(--white);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 200px;
}
.badge-item { text-align: center; }
.badge-stars { color: var(--gold); font-size: 1.4rem; }
.badge-platform { color: var(--gray-3); font-size: 0.8rem; font-weight: 600; margin-top: 4px; }

/* ========== CONTACT ========== */
.contact-section {
  padding: 100px 0;
  background: var(--white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info .section-tag { text-align: left; margin-bottom: 12px; }
.contact-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 36px;
  line-height: 1.2;
}
.info-items { display: flex; flex-direction: column; gap: 20px; }
.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: var(--cream);
}
.info-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.info-item strong { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-lt); margin-bottom: 4px; }
.info-item p { font-size: 0.9rem; color: #555; line-height: 1.5; }
.info-item a { color: var(--gold); }
.info-item a:hover { text-decoration: underline; }

/* Form */
.contact-form-wrap {
  background: var(--cream);
  border-radius: 20px;
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 2px solid var(--gray-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,149,42,0.12);
}
.form-group textarea { resize: vertical; }

.form-success {
  background: #f0fdf4; border: 1px solid #4ade80; color: #166534;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 18px;
  font-size: 0.9rem; font-weight: 500;
}
.form-error {
  background: #fff1f2; border: 1px solid #f87171; color: #991b1b;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 18px;
  font-size: 0.9rem; font-weight: 500;
}

/* ========== MAP ========== */
.map-section { line-height: 0; }
.map-section iframe { border: none; display: block; }

/* ========== FOOTER ========== */
.footer {
  background: var(--navy);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 16px; border: 2px solid var(--gold); }
.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.88rem; line-height: 1.6; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem; font-weight: 700;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200,149,42,0.3);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li, .footer-col li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col li a:hover { color: var(--gold-lt); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.footer-bottom p { color: rgba(255,255,255,0.35); font-size: 0.82rem; }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: rgba(255,255,255,0.4); font-size: 0.82rem; transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--gold-lt); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 100px 24px 60px; text-align: center; }
  .hero-image-grid { max-width: 560px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .offers-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .reviews-grid { grid-template-columns: 1fr; }
  .review-badges { flex-direction: row; justify-content: space-around; max-width: 100%; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .toppers-inner { flex-direction: column; text-align: center; }
  .toppers-img { max-width: 100%; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 90px 20px 50px; }
  .hero-title { font-size: 2.2rem; }
  .img-card--tall { grid-row: span 1; }
  .hero-image-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .offers-section, .reviews-section, .contact-section { padding: 64px 0; }
  .gallery-strip { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 12px; }
  .stat-divider { width: 40px; height: 1px; }
  .contact-form-wrap { padding: 24px 20px; }
}
