/* ============================================================
   St. Assisi School — Design System
   Color tokens, base reset, and all public page styles
   ============================================================ */

/* ============================================================
   PAGE PRELOADER
   ============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 99999;
  transition: opacity 0.55s ease;
}

#page-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#page-loader .loader-logo {
  width: 150px;
  animation: loader-pulse 1.1s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 24px rgba(245,158,11,0.25));
}

@keyframes loader-pulse {
  from { transform: scale(0.93); opacity: 0.85; }
  to   { transform: scale(1.04); opacity: 1; }
}

#page-loader .loader-dots {
  display: flex;
  gap: 0.55rem;
}

#page-loader .loader-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  animation: loader-dot 1.2s ease-in-out infinite;
}

#page-loader .loader-dots span:nth-child(2) { animation-delay: 0.2s; }
#page-loader .loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

:root {
  --navy:    #1e3a5f;
  --navy-dark: #142848;
  --gold:    #f59e0b;
  --gold-dark: #d97706;
  --white:   #ffffff;
  --gray:    #374151;
  --gray-light: #6b7280;
  --bg-light: #f8fafc;
  --border:  #e5e7eb;
  --shadow:  0 4px 24px rgba(30,58,95,0.10);
  --radius:  10px;
  --transition: 0.25s ease;
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--gray);
  background: var(--white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--gold-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   TOP ADMISSION BAR
   ============================================================ */
.top-bar {
  background-color: var(--navy-dark);
  color: var(--gold);
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background-color: var(--navy) !important;
  padding: 0 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.navbar-brand img {
  height: 80px;
  width: auto;
}

@media (max-width: 991px) {
  .navbar-brand img {
    height: 52px;
  }
  .navbar {
    padding: 0.3rem 1rem;
  }
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 500;
  padding: 1.1rem 0.9rem !important;
  font-size: 0.92rem;
  letter-spacing: 0.2px;
  transition: color var(--transition);
}

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

.navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdowns */
.dropdown-menu {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  padding: 0.5rem 0;
  margin-top: 0;
}

.dropdown-item {
  color: var(--gray);
  font-size: 0.9rem;
  padding: 0.55rem 1.2rem;
  transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--bg-light);
  color: var(--navy);
}

/* ── Nested submenu — base ── */
.dropdown-submenu {
  position: relative;
}

/* Hide Bootstrap's default caret on submenu toggles, use › instead */
.dropdown-submenu > .dropdown-toggle::after {
  display: inline-block;
  float: right;
  margin-left: 0.5rem;
  content: '›';
  font-size: 1rem;
  line-height: 1;
  border: none;
  vertical-align: middle;
  transition: transform var(--transition);
}

/* ── Desktop: fly-out to the right ── */
@media (min-width: 992px) {
  .dropdown-submenu > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 2px;
    display: none;
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  /* Show on hover — no JS conflict */
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }

  /* Rotate arrow when hovered */
  .dropdown-submenu:hover > .dropdown-toggle::after {
    transform: rotate(90deg);
  }

  /* Flip left if the submenu overflows off right edge */
  .dropdown-submenu.drop-left > .dropdown-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 2px;
  }
}

/* ── Mobile: accordion inline ── */
@media (max-width: 991px) {
  .navbar-nav {
    padding: 0.5rem 0 1rem;
  }

  .navbar-collapse {
    background-color: var(--navy);
  }

  /* Top-level dropdown panel — stay on navy, no white box */
  .navbar-nav .dropdown-menu {
    background-color: var(--navy) !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    width: 100%;
  }

  /* All items inside the mobile nav — white text */
  .navbar-nav .dropdown-item {
    color: rgba(255,255,255,0.88) !important;
    background-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 0.6rem 1.2rem;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item:focus {
    background-color: rgba(255,255,255,0.1) !important;
    color: var(--gold) !important;
  }

  /* Submenu panel — darker shade + gold left border */
  .dropdown-submenu > .dropdown-menu {
    position: static !important;
    display: none;
    width: 100%;
    background-color: rgba(0,0,0,0.25) !important;
    border-left: 3px solid var(--gold);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0.2rem 0;
  }

  .dropdown-submenu > .dropdown-menu.open {
    display: block;
  }

  /* Level 2 items — indent once */
  .dropdown-submenu > .dropdown-menu > li > .dropdown-item,
  .dropdown-submenu > .dropdown-menu > .dropdown-item {
    padding-left: 2rem !important;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.82) !important;
  }

  /* Level 3 items — indent twice */
  .dropdown-submenu > .dropdown-menu .dropdown-submenu > .dropdown-menu {
    background-color: rgba(0,0,0,0.35) !important;
    border-left: 3px solid rgba(245,158,11,0.5);
  }

  .dropdown-submenu > .dropdown-menu .dropdown-submenu > .dropdown-menu > li > .dropdown-item,
  .dropdown-submenu > .dropdown-menu .dropdown-submenu > .dropdown-menu > .dropdown-item {
    padding-left: 3.2rem !important;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.72) !important;
  }

  /* Rotate arrow when open */
  .dropdown-submenu.open > .dropdown-toggle::after {
    transform: rotate(90deg);
  }

  /* Divider between top-level nav items */
  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
}

