/* ==========================================================================
   1. Design Tokens & Global Reset
   ========================================================================== */
:root {
  --primary: #8b0000;
  --primary-hover: #6a0000;
  --secondary: #0f172a;
  --accent: #b45309;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==========================================================================
   2. Header, Topbar & Navigation
   ========================================================================== */
.topbar {
  background-color: var(--secondary);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar a {
  color: #fff;
  text-decoration: none;
}

.navbar {
  background: #ffffff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 5%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
}


.brand-logo{
   width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
  flex-wrap: nowrap;
  justify-content: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease-in-out;
  padding: 4px 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

/* ==========================================================================
   3. Main, Hero (Image Slider) & Intro Sections
   ========================================================================== */
.main {
  width: 100%;
}

/* --- Hero Slider Area --- */
.hero {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #0f172a;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 480px; /* Default desktop height */
  overflow: hidden;
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Arrow Navigation Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  border: none;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 10;
  user-select: none;
}

.slider-btn:hover {
  background-color: #8b0000;
  transform: translateY(-50%) scale(1.08);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

/* Indicator Dots */
.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.slider-dot.active {
  background-color: #8b0000;
  transform: scale(1.25);
}

/* Responsive Slider Heights */
@media (max-width: 768px) {
  .slider-wrapper {
    height: 320px;
  }
  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .slider-wrapper {
    height: 230px;
  }
}

/* --- Welcome Section --- */
.welcome {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff8f5;
}

.welcome h2 {
  color: #c62509;
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.welcome p {
  color: #555;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 800px;
}

/* --- About Us Section --- */
.about-school {
  text-align: center;
  padding: 40px 20px;
  background-color: #f5f7fa;
}

.about-school h2 {
  color: #123456;
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.about-school p {
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 15px;
}

.about-school a {
  color: #c62509;
  text-decoration: none;
  font-weight: bold;
}

.about-school a:hover {
  color: #123456;
}

/* ==========================================================================
   4. Courses Section
   ========================================================================== */
.courses {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
  background-color: #fff8f5;
  border-radius: 12px;
  padding: 40px 20px;
}

.courses h2 {
  margin-bottom: 30px;
  color: #123456;
  font-size: 1.8rem;
}

.course-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.course {
  background-color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.course h3 {
  margin: 0 0 10px;
  color: #c62509;
}

.course p {
  line-height: 1.5;
  color: #555;
}

/* ==========================================================================
   5. School Info (Activities & Notices) - Matched & Aligned
   ========================================================================== */
.school-info-section {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.activities,
.notices {
  padding: 25px;
  border-radius: 12px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
}

.activities h2 {
  color: #c62509;
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.notices h2 {
  color: #123456;
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

/* Card layout using Flexbox to guarantee identical spacing */
.achievement,
.notice {
  background-color: #ffffff;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px; /* Keeps card heights balanced across rows */
}

.achievement h3 {
  color: #c62509;
  font-size: 1.05rem;
  margin: 0 0 6px 0;
}

.notice h3 {
  color: #123456;
  font-size: 1.05rem;
  margin: 0 0 6px 0;
}

.achievement p,
.notice p {
  color: #555;
  margin: 0 0 14px 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Option A: Style both Notice links and Achievement buttons as matching buttons */
.achievement-btn,
.notice a {
  display: inline-block;
  align-self: flex-start;
  padding: 7px 16px;
  border-radius: 5px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.achievement-btn {
  background-color: #c62509;
  color: #ffffff;
}

.achievement-btn:hover {
  background-color: #a01c05;
}

/* Notice link styled with the brand navy tone to distinguish sections */
.notice a {
  background-color: #123456;
  color: #ffffff;
}

.notice a:hover {
  background-color: #0d233a;
}

/* ==========================================================================
   6. Location & Contact
   ========================================================================== */
.location {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.location > h2 {
  grid-column: 1 / -1;
  text-align: center;
  color: #c62509;
  margin: 0 0 10px;
}

.map-section,
.contact-us {
  padding: 25px;
  background-color: #f5f7fa;
  border-radius: 10px;
}

.map-section h2,
.contact-us h2 {
  color: #123456;
  text-align: center;
  margin-top: 0;
}

.map iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 6px;
  display: block;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.address-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.address {
  font-size: 1rem;
  color: #1a1a11;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map {
  flex: 1;
  min-height: 80px;
  width: 100%;
}

.footer {
  background-color: #052e16;
  color: #fff;
  text-align: center;
  padding: 20px 15px;
}

/* ==========================================================================
   8. Media Queries (Responsive Breakpoints)
   ========================================================================== */

/* Tablets / Medium Desktops (≤ 992px) */
@media (max-width: 992px) {
  .course-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets / Large Mobile (≤ 768px) */
@media (max-width: 768px) {
  .topbar {
    justify-content: center;
    text-align: center;
  }

  .nav-container {
   position: relative;
   flex-direction: column;
   align-items: center;
   gap: 10px;
  }
  .brand-title{
    font-size: 1rem;
  }
  .brand-logo{
    width: 38px;
    height: 38px;
  }
  .nav-menu {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
  }
  .nav-menu.open{
    display: flex;
  }
  .nav-menu li{
    width: 100%;
    text-align: center;
  }
  .nav-menu a{
    display: block;
    padding: 10px;
    border-top: 1px solid var(--border-color);
  }

  .course-container {
    grid-template-columns: 1fr;
  }

  .courses {
    width: 95%;
    padding: 30px 15px;
  }

  .courses h2 {
    font-size: 1.5rem;
  }

  .school-info-section,
  .location {
    grid-template-columns: 1fr;
    width: 95%;
    gap: 20px;
    margin: 30px auto;
  }

  .address-map {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .address {
    align-items: center;
  }
}

/* Small Screens / Mobile Portrait (≤ 480px) */
@media (max-width: 480px) {
  .courses,
  .school-info-section,
  .location {
    width: 100%;
    margin: 20px 0;
    border-radius: 0;
  }

  .activities,
  .notices,
  .map-section,
  .contact-us {
    padding: 15px;
  }

  .map iframe {
    height: 220px;
  }

  .achievement-btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .hero .main-content img {
    height: 220px;
  }
}