:root {
  --gap: 12px;
  --thumb-h: 64px;
  --white: #ffffff;
  --orange: #f79320;
  --red: #bd202e;
  --muted: #f5f5f6;
  --text: #1a1a1a;
  --gap: 12px;
  --radius: 10px;
  --overlay: rgba(0, 0, 0, 0.6);
  --accent: var(--orange);
  --glass: rgba(255, 255, 255, 0.7);
}

.custom-header {
  position: relative;
  z-index: 9999; /* top header highest */
}

.font-30 {
  font-size: 30px !important;
}

.foholic-fixed-sidebar {
  position: fixed;
  z-index: 5000; /* sidebar below header */
  top: 0;
  left: 0;
}

.mt-50 {
  margin-top: 50px !important;
}

.menu-text {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

.custom-header {
  background: #fff;
}

.custom-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.school-logo {
  height: 85px;
  object-fit: contain;
}

.divider {
  width: 1px;
  height: 50px;
  background: #ccc;
}

.btn-warning {
  background-color: #ffd900;
  border: none;
  color: #000;
  font-size: 14px;
  letter-spacing: 1px;
}

.pr-0 {
  padding-right: 0 !important;
}
.btn-apply-tour {
  background: #f79320;
  color: #000;
  border: 0;
  padding: 12px 26px;
  font-weight: 700 !important;
  text-transform: uppercase;
  border-radius: 0;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  font-family: "popins-bold", sans-serif;
}

.mtr-50 {
  margin-top: -50px;
}

/* Overlay Menu */
.menu-overlay {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 90%;
  background: #f9f9f9;
  color: #000;
  transition: top 0.5s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.menu-overlay.active {
  top: 105px;
}

/* Content Grid */
.menu-content {
  display: grid;
  grid-template-columns: 0.4fr 0.2fr 0.4fr;
  padding: 14px 2px 0px 80px;
  gap: 20px;
}

.menu-section h3 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 15px;
  font-family: "worksans", sans-serif;
  color: #7f2730;
}

.font-worksans {
  font-family: "worksans", sans-serif;
}

.menu-section p,
.menu-section a {
  font-size: 16px;
  line-height: 1.2;
  color: #333;
  text-decoration: none;
  display: inline-block;
  /* important for scale transform */
  transition: transform 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

.menu-section a:hover {
  transform: scale(1.1);
  color: #5a5858;
  font-weight: 600;
}

/* Admissions Right Box */
.admissions {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.admissions img {
  width: 100%;
}

.admissions h3 {
  font-size: 26px;
  font-weight: bold;
  color: #7f2730;
}

.admissions p {
  font-size: 16px;
  line-height: 1.3;
}

/* Bottom Buttons */
.menu-buttons {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px;
  border-top: 1px solid #ddd;
}

.menu-buttons a {
  padding: 15px 40px;
  background: #222;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.3s;
}

.menu-buttons a:hover {
  background: #5a5858;
}

.admissions {
  width: 100%;
}

.admissions img {
  width: 100%;
  display: block;
  border-radius: 10px;
  margin-top: -50px;
}

.admissions-text {
  color: #222;
  top: 0;
}

.menu-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-section li {
  margin-bottom: 8px;
}

.menuclose-btn {
  background-color: red;
  color: white;
  border: none;
  border-radius: 0 !important;
  padding: 0 20px;
}

.custom-header {
  background: #fff;
}

.line {
  border-bottom: 2px solid #e0e0e0;
}

.school-logo {
  height: 90px;
  object-fit: contain;
  padding: 10px;
}

/* --- SEARCH UI STYLES --- */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* search box collapsed (only button visible) */
.search-box {
  display: flex;
  align-items: center;
  width: 44px;
  /* collapsed width (show only button) */
  transition: width 260ms ease, box-shadow 260ms ease;
  background: #fff;
  border-radius: 26px;
  border: 1px solid #ddd;
  overflow: hidden;
  height: 40px;
}

/* expanded state */
.search-box.active {
  width: 260px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* input */
#site-search {
  flex: 1;
  border: 0;
  outline: none;
  padding: 8px 10px;
  min-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
  font-size: 14px;
}

/* show input when active */
.search-box.active #site-search {
  opacity: 1;
  transform: translateX(0);
}

/* button */
#search-btn {
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  color: #333;
}

/* suggestions box */
.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 50;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.suggestion {
  padding: 10px 12px;
  cursor: pointer;
}

.suggestion small {
  display: block;
  color: #666;
  margin-top: 4px;
  font-size: 12px;
}

.suggestion:hover,
.suggestion.active {
  background: #f3f3f3;
}

.hidden {
  display: none;
}

/* small responsive tweak */
@media (max-width: 420px) {
  .search-box.active {
    width: calc(100% - 16px);
  }
}

.margin-left-20 {
  margin-left: -20px;
}

.menu-section-menus {
  font-size: 36;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu-section-menus ul {
  list-style: none;
  padding: 0;
}

.menu-section-menus ul li {
  margin: 0;
  padding: 6px 10px;
  border-bottom: 2px solid #e9e9e9;
  text-decoration: none;
  background-color: #f9f9f9;
  align-items: center;
}

.menu-section-menus ul li a {
  text-decoration: none;
  font-size: 26px;
  font-family: "worksans", sans-serif;
  color: #7f2730;
  font-weight: bold;
  transition: transform 0.3s ease, color 0.3s ease, font-size 0.3s ease;
  display: inline-block;
}

.menu-section-menus a:hover {
  transform: scale(1.1);
  color: #f79320;
  font-weight: 600;
}

/* --- General text / headings --- */
.section-title {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.subtitle-text {
  color: #555;
  margin-bottom: 18px;
}

.tab[aria-selected="true"] {
  background: linear-gradient(90deg, var(--red), var(--orange));
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(189, 32, 46, 0.12);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 30px 10px;
  justify-content: center;
}

.tab {
  border: 0;
  background: #a5a5a5;
  padding: 12px 24px;
  border-radius: 0px;
  cursor: pointer;
}

/* --- Gallery grid (3 / 2 / 1 columns) --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
}

.ms-3 {
  margin-left: 1rem !important;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* --- Gallery item: skeleton + fixed height to avoid layout shift --- */
.gallery-item {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, #f4f4f4, #f0f0f0);
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gallery-item .img-wrap {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.28s ease-in-out;
  backface-visibility: hidden;
}

.gallery-item img.loaded {
  opacity: 1;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1200;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 1100px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px;
  background: #000;
}

.viewer img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  opacity: 0;
  transition: opacity 0.28s;
}

.viewer img.loaded {
  opacity: 1;
}

/* Controls */
.control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.prev {
  left: 6px;
}

.next {
  right: 6px;
}

/* Close */
.close-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #fff;
  border: 0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* Thumbnails */
.thumbs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 10px;
  background: #fafafa;
}

.thumbs button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.8;
}

.thumbs img {
  height: var(--thumb-h);
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

/* Caption overlay */
.caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}

/* Responsive tweak for viewer image height */
@media (max-width: 600px) {
  .viewer img {
    max-height: 50vh;
  }
}

/* --- Gallery grid (3 / 2 / 1 columns) --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: stretch;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* --- Gallery item: equal size for all --- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f2f2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  aspect-ratio: 4 / 3;
  /* Keeps all items same proportion */
  cursor: pointer;
}

/* --- Image always fills the box --- */
.gallery-item .img-wrap {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keeps all images equal and cropped nicely */
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  backface-visibility: hidden;
}

.gallery-item img.loaded {
  opacity: 1;
}

/* ===== Replace current .thumbs rules with these ===== */
.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  /* prevent vertical scroll */
  padding: 10px;
  background: #fafafa;
  align-items: center;
  /* vertically center thumbnails */
  white-space: nowrap;
  /* keep row on single line */
  -webkit-overflow-scrolling: touch;
}

/* make each thumb button a fixed-size box that won't shrink */
.thumbs button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  /* IMPORTANT: prevents shrinking */
  width: calc(var(--thumb-h) * 1.6);
  /* thumbnail width relative to height; change as needed */
  height: var(--thumb-h);
  box-sizing: border-box;
  border-radius: 6px;
  overflow: hidden;
}

/* thumbnail image fills the button box and is cropped cleanly */
.thumbs img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.bg-dark-green {
  background-color: #0f4221 !important;
}

.bg-SafetyOrange {
  background-color: #f79320 !important;
}

.menuclose-btn {
  background-color: #7f2730 !important;
  color: white;
  border: none;
  border-radius: 0 !important;
  padding: 0 20px;
}