/* ============================================================
   HERO SLIDESHOW
   ============================================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 320px;
  max-height: 700px;
  overflow: hidden;
  background: var(--navy-dark);
}

.slides {
  width: 100%;
  height: 100%;
}

.slides img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;    /* full image visible, no cropping */
  object-position: center;
  display: none;
  animation: slidesFadeIn 0.7s ease;
}

@keyframes slidesFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Responsive slider heights */
@media (max-width: 991px) {
  .hero-slider {
    height: 55vw;   /* proportional on tablets */
    min-height: 260px;
  }
}

@media (max-width: 576px) {
  .hero-slider {
    height: 58vw;   /* slightly taller ratio on phones */
    min-height: 220px;
  }
}


/* Prev / Next arrows */
.slide-prev,
.slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(30,58,95,0.55);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-prev:hover,
.slide-next:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

.slide-prev { left: 16px; }
.slide-next { right: 16px; }

/* Dot indicators */
.slide-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.slide-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}


/* ============================================================
   NEWS SCROLL BAR
   ============================================================ */
.news_scroll {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.news_scroll b {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   SECTION HEADINGS (shared)
   ============================================================ */
.section-heading {
  text-align: center;
  padding: 2.2rem 1rem 1.2rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 2px;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0.5rem auto 0;
}

/* ============================================================
   SCHOOL INTRO SECTION (below slider)
   ============================================================ */
.school-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  padding: 3rem 4rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.school-intro .intro-logo {
  width: 320px;
  height: auto;
  object-fit: contain;
}

.school-intro .intro-text h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.3rem;
  letter-spacing: 1px;
}

.school-intro .intro-text p {
  color: var(--gray-light);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.2rem;
}

.school-intro .intro-btn {
  display: inline-block;
  padding: 0.65rem 1.8rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.school-intro .intro-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .school-intro {
    padding: 2rem 1.2rem;
  }
  .school-intro .intro-logo {
    width: 240px;
  }
}

/* ============================================================
   SCORE BOARD
   ============================================================ */
.score-section-heading {
  text-align: center;
  background: var(--navy);
  color: var(--gold);
  padding: 1.2rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 3px;
  margin: 0;
}

.score-board {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  background: var(--bg-light);
  padding: 3rem 2rem;
}

.results-summary-container {
  width: 280px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--gold);
  background: var(--white);
  transition: transform var(--transition);
}

.results-summary-container:hover {
  transform: translateY(-6px);
}

.results-summary-container__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--white);
  position: relative;
}

