:root {
  --fluid-gutter: clamp(1rem, 4vw, 2.25rem);
  --fluid-section-space: clamp(2.75rem, 7vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { width: 100%; min-width: 320px; scroll-behavior: smooth; }
body { width: 100%; min-width: 320px; max-width: 100%; overflow-x: clip; }
img, picture, video, canvas, svg, iframe { max-width: 100%; }
img, video { height: auto; }
iframe { border: 0; }

.container, .container-fluid { width: min(100% - (2 * var(--fluid-gutter)), 1200px); max-width: 100%; margin-inline: auto; }
main, section, header, footer, nav, article, aside { min-width: 0; }
main, section { scroll-margin-top: 1rem; }
h1, h2, h3, h4, h5, h6 { font-size: clamp(1.2em, 1em + 1vw, 2.6em); line-height: 1.2; overflow-wrap: anywhere; }
p, li, a, button, td, th { overflow-wrap: anywhere; }
button, input, select, textarea { max-width: 100%; font: inherit; }
input, select, textarea { min-width: 0; }

/* Let common content layouts shrink naturally instead of forcing horizontal scrolling. */
.grid-2, .grid-3, .footer-grid, .facility-grid, .gallery-grid, .stats-grid,
.facility-gallery, .steps, .dates-grid, .contact-wrapper, .contact-grid,
.about-wrapper, .message-wrapper, .features-grid, .cards-grid {
  min-width: 0;
}
.grid-2, .grid-3, .footer-grid, .facility-grid, .gallery-grid, .stats-grid,
.steps, .dates-grid, .contact-grid, .features-grid, .cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.grid-2 > *, .grid-3 > *, .footer-grid > *, .facility-grid > *, .gallery-grid > *,
.stats-grid > *, .steps > *, .dates-grid > *, .contact-grid > *, .features-grid > *, .cards-grid > * {
  min-width: 0;
}

.table-wrap, .table-responsive { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { max-width: 100%; }
pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  :root { --fluid-gutter: clamp(1rem, 3.5vw, 1.75rem); }
  .navbar { gap: 1rem; }
  .hero, .hero-slider { min-height: min(78svh, 680px); }
  .hero-content, .hero-copy { width: min(100%, 56rem); }
  section { padding-block: clamp(2.5rem, 7vw, 4rem); }
}

@media (max-width: 700px) {
  :root { --fluid-gutter: 1rem; }
  header { position: relative; inset: auto; }
  .navbar { height: auto; min-height: 0; flex-direction: column; align-items: stretch; padding-block: .75rem; }
  .logo { max-width: 100%; margin: 0; }
  .logo a { max-width: 100%; }
  .logo img { flex: 0 0 auto; width: clamp(2.5rem, 12vw, 3.5rem); height: auto; }
  .logo h2 { min-width: 0; font-size: clamp(.95rem, 4vw, 1.2rem); }
  nav { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  nav ul { width: max-content; min-width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: clamp(.85rem, 4vw, 1.4rem); padding: .35rem 0 .55rem; }
  nav li { flex: 0 0 auto; }
  nav a { white-space: nowrap; font-size: .92rem; }
  .hero, .hero-slider { min-height: 0; height: auto; }
  .hero { padding-block: clamp(3.5rem, 15vw, 6rem); margin-top: 0; }
  .hero-slider { aspect-ratio: 4 / 3; max-height: 70svh; }
  .hero h1, .hero-content .main-title { font-size: clamp(1.8rem, 8vw, 3rem); }
  .hero p { font-size: clamp(1rem, 4vw, 1.15rem); }
  .section-title { font-size: clamp(1.55rem, 6.5vw, 2.2rem); }
  .hero-buttons { flex-wrap: wrap; justify-content: center; gap: .75rem; }
  .hero-buttons .btn, .btn { max-width: 100%; }
  .btn { padding: .8rem 1.15rem; }
  .btn-outline { margin-left: 0; }
  .grid-2, .grid-3, .footer-grid, .facility-grid, .gallery-grid, .stats-grid,
  .steps, .dates-grid, .contact-grid, .features-grid, .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .message-card { padding: clamp(1rem, 5vw, 1.5rem); }
  .facility-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .facility-gallery > * { grid-column: span 1 !important; min-width: 0; }
  .footer-grid { gap: 1.5rem; }
  .footer-bottom-content { flex-wrap: wrap; gap: .75rem; }
}

@media (max-width: 420px) {
  :root { --fluid-gutter: .75rem; }
  .container, .container-fluid { width: calc(100% - 1.5rem); }
  .facility-gallery { grid-template-columns: minmax(0, 1fr); }
  .slider-arrow { width: 2.5rem; height: 2.5rem; }
  .prev-arrow { left: .5rem; }
  .next-arrow { right: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Facilities page: make cards and controls comfortable on touch screens. */
@media (max-width: 700px) {
  .page-facilities .facility-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .page-facilities .facility-gallery > .facility-card,
  .page-facilities .facility-gallery > .facility-card-large,
  .page-facilities .facility-gallery > .facility-card-wide {
    grid-column: 1 / -1 !important;
  }
  .page-facilities .facility-image-btn,
  .page-facilities .facility-card-large .facility-image-btn {
    aspect-ratio: 16 / 10;
  }
  .page-facilities .facility-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .25rem .1rem .75rem;
    margin-bottom: 1.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .page-facilities .facility-filter {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .page-facilities .facility-card-content { padding: 1rem 1.1rem 1.2rem; }
  .page-facilities .facility-card-content h3 { font-size: clamp(1.08rem, 5vw, 1.3rem); }
  .page-facilities .facility-card:hover { transform: none; }
  .page-facilities .facility-note-inner { align-items: flex-start; }
  .page-facilities .facility-lightbox { padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
  .page-facilities .lightbox-content { width: 100%; max-height: 84svh; }
  .page-facilities .lightbox-content img { max-height: 72svh; }
  .page-facilities .lightbox-close { top: max(.75rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); }
}

/* Shared site chrome: keep the header and footer consistent on every page. */
header {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  background: #fff !important;
  box-shadow: 0 3px 18px rgba(16, 65, 100, .08) !important;
  z-index: 50 !important;
}
.navbar {
  width: min(100% - (2 * var(--fluid-gutter)), 1200px) !important;
  min-height: 82px !important;
  height: auto !important;
  margin-inline: auto !important;
  padding-block: .65rem !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: clamp(.75rem, 2.5vw, 2rem) !important;
}
.logo { margin: 0 !important; flex: 0 1 auto; }
.logo > a {
  display: flex !important;
  align-items: center !important;
  gap: .65rem !important;
  text-decoration: none !important;
}
.logo img { width: 54px !important; height: 54px !important; object-fit: contain; }
.logo h2 { max-width: 260px; color: #123f6e !important; font-size: clamp(.95rem, 1.4vw, 1.15rem) !important; line-height: 1.2; }
header nav { width: auto; max-width: 100%; }
header nav ul {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: clamp(.75rem, 1.7vw, 1.4rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem 0 !important;
  color: #234d70 !important;
  font-size: clamp(.82rem, 1vw, .94rem) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
header nav a:hover, header nav a.active { color: #1477d4 !important; }
header nav a.active::after { background: #f28b22 !important; }

.site-footer {
  margin: 0 !important;
  padding: 2.75rem 0 0 !important;
  background: #07366c !important;
  color: #d9e7f5 !important;
  font-size: .95rem;
}
.site-footer .footer-grid {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr 1.2fr !important;
  gap: clamp(1.25rem, 4vw, 3rem) !important;
  padding-bottom: 2rem !important;
}
.site-footer .footer-title, .site-footer .footer-col h3 {
  margin: 0 0 1rem !important;
  color: #fff !important;
  font-size: 1.1rem !important;
}
.site-footer .footer-col p, .site-footer .footer-col a {
  color: #d9e7f5 !important;
  line-height: 1.7;
}
.site-footer .footer-col ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-col li + li { margin-top: .35rem; }
.site-footer .footer-col a:hover { color: #ffd75a !important; }
.site-footer .footer-contact i { color: #ffd75a !important; margin-right: .35rem; }
.site-footer .footer-bottom {
  margin: 0 !important;
  padding: 1rem 0 !important;
  background: #052b56 !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
  text-align: left;
}
.site-footer .footer-bottom-content {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.site-footer .footer-bottom p { margin: 0 !important; color: #cfe0ef !important; }
.site-footer .designer-credit span { color: #fff !important; }

@media (max-width: 1000px) {
  .navbar { flex-wrap: wrap !important; justify-content: center !important; }
  header nav { width: 100%; }
  header nav ul { justify-content: center !important; flex-wrap: wrap !important; }
}
@media (max-width: 700px) {
  .navbar { align-items: stretch !important; flex-direction: column !important; gap: .45rem !important; }
  .logo > a { justify-content: flex-start; }
  header nav { overflow-x: auto; }
  header nav ul { width: max-content; min-width: 100%; justify-content: flex-start !important; flex-wrap: nowrap !important; }
  .site-footer .footer-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 1.5rem !important; }
  .site-footer .footer-bottom-content { flex-direction: column; text-align: center; }
  body.page-index { padding-top: 0 !important; }
}
.site-footer .footer-social-links {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer .footer-social-links li { margin: 0 !important; }
.site-footer .footer-social-links a {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 42px;
  text-decoration: none;
}
.site-footer .footer-social-links i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  color: #fff !important;
  font-size: 1rem;
  transition: background-color .2s ease, transform .2s ease;
}
.site-footer .footer-social-links a:hover i,
.site-footer .footer-social-links a:focus-visible i {
  background: #1477d4;
  transform: translateY(-2px);
}
.site-footer .footer-social-links small { display: block; color: #cfe0ef; font-size: .78rem; }
