:root {
  --primary: #d71f26;
  --primary-dark: #980f15;
  --primary-soft: #ffe7e8;
  --text-dark: #1b1b1b;
  --text-light: #5e5e5e;
  --white: #ffffff;
  --shadow: 0 12px 35px rgba(215, 31, 38, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-dark);
}

.section-padding {
  padding: 90px 0;
}

.section-padding-sm {
  padding: 60px 0;
}

.section-tag {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title {
  font-weight: 700;
  margin-bottom: 0;
}

.bg-light-red {
  background: linear-gradient(160deg, #fff, var(--primary-soft));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
  transition: all 0.35s ease;
  background: rgba(255, 255, 255, 0.97);
}

.site-header.scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.site-header .navbar {
  min-height: 92px;
  transition: min-height 0.35s ease;
}

.site-header.scrolled .navbar {
  min-height: 58px;
}

.logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: all 0.35s ease;
}

.site-header.scrolled .logo-img {
  width: 44px;
  height: 44px;
}

.school-name {
  font-weight: 700;
  line-height: 1.1;
}

.school-place {
  color: var(--text-light);
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: calc(100% - 16px);
}

.navbar-toggler i {
  color: var(--primary);
  font-size: 1.5rem;
}

.mobile-nav .nav-link {
  color: #fff;
  font-weight: 500;
}

.hero-section,
.hero-section .carousel-item {
  min-height: 100vh;
}

.hero-section .carousel-item {
  position: relative;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  transform: scale(1.08);
  animation: zoomBg 9s linear infinite alternate;
}

.hero-overlay {
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.72), rgba(215, 31, 38, 0.52));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  padding-top: 120px;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  max-width: 800px;
  animation: fadeUp 1.1s ease both;
}

.hero-content p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 600px;
  animation: fadeUp 1.2s ease both;
}

.btn-brand {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 32px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.btn-brand:hover {
  color: #fff;
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.hero-content .btn-brand {
  align-self: flex-start;
  display: inline-flex;
  width: auto;
  padding: 10px 22px;
}

.about-col {
  display: flex;
}

.about-image {
  width: 100%;
  min-height: 520px;
  height: 100%;
  object-fit: cover;
}

.about-content {
  width: 100%;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .about-image,
  .about-content {
    min-height: 420px;
  }
}

.section-image {
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.info-card,
.feature-card,
.facility-card,
.teacher-card,
.notice-card,
.contact-details,
.contact-form {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.info-card:hover,
.feature-card:hover,
.facility-card:hover,
.teacher-card:hover,
.notice-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1);
}

.feature-card i,
.facility-card i {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.teacher-card {
  text-align: center;
}

.teacher-card img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
}

.gallery-item {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: scale(1.06);
}

.badge-date {
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.contact-details p {
  margin-bottom: 12px;
}

.contact-details i {
  color: var(--primary);
  margin-right: 8px;
}

.contact-form .form-control {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px 14px;
}

.contact-form .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(215, 31, 38, 0.15);
  border-color: var(--primary);
}

.site-footer {
  color: #fff;
  background: #151515;
}

.map-wrap iframe {
  width: 100%;
  height: 340px;
  border: 0;
}

.footer-logo {
  width: 84px;
}

.footer-main h6 {
  font-weight: 700;
  margin-bottom: 14px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a,
.footer-main p {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.18);
  transition: all 0.25s ease;
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.floating-whatsapp,
.scroll-top-btn {
  position: fixed;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  z-index: 1050;
  text-decoration: none;
  border: 0;
}

.floating-whatsapp {
  bottom: 84px;
  background: #1ebe57;
}

.scroll-top-btn {
  bottom: 20px;
  background: var(--primary);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomBg {
  from {
    transform: scale(1.04);
  }

  to {
    transform: scale(1.12);
  }
}

@media (max-width: 991.98px) {
  .brand-text {
    display: none;
  }

  .hero-section,
  .hero-section .carousel-item,
  .hero-content {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 100px;
  }
}

@media (max-width: 575.98px) {
  .section-padding {
    padding: 70px 0;
  }

  .gallery-item {
    height: 190px;
  }
}

:root {
  --primary: #c61d1d;
  --primary-dark: #a41717;
  --white: #ffffff;
  --text: #1d1d1f;
  --muted: #6b7280;
  --light-bg: #f8fafc;
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background-color: var(--white);
}

a {
  text-decoration: none;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--muted);
  max-width: 680px;
}

.btn-school {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
  padding: 10px 22px;
  border-radius: 999px;
  transition: 0.3s ease;
}

.btn-school:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-outline-school {
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 22px;
  transition: 0.3s ease;
}

.btn-outline-school:hover {
  background: var(--primary);
  color: var(--white);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.97);
  transition: 0.3s ease;
}

.site-header .navbar {
  min-height: 92px;
  transition: 0.3s ease;
}

.site-header.shrink {
  box-shadow: var(--shadow);
}

.site-header.shrink .navbar {
  min-height: 62px;
}

.site-logo {
  height: 56px;
  width: auto;
  transition: 0.3s ease;
}

.site-header.shrink .site-logo {
  height: 44px;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text);
  margin-inline: 6px;
  position: relative;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  color: var(--primary);
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: 2px;
  width: 80%;
  height: 2px;
  background: var(--primary);
}

main {
  padding-top: 92px;
}

/* Hero slider */
.hero-slider,
.page-hero {
  position: relative;
}

.hero-slider .swiper-slide {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
}

.slide-bg,
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.slide-overlay,
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.74), rgba(198, 29, 29, 0.38));
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.hero-content h1,
.page-hero-content h1 {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 700;
}