.heading-tertiary {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.result-box {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.heading-primary {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.result {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

.heading-secondary {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.paragraph {
  font-size: 0.9rem;
  color: var(--gray-light);
  line-height: 1.5;
}

/* Confetti (kept, simplified) */
.confetti {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 16px;
  top: -20px;
  opacity: 0;
  animation: makeItRain 3000ms infinite linear;
}

.confetti-piece:nth-child(odd)  { background: var(--gold); }
.confetti-piece:nth-child(even) { background: #c33764; }
.confetti-piece:nth-child(3n)   { background: #b06ab3; width: 5px; height: 12px; }
.confetti-piece:nth-child(4n)   { background: #06a3da; width: 6px; height: 14px; }

.confetti-piece:nth-child(1)  { left: 5%;  animation-delay: 100ms;  animation-duration: 2200ms; }
.confetti-piece:nth-child(2)  { left: 12%; animation-delay: 300ms;  animation-duration: 2600ms; }
.confetti-piece:nth-child(3)  { left: 20%; animation-delay: 500ms;  animation-duration: 2000ms; }
.confetti-piece:nth-child(4)  { left: 28%; animation-delay: 200ms;  animation-duration: 2800ms; }
.confetti-piece:nth-child(5)  { left: 36%; animation-delay: 400ms;  animation-duration: 1800ms; }
.confetti-piece:nth-child(6)  { left: 44%; animation-delay: 150ms;  animation-duration: 2400ms; }
.confetti-piece:nth-child(7)  { left: 52%; animation-delay: 350ms;  animation-duration: 2100ms; }
.confetti-piece:nth-child(8)  { left: 60%; animation-delay: 250ms;  animation-duration: 2700ms; }
.confetti-piece:nth-child(9)  { left: 68%; animation-delay: 450ms;  animation-duration: 1900ms; }
.confetti-piece:nth-child(10) { left: 76%; animation-delay: 180ms;  animation-duration: 2300ms; }
.confetti-piece:nth-child(11) { left: 84%; animation-delay: 320ms;  animation-duration: 2050ms; }
.confetti-piece:nth-child(12) { left: 90%; animation-delay: 420ms;  animation-duration: 2500ms; }
.confetti-piece:nth-child(13) { left: 95%; animation-delay: 220ms;  animation-duration: 1950ms; }

@keyframes makeItRain {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(280px) rotate(360deg); }
}

@media (max-width: 768px) {
  .score-board {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
  }
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-section-heading {
  text-align: center;
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 1rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 3px;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  background: var(--bg-light);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.2rem 1.5rem;
  border-top: 4px solid var(--navy);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(30,58,95,0.18);
  border-top-color: var(--gold);
}

.feature-card .feature-title {
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.feature-card .feature-desc {
  color: var(--gray-light);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.feature-card .feature-btn {
  margin-top: 1.2rem;
  padding: 0.55rem 1.4rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.feature-card .feature-btn:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-year-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding-left: 0.75rem;
  margin: 1.5rem 1rem 0.75rem;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 1rem 1.5rem;
}

.gallery-item {
  position: relative;
  width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.gallery-item .gallery-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(30,58,95,0.82);
  color: var(--white);
  text-align: center;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.footer-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2.5rem;
  padding: 3rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.footer-col p,
.footer-col address {
  font-style: normal;
  line-height: 1.8;
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
}

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

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
  .footer-body {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
}

/* ============================================================
   HERO SECTION (about / content pages)
   ============================================================ */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-light);
}

.hero .hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero .icon img {
  width: 90px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}

.hero p {
  color: var(--gray-light);
  line-height: 1.75;
  font-size: 1rem;
}

.join-btn {
  margin-top: 1.2rem;
  padding: 0.7rem 2rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition);
}

.join-btn:hover {
  background: var(--gold-dark);
}

/* ============================================================
   SHARED LIGHTBOX (gallery + achievements)
   ============================================================ */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 1rem 2rem 2rem;
}

.photo-gallery img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(30,58,95,0.2);
}

/* Achievements grid — reuses gallery-grid sizing */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 1rem 2rem 2rem;
}

.ach-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ach-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(30,58,95,0.2);
}

@media (max-width: 1024px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .ach-grid { grid-template-columns: repeat(2, 1fr); padding: 1rem; } }
@media (max-width: 480px)  { .ach-grid { grid-template-columns: 1fr; } }

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden; /* keeps zoomed image clipped */
}

.lightbox.active { display: flex; }

/* Wrapper stacks placeholder + main image */
.lb-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blurred thumbnail shown while full image loads */
#lb-placeholder {
  position: absolute;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  filter: blur(18px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#lb-placeholder.visible { opacity: 1; }

/* Main full-quality image */
#lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.15s ease;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
}

#lb-img.loaded  { opacity: 1; }
#lb-img.zoomed  { cursor: grab; }

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.lb-btn:hover  { background: rgba(245,158,11,0.85); }
.lb-prev       { left: 16px; }
.lb-next       { right: 16px; }
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  border-radius: 50%;
  top: 16px;
  transform: none;
}

@media (max-width: 576px) {
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .photo-gallery img { width: 150px; height: 112px; }
}

/* ============================================================
   PROMO POPUP
   ============================================================ */
.promo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.35s ease;
}

.promo-overlay.hidden {
  display: none;
}

.promo-modal {
  position: relative;
  max-width: 780px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  animation: popIn 0.35s ease;
}

.promo-modal img {
  display: block;
  width: 100%;
  height: auto;
}

.promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--navy-dark);
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition);
  line-height: 1;
}

.promo-close:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

@keyframes popIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@media (max-width: 576px) {
  .promo-modal {
    border-radius: 10px;
  }
}

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
