/* GLOBAL VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Dancing+Script:wght@700&display=swap');

:root {
  --primary: #1b2f5e;
  /* Navy Blue */
  --secondary: #2c9ad6;
  /* Soft Teal */
  --accent: #f5c400;
  /* Gold */
  --bg-color: #f0f2f5;
  /* Neutral Gray */
  --text-dark: #2d3436;
  --text-light: #636e72;
  --danger: #e74c3c;
  --success: #2ecc71;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  /* Rainbow accent from the logo, used for borders and stripes */
  --rainbow: linear-gradient(90deg, #e3262b, #f59e0b, #f5c400, #6dbb2b, #3c7be0, #5a3ea8, #7a2f9a);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.slide-in {
  animation: slideIn 0.6s ease-out forwards;
}

/* NAVBAR */
.navbar {
  background: var(--primary);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Rainbow stripe taken from the triangles in the school logo */
.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--rainbow);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.logo img {
  height: 46px;
  width: auto;
  background: var(--white);
  border-radius: 8px;
  padding: 3px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  margin-left: 20px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links .btn {
  background: var(--accent);
  color: var(--primary) !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(245, 196, 0, 0.3);
  transition: transform 0.2s;
}

.nav-links .btn:hover {
  transform: translateY(-2px);
}

/* HERO */
.hero {
  height: 90vh;
  background: linear-gradient(rgba(27, 47, 94, 0.85), rgba(27, 47, 94, 0.7)),
    url("https://images.unsplash.com/photo-1588072432836-e10032774350") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero-content {
  animation: fadeIn 1s ease-out;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* CARDS */
.stats-cards,
.feature-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 40px;
}

.card,
.feature-card,
.gallery-item {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.card:hover,
.feature-card:hover,
.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* BUTTONS */
.btn {
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--secondary);
  color: #fff;
}

.btn.primary:hover {
  background: #1f7fb5;
  /* Darker Teal */
  box-shadow: 0 5px 15px rgba(44, 154, 214, 0.4);
}

.hero .btn.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.hero .btn.secondary:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
}

/* FOOTER */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
}

/* FORMS */
input,
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(44, 154, 214, 0.1);
}

/* HAMBURGER (Mobile) */
#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-icon {
    display: block;
    color: var(--white);
    font-size: 1.8rem;
    z-index: 1001; /* Above hero content */
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px; /* Specific width */
    height: 100vh;
    background: var(--primary); /* Solid Navy Blue */
    flex-direction: column;
    padding: 60px 30px;
    gap: 25px;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smooth ease */
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }

  #menu-toggle:checked~.nav-links {
    right: 0;
  }

  /* Close Button Styling */
  .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s;
    display: block; /* Ensure visibility */
  }

  .close-btn:hover {
    color: var(--accent);
  }

  /* Mobile Links Styling */
  .nav-links a {
    font-size: 1.1rem;
    margin-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: block;
    width: 100%;
  }

  .nav-links a:last-child {
    border-bottom: none;
    margin-top: 10px;
  }

  .nav-links .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Adjust Hero Text */
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* Login Page Specifics */

/* Login Page Specifics - GLASSMORPHISM */
.login-hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(27, 47, 94, 0.9) 0%, rgba(27, 47, 94, 0.7) 100%),
    url("https://images.unsplash.com/photo-1588072432836-e10032774350") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Floating Glass Card */
.login-container {
  background: rgba(255, 255, 255, 0.85);
  /* Semi-transparent white */
  backdrop-filter: blur(12px);
  /* Glass Blur */
  -webkit-backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.2),
    0 4px 8px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  /* Subtle glass border */
  animation: fadeIn 0.8s ease-out, floatUp 1s ease-out;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Lift Effect */
.login-container:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.25),
    0 6px 12px 0 rgba(0, 0, 0, 0.15);
}

@keyframes floatUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-container h1 {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-container p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

/* Animated Inputs */
.login-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
}

.login-form input {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.login-form input:focus {
  background: #fff;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(44, 154, 214, 0.15);
  transform: scale(1.01);
}

/* Modern Pill Button */
.login-form .btn.primary {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1e5a8a 100%);
  box-shadow: 0 4px 15px rgba(27, 47, 94, 0.3);
  margin-top: 10px;
}

.login-form .btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(27, 47, 94, 0.4);
}

