/* Custom Properties (Variables) */
:root {
  /* Core Colors */
  --primary: #81001c;
  --primary-container: #a6192e;
  --primary-fixed: #ffdad9;
  --on-primary: #ffffff;

  --secondary: #515f7a;

  --surface: #fcf9f6;
  --surface-low: #f6f3f0;
  --surface-lowest: #ffffff;
  --surface-highest: #e5e2df;
  --surface-variant: #e5e2df;

  --on-surface: #1c1c1a;
  --on-surface-variant: #594040;
  --on-background: #1c1c1a;
  --outline: #8d7070;
  --outline-variant: #e1bebe;

  /* Typography */
  --font-headline: "Noto Serif", serif;
  --font-body: "Inter", sans-serif;
}

/* Base Reset & Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

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

/* Typography Utilities */
h1,
h2,
h3,
h4,
.font-headline {
  font-family: var(--font-headline);
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}

.tag-accent {
  display: block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* Layout Utilities */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 3rem;
  }
}

.section-padding {
  padding: 6rem 0;
}
@media (min-width: 1024px) {
  .section-padding {
    padding: 8rem 0;
  }
}

.bg-surface {
  background-color: var(--surface);
}
.bg-surface-low {
  background-color: var(--surface-low);
}

/* Shadows */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.shadow-large {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
}

.btn:active {
  transform: scale(0.95);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-container);
}

.btn-glass {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-glass:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-dark {
  border: 1px solid var(--outline);
  background-color: rgba(225, 190, 190, 0.2);
  color: var(--on-surface);
}

.btn-outline-dark:hover {
  background-color: var(--surface-container);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.btn-text .material-symbols-outlined {
  transition: transform 0.3s ease;
}

.btn-text:hover .material-symbols-outlined {
  transform: translateX(8px);
}

.flex-btn {
  gap: 0.75rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background-color: rgba(252, 249, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: 9vh;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary); /* Changed to primary to be visible on white bg */
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  color: var(--secondary);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.25rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.icon-group {
  display: flex;
  gap: 1rem;
}

.icon-btn {
  color: var(--secondary);
  padding: 0.5rem;
  transition: color 0.3s;
}

.icon-btn:hover {
  color: var(--primary);
}

.nav-btn {
  display: none;
}

@media (min-width: 1024px) {
  .nav-btn {
    display: inline-flex;
  }
}

.mobile-menu-btn {
  display: block;
  color: var(--on-surface);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05); /* Slight zoom effect setup */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(
    0,
    0,
    0,
    0.5
  ); /* Slightly darkened for better text readability */
}

.hero-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.hero-content {
  max-width: 48rem;
}

/* Hide hero elements initially to prevent flash of un-animated content */
.hero-content > * {
  opacity: 0;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  background-color: rgba(129, 0, 28, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  margin-bottom: 2rem;
}

.hero-badge span {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: white;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 5rem;
  }
}

.hero-content h1 span {
  color: var(--primary-fixed);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  line-height: 1.625;
  font-style: italic;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Welcome Section */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .welcome-grid {
    grid-template-columns: 5fr 7fr;
    gap: 6rem;
  }
}

.welcome-image-wrapper {
  position: relative;
}

.blur-accent {
  position: absolute;
  top: -3rem;
  left: -3rem;
  width: 16rem;
  height: 16rem;
  background-color: rgba(255, 218, 217, 0.5); /* Primary-fixed */
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

.image-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  z-index: 10;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, var(--primary), transparent);
  color: white;
}

.image-caption h4 {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.image-caption p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-style: italic;
}

.welcome-content h2 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .welcome-content h2 {
    font-size: 5rem;
  }
}

.welcome-text p {
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  margin-bottom: 1.5rem;
}

.welcome-content .btn-text {
  margin-top: 1.5rem;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bento-card {
  background-color: var(--surface-lowest);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.5s ease;
  display: block;
}

.bento-card:hover {
  background-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(129, 0, 28, 0.2);
}

.bento-icon-wrapper {
  width: 4rem;
  height: 4rem;
  background-color: var(--primary-fixed);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  transition: background-color 0.5s ease;
}

.bento-card:hover .bento-icon-wrapper {
  background-color: rgba(255, 255, 255, 0.2);
}

.icon-large {
  font-size: 2rem;
  color: var(--primary);
  transition: color 0.5s ease;
}

.bento-card:hover .icon-large {
  color: white;
}

.bento-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--on-background);
  transition: color 0.5s ease;
}