.hero-content p,
.page-hero-content p {
  max-width: 620px;
  opacity: 0.95;
}

.hero-slider .swiper-pagination-bullet-active {
  background: var(--primary);
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
  color: var(--white);
}

/* Cards and sections */
.feature-card,
.teacher-card,
.notice-card,
.gallery-card,
.info-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  transition: 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.feature-card:hover,
.teacher-card:hover,
.notice-card:hover,
.gallery-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.teacher-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.gallery-card {
  overflow: hidden;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.notice-list li {
  margin-bottom: 12px;
}

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: #111827;
  color: #f3f4f6;
}

.map-frame {
  width: 100%;
  height: 300px;
  border: 0;
}

.footer-middle {
  padding: 56px 0 24px;
}

.footer-title {
  font-size: 1.05rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-link {
  display: block;
  color: #d1d5db;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px 0;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  margin-left: 8px;
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Utilities */
.scroll-top,
.whatsapp-float {
  position: fixed;
  right: 20px;
  z-index: 1050;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--shadow);
}

.scroll-top {
  bottom: 20px;
  border: 0;
  background: var(--primary);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.3s ease;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.whatsapp-float {
  bottom: 78px;
  background: #1fae4b;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1080;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 2rem;
  color: var(--white);
  background: none;
  border: none;
}

@media (max-width: 991.98px) {
  .offcanvas {
    width: min(320px, 85vw);
  }

  main {
    padding-top: 82px;
  }

  .site-header .navbar {
    min-height: 82px;
  }

  .hero-slider .swiper-slide {
    min-height: 86vh;
  }
}

@media (max-width: 575.98px) {
  .hero-slider .swiper-slide {
    min-height: 78vh;
  }

  .teacher-card img,
  .gallery-card img {
    height: 210px;
  }
}

/* Enforce header shrink behavior on all screens */
#siteHeader.site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#siteHeader.site-header .navbar {
  min-height: 92px;
  transition: min-height 0.3s ease;
}

#siteHeader.site-header .logo-img {
  width: 64px;
  height: 64px;
  transition: width 0.3s ease, height 0.3s ease;
}

#siteHeader.site-header.scrolled .navbar,
#siteHeader.site-header.shrink .navbar {
  min-height: 58px;
}