.login-form .btn.primary:active {
  transform: translateY(1px);
}


/* RESULTS PAGE STYLING */
.results-page {
  min-height: 100vh;
  /* Use the same background as login for consistency/premium feel */
  background: linear-gradient(135deg, rgba(27, 47, 94, 0.9) 0%, rgba(27, 47, 94, 0.7) 100%),
    url("https://images.unsplash.com/photo-1596495577886-d920f1fb7238") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  color: #fff;
}

.results-intro {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease-out;
}

.results-intro h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.results-intro p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
}

/* Glassmorphism Card for Form and Results */
.results-form,
.results-display {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  margin-bottom: 30px;
  animation: slideIn 0.6s ease-out;
}

.results-display {
  display: none;
  /* Hidden by default */
  border-top: 4px solid var(--secondary);
}

/* Form Layout */
#resultsForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
}

#resultsForm input,
#resultsForm select {
  margin-bottom: 0;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
}

#resultsForm input:focus,
#resultsForm select:focus {
  background: #fff;
  border-color: var(--secondary);
}

#resultsForm button {
  height: 48px;
  /* Match input height roughly */
  margin-top: 0;
}

/* Full width for simpler mobile layout or if preferred */
@media (max-width: 768px) {
  #resultsForm {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Table Styling */
.results-display h2 {
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  /* For rounded corners on header */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th,
td {
  padding: 15px 20px;
  text-align: left;
}

th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

tr:hover {
  background-color: #e3f2fd;
  transition: background-color 0.2s;
}

td {
  color: var(--text-dark);
  border-bottom: 1px solid #eee;
}

/* Grade/Score highlight */
td:nth-child(2) {
  font-weight: 700;
  color: var(--primary);
}

/* CONTACT PAGE */
.contact-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-form h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-details h2 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.contact-details p {
  margin-bottom: 15px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-details .map-placeholder {
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-top: 20px;
  height: 300px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* --- HOME PAGE STATS --- */
.stats-section {
  padding: 60px 20px;
  background: #fff;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-card {
  padding: 20px;
  background: var(--bg-color);
  border-radius: 12px;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 5px;
}

/* --- ABOUT PAGE --- */
.page-hero {
  background: linear-gradient(rgba(27, 47, 94, 0.9), rgba(27, 47, 94, 0.8)),
    url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1") center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 80px 20px;
  margin-bottom: 40px;
}

.page-hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.about-section,
.mission-vision,
.values {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mission-vision {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.mv-card {
  flex: 1;
  min-width: 300px;
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 5px solid var(--secondary);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
}

.value-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- ACADEMICS PAGE --- */
.academics,
.curriculum {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.academics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.academic-card {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  border-left: 5px solid var(--accent);
}

.academic-card:hover {
  transform: translateY(-5px);
}

.academic-card span {
  font-size: 2rem;
  display: block;
  margin-bottom: 15px;
}

.curriculum-features {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.curriculum-item {
  background: #e3f2fd;
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 500;
}

/* --- ADMISSIONS PAGE --- */
.requirements,
.admission-intro,
.admission-steps {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.requirement-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px dashed var(--secondary);
  text-align: center;
  font-weight: 500;
}

.admission-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.step-card {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.step-card span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

/* --- GALLERY PAGE --- */
.gallery-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.02);
}

/* --- MOBILE RESPONSIVE TWEAKS --- */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  /* Image first on mobile */
  .page-hero h1 {
    font-size: 2rem;
  }
}

/* --- HEAD TEACHER SECTION --- */
.headteacher {
  padding: 80px 20px;
  background: #f8f9fa;
  /* Light gray background */
  text-align: center;
  margin-bottom: 40px;
}

.headteacher-content {
  max-width: 800px;
  margin: 0 auto;
}

.headteacher h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.headteacher p {
  font-size: 1.25rem;
  line-height: 1.8;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.headteacher h4 {
  color: var(--secondary);
  font-weight: 700;
}

/* --- ANNOUNCEMENTS SECTION --- */
.announcements {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.announcements h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
}

.announcement-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.announcement {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--accent);
  /* Accent border */
  transition: transform 0.2s;
}

.announcement:hover {
  transform: translateY(-5px);
}

.announcement h4 {
  color: var(--text-dark);
  font-size: 1.2rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement p {
  color: var(--text-light);
  font-size: 0.95rem;
}