.bento-card p {
  color: var(--on-surface-variant);
  margin-bottom: 1.5rem;
  transition: color 0.5s ease;
}

.bento-card:hover h3 {
  color: white;
}
.bento-card:hover p {
  color: rgba(255, 255, 255, 0.8);
}

.action-icon {
  color: var(--primary);
  transition: color 0.5s ease;
}

.bento-card:hover .action-icon {
  color: white;
}

/* Academic Excellence */
.stats-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .stats-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.stats-title h2 {
  font-size: 2.5rem;
  font-weight: 900;
}

@media (min-width: 768px) {
  .stats-title h2 {
    font-size: 3rem;
  }
}

.stats-quote {
  max-width: 28rem;
  text-align: left;
}

@media (min-width: 768px) {
  .stats-quote {
    text-align: right;
  }
}

.stats-quote p {
  color: var(--on-surface-variant);
  font-style: italic;
  font-size: 1.125rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.stat-box {
  background-color: var(--surface-container);
  padding: 3rem;
  border-radius: 8px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-headline);
  font-size: 3.75rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--on-surface-variant);
  font-weight: 700;
  font-size: 1.125rem;
}

.testimonial-banner {
  background-color: var(--primary);
  border-radius: 8px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .testimonial-banner {
    padding: 4rem;
  }
}

.testimonial-accent {
  position: absolute;
  right: 0;
  top: 0;
  width: 16rem;
  height: 16rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.testimonial-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

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

.testimonial-text {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  color: white;
  font-style: italic;
  line-height: 1.625;
}

@media (min-width: 768px) {
  .testimonial-text {
    font-size: 1.875rem;
  }
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.author-img {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

.author-info h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.author-info p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

/* School Life Gallery Mosaic */
.section-header-center {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header-center h2 {
  font-size: 2.5rem;
  font-weight: 900;
}

@media (min-width: 768px) {
  .section-header-center h2 {
    font-size: 3rem;
  }
}

/* * Re-engineered CSS Grid Mosaic 
 * Creates a beautiful asymmetric layout on desktop,
 * gracefully stacking on mobile.
 */
.gallery-mosaic {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  auto-rows: 300px;
}

@media (min-width: 768px) {
  .gallery-mosaic {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 350px);
  }

  .mosaic-wide {
    grid-column: span 8;
    grid-row: span 1;
  }

  .mosaic-tall {
    grid-column: span 4;
    grid-row: span 2;
  }

  /* The remaining standard items automatically fill the rest of the 12 columns */
  .mosaic-item:not(.mosaic-wide):not(.mosaic-tall) {
    grid-column: span 4;
    grid-row: span 1;
  }
}

.mosaic-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 300px; /* Fallback for mobile */
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.mosaic-item:hover img {
  transform: scale(1.1);
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.mosaic-item:hover .mosaic-overlay {
  opacity: 1;
}

@media (max-width: 767px) {
  .mosaic-overlay {
    opacity: 1;
  }
}

.mosaic-overlay h3 {
  color: white;
  font-size: 1.875rem;
  font-weight: 700;
}

/* CTA Section */
.cta-banner {
  background-color: var(--surface-highest);
  border-radius: 8px;
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-banner {
    padding: 5rem;
    border-radius: 8px;
  }
}

.cta-banner h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .cta-banner h2 {
    font-size: 3rem;
  }
}

.cta-banner p {
  font-size: 1.25rem;
  color: var(--on-surface-variant);
  max-width: 42rem;
  margin-bottom: 3rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* Footer */
.footer {
  background-color: var(--surface-low);
  padding: 5rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-logo {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--on-background);
  margin-bottom: 1.5rem;
}

.footer-contact {
  color: var(--secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

.footer-links h4 {
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--secondary);
  font-size: 0.875rem;
  transition:
    color 0.3s,
    text-decoration-color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(225, 190, 190, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--secondary);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-badges {
  display: flex;
  gap: 2rem;
}

/* Mobile Menu Styles */
@media (max-width: 767px) {
  .nav-links.nav-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 9vh;
    left: 0;
    right: 0;
    background-color: var(--surface);
    padding: 1rem 1.5rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 49;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .nav-links.nav-open a {
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--surface-low);
  }

  .nav-links.nav-open a:last-child {
    border-bottom: none;
  }
}