#siteHeader.site-header.scrolled .logo-img,
#siteHeader.site-header.shrink .logo-img {
  width: 44px;
  height: 44px;
}

@media (max-width: 991.98px) {
  #siteHeader.site-header .navbar {
    min-height: 82px;
  }

  #siteHeader.site-header.scrolled .navbar,
  #siteHeader.site-header.shrink .navbar {
    min-height: 56px;
  }

  #siteHeader.site-header .logo-img {
    width: 56px;
    height: 56px;
  }

  #siteHeader.site-header.scrolled .logo-img,
  #siteHeader.site-header.shrink .logo-img {
    width: 40px;
    height: 40px;
  }
}

/* Keep header + hero in one viewport */
:root {
  --header-height-desktop: 92px;
  --header-height-mobile: 82px;
}

main {
  padding-top: var(--header-height-desktop);
}

#home.hero-section,
#home.hero-section .carousel-item,
#home.hero-section .hero-content {
  min-height: calc(100vh - var(--header-height-desktop));
}

#home.hero-section .hero-content {
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 991.98px) {
  main {
    padding-top: var(--header-height-mobile);
  }

  #home.hero-section,
  #home.hero-section .carousel-item,
  #home.hero-section .hero-content {
    /* min-height: calc(100vh - var(--header-height-mobile)); */
    min-height: 477px;
  }

  #home.hero-section .hero-content {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* About page */
.about-hero {
  position: relative;
  min-height: calc(100vh - var(--header-height-desktop));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: zoomBg 10s linear infinite alternate;
}

.about-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 760px;
}

.about-hero-content h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
}

.about-hero-content p {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.section-subtext {
  color: var(--text-light);
  max-width: 760px;
}

.infographic-card {
  background: #fff;
  border-radius: 16px;
  text-align: center;
  padding: 26px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infographic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.icon-bubble {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--primary);
  background: var(--primary-soft);
  animation: floatY 2.2s ease-in-out infinite;
}

.infographic-card h3 {
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--primary-dark);
}

.infographic-card p {
  margin-bottom: 0;
  color: var(--text-light);
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 991.98px) {
  .about-hero {
    min-height: calc(76vh - var(--header-height-mobile));
  }
}

/* Gallery page */
.gallery-hero .about-hero-content {
  max-width: 860px;
}

.filter-wrap {
  background: #fff;
  border: 1px solid #f0d3d4;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.parent-filter,
.child-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.year-filter-btn,
.category-filter-btn {
  border: 1px solid #efc1c4;
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  transition: all 0.28s ease;
}

.year-filter-btn.active,
.category-filter-btn.active,
.year-filter-btn:hover,
.category-filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.memory-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.memory-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.memory-card:hover img {
  transform: scale(1.08);
}

.memory-card:hover {
  transform: translateY(-6px);
}

.memory-info {
  padding: 12px 14px 14px;
}

.memory-info h6 {
  margin-bottom: 4px;
  font-weight: 700;
}

.memory-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.memory-card.is-hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  display: none;
}

/* Contact page */
.contact-hero .about-hero-content {
  max-width: 820px;
}

.map-frame-lg {
  width: 100%;
  min-height: 420px;
  border: 0;
}

/* Notices horizontal marquee */
.notice-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.notice-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: noticeScroll 28s linear infinite;
}

.notice-marquee:hover .notice-track {
  animation-play-state: paused;
}

.notice-slide {
  flex: 0 0 clamp(260px, 28vw, 360px);
}

@keyframes noticeScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 9px));
  }
}

/* Teachers horizontal marquee */
.teacher-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.teacher-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: teacherScroll 26s linear infinite;
}

.teacher-marquee:hover .teacher-track {
  animation-play-state: paused;
}

.teacher-slide {
  flex: 0 0 clamp(230px, 24vw, 290px);
}

@keyframes teacherScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 9px));
  }
}