/* ==========================================================================
   GLOBAL RESETS, BOX SIZING & ANIMATION KEYFRAMES
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Keyframe Animations */
@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDownHeader {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes floatCrest {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.7));
  }
  50% {
    transform: translateY(-8px);
    filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.8));
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 6px 18px rgba(227, 189, 104, 0.4);
  }
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.site-header {
  background-color: #a38d6d; /* Golden-bronze header background */
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDownHeader 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo & Brand Styling */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.02);
}

.header-logo {
  height: 40px;
  width: auto;
  transition: transform 0.4s ease;
}

.logo-link:hover .header-logo {
  transform: rotate(-5deg) scale(1.05);
}

.school-name {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: Georgia, serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover,
.nav-link.active {
  background-color: #61181f; /* Dark Maroon accent */
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Mobile Responsive adjustment */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==========================================================================
   HERO BANNER SECTION
   ========================================================================== */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 480px;
  background: url('School_Grounds.jpeg') center/cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  animation: fadeInPage 0.8s ease-out;
}

/* Dark Tint Overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 12, 10, 0.45);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left Text Content Styling */
.hero-text-content {
  max-width: 550px;
  color: #ffffff;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.school-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.5rem;
  line-height: 1.05;
  font-weight: normal;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.school-tagline {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 35px;
  color: #f0e6d2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Action Buttons */
.hero-buttons {
  display: flex;
  gap: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 35px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
}

.btn-maroon {
  background: linear-gradient(to bottom, #7a1b24 0%, #4d0e15 100%);
  color: #ffffff;
}

.btn-maroon:hover {
  background: linear-gradient(to bottom, #8f202b 0%, #5e121a 100%);
}

.btn-gold {
  background: linear-gradient(to bottom, #e3bd68 0%, #a88134 100%);
  color: #2b1704;
  animation: pulseGlow 3s infinite ease-in-out;
}

.btn-gold:hover {
  background: linear-gradient(to bottom, #ebd188 0%, #bd933e 100%);
}

/* Right Crest Emblem Styling */
.hero-crest-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

.crest-image {
  width: 320px;
  height: auto;
  animation: floatCrest 5s ease-in-out infinite;
  transition: filter 0.3s ease;
}

.crest-image:hover {
  filter: drop-shadow(0 20px 30px rgba(227, 189, 104, 0.5));
}

/* Responsive Mobile Layout */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .school-title {
    font-size: 2.4rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .crest-image {
    width: 220px;
    margin-bottom: 25px;
  }
}

/* ==========================================================================
   OUTER CONTENT & SECTION TITLES
   ========================================================================== */
.bottom-content-section {
  width: 100%;
  background-color: #f2ebd9; /* Beige background matching mockup */
  padding: 30px 0;
  font-family: Arial, Helvetica, sans-serif;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 40px; /* Space between Events and News */
  align-items: flex-start;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 20px 0;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: #6d141d;
  transition: width 0.3s ease;
}

.events-column:hover .section-title::after,
.news-column:hover .section-title::after {
  width: 100%;
}

/* ==========================================================================
   BOTTOM HORIZONTAL CONTAINER (Events + News Parent)
   ========================================================================== */
.bottom-section-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  background-color: #f2ebd9; /* Matching light beige background */
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden; /* Safety lock against horizontal scrollbars */
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ==========================================================================
   LEFT COLUMN: UPCOMING EVENTS
   ========================================================================== */
.events-column {
  flex: 1 1 45%;
  min-width: 0; /* Prevents flex items from exceeding container bounds */
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px 20px;
}

.event-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.event-card:hover {
  background-color: rgba(255, 255, 255, 0.6);
  transform: translateX(4px);
}

.date-badge {
  background-color: #6d141d; /* Deep Maroon */
  color: #ffffff;
  width: 48px;
  padding: 4px 2px 6px;
  border-radius: 4px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.event-card:hover .date-badge {
  transform: scale(1.08);
  background-color: #8a1a25;
}

.day-label {
  display: block;
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}

.date-number {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

.month-label {
  display: block;
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.9;
}

.event-details {
  display: flex;
  flex-direction: column;
}

.event-time {
  font-size: 0.72rem;
  color: #555555;
  margin-bottom: 2px;
}

.event-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #222222;
  line-height: 1.25;
  margin: 0;
  transition: color 0.2s ease;
}

.event-card:hover .event-title {
  color: #6d141d;
}

/* ==========================================================================
   RIGHT COLUMN: FEATURED NEWS
   ========================================================================== */
.news-column {
  flex: 1 1 50%;
  min-width: 0; /* Prevents grid/images from causing layout overflow */
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.carousel-controls {
  display: flex;
  gap: 5px;
}

.control-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background-color: #8c7355;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn:hover {
  transform: scale(1.15);
  background-color: #6d141d;
}

.control-btn.active,
.control-btn.next-btn {
  background-color: #6d141d;
}

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

.news-card {
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.card-image-wrapper {
  width: 100%;
  height: 90px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-card:hover .card-image {
  transform: scale(1.08);
}

.news-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #222222;
  line-height: 1.2;
  margin: 0 0 4px 0;
  transition: color 0.2s ease;
}

.news-card:hover .news-title {
  color: #6d141d;
}

.news-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3; /* Standards property */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FOOTER SECTION STYLES
   ========================================================================== */
.site-footer {
  width: 100%;
  background: linear-gradient(to bottom, #4d0e15 0%, #30080d 100%); /* Rich Deep Maroon */
  color: #f0e6d2;
  font-family: Arial, Helvetica, sans-serif;
  border-top: 3px solid #e3bd68; /* Accent Gold Divider Line */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 30px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  box-sizing: border-box;
}

.footer-col {
  flex: 1;
  min-width: 0;
}

/* Column 1: Identity */
.footer-logo-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  color: #e3bd68; /* Gold Accent Title */
  margin-bottom: 8px;
  font-weight: normal;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #d1c4b2;
  margin-bottom: 12px;
  font-style: italic;
}

.school-address {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #b5a895;
}

/* Columns 2 & 3: Navigation & Contact Links */
.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(227, 189, 104, 0.3);
  padding-bottom: 5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.footer-links a {
  color: #d1c4b2;
  text-decoration: none;
  display: inline-block;
  transition: color 0.25 ease, transform 0.25s ease;
}

.footer-links a:hover {
  color: #e3bd68; /* Gold Hover Highlight */
  transform: translateX(4px);
  text-decoration: underline;
}

.footer-links span {
  color: #b5a895;
}

/* Bottom Bar */
.footer-bottom {
  background-color: #200508;
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.75rem;
  color: #998c7a;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 25px;
  }
}

@media (max-width: 900px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-container {
    flex-direction: column-reverse;
    gap: 16px;
    text-align: center;
  }

  .hero-text-content {
    max-width: 100%;
  }

  .school-title {
    font-size: clamp(2rem, 5vw, 2.4rem);
  }

  .crest-image {
    width: min(220px, 55vw);
    margin-bottom: 0;
  }

  .content-container {
    flex-direction: column;
    gap: 30px;
  }

  .events-column,
  .news-column {
    width: 100%;
  }

  .events-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 12px;
  }

  .logo-link {
    gap: 8px;
  }

  .header-logo {
    height: 34px;
  }

  .school-name {
    font-size: 0.95rem;
  }

  .nav-menu {
    gap: 4px;
  }

  .nav-link {
    padding: 7px 9px;
    font-size: 0.72rem;
  }

  .hero-container {
    padding: 28px 16px;
  }

  .school-title {
    font-size: 1.8rem;
  }

  .school-tagline {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .content-container {
    padding: 0 16px;
  }

  .events-grid,
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}