/* ================================================================
   GLOBAL READABLE TEXT
   ================================================================ */
body { font-size:16px; line-height:1.8; color:#1a2535; -webkit-font-smoothing:antialiased; }
p, li { font-size:1rem; line-height:1.85; color:#2d3a4a; }
p { text-align:justify; hyphens:auto; }
h1,h2,h3,h4 { line-height:1.25; color:#0a2154; letter-spacing:-.01em; }
.about-intro-text p, .detail-article-body p, .ep-block-desc,
.epd-article-body, .fac-block-desc, .card-excerpt,
.mv-quote-text, .contact-text span { font-size:.97rem; line-height:1.85; text-align:justify; hyphens:auto; color:#374151; }
.card-meta, .ep-block-date, .ev-list-time, .evp-up-time,
.ann-card-school, small, .td-date { font-size:.8rem; line-height:1.6; color:#5a7090; }
.data-table td { font-size:.87rem; line-height:1.55; color:#2d3a4a; }
.form-label { font-size:.87rem; font-weight:700; color:#0a2154; }
.btn { font-size:.85rem; font-weight:700; letter-spacing:.02em; }

/* ==================================================== */

/* ================================================================
   FACILITIES PAGE — Styles
   ================================================================ */

/* Page header */
.fac-page-header {
  background: linear-gradient(135deg, var(--navy, #0d1b2a) 0%, #1a2f4a 100%);
  padding: 3.5rem 0 2.8rem;
  position: relative;
  overflow: hidden;
}
.fac-page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(232,160,32,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* Section */
.fac-section {
  background: #f3f5f8;
  padding: 3.5rem 0 5rem;
}

/* ── Facility Block ── */
.fac-block {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(13,27,42,0.08);
  margin-bottom: 3rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.fac-block:hover {
  box-shadow: 0 10px 48px rgba(13,27,42,0.14);
  transform: translateY(-3px);
}

/* Block header */
.fac-block-header {
  padding: 1.6rem 2rem 1.4rem;
  margin: 1.5rem 1.5rem 0;
  border-radius: 2px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.fac-block-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--navy, #0d1b2a);
  line-height: 1.25;
  margin: 0 0 0.25rem;
}
.fac-block-desc {
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify;
  hyphens: auto;
  text-indent: 2em;
}

/* ── Image Gallery Grid — Adaptive Layouts ── */
.fac-gallery {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* No image */
.fac-no-image {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2eaf3 100%);
  border-radius: 12px;
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  opacity: 0.3;
  margin: 0 1.5rem 1.5rem;
}

/* Layout: 1 image — full width */
.fac-layout-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.fac-layout-1 .fac-img-item {
  height: 440px;
}

/* Layout: 2 images — side by side */
.fac-layout-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fac-layout-2 .fac-img-item {
  height: 300px;
}

/* Layout: 3 images — 1 big + 2 stacked right */
.fac-layout-3 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 360px;
}
.fac-layout-3 .fac-img-item:first-child {
  grid-row: 1 / 3;
  height: 100%;
}
.fac-layout-3 .fac-img-item {
  height: 100%;
}

/* Layout: 4 images — 2x2 grid */
.fac-layout-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 480px;
}
.fac-layout-4 .fac-img-item {
  height: 100%;
}

/* Layout: 5 images — 1 big top + 4 bottom strip */
.fac-layout-5 {
  display: grid;
  grid-template-rows: 280px 180px;
  gap: 8px;
}
.fac-layout-5-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 8px;
}
.fac-layout-5-top .fac-img-item {
  height: 280px;
}
.fac-layout-5-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fac-layout-5-bottom .fac-img-item {
  height: 180px;
}

/* Layout: 6+ images — clean 3-col uniform grid */
.fac-layout-many {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fac-layout-many .fac-img-item {
  height: 200px;
}
/* First image spans full width */
.fac-layout-many .fac-img-item:first-child {
  grid-column: 1 / 4;
  height: 320px;
}
/* Second and third side by side */
.fac-layout-many .fac-img-item:nth-child(2),
.fac-layout-many .fac-img-item:nth-child(3) {
  height: 220px;
}
/* More badge fix */
.fac-more-badge {
  position: absolute; inset: 0;
  background: rgba(13,27,42,0.70);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
  font-size: 1.6rem; border-radius: 10px;
  gap: 4px; backdrop-filter: blur(2px);
  cursor: pointer;
}
.fac-more-badge small {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  opacity: .85;
}

/* Individual image item */
.fac-img-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #e2eaf3;
  cursor: pointer;
}
.fac-img-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fac-img-item:hover img {
  transform: scale(1.05);
}

/* Image overlay on hover */
.fac-img-overlay {
  position: absolute; inset: 0;
  background: rgba(13,27,42,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.fac-img-item:hover .fac-img-overlay {
  background: rgba(13,27,42,0.35);
}
/* "More photos" badge on last item when > 5 */
.fac-more-badge {
  position: absolute; inset: 0;
  background: rgba(13,27,42,0.65);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  border-radius: 10px;
  gap: 4px;
  backdrop-filter: blur(2px);
}
.fac-more-badge small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.8;
  text-transform: uppercase;
}

/* ── See more toggle ── */
.fac-desc-wrap { position: relative; }
.fac-see-more {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-weight: 700;
  color: var(--navy, #0d1b2a);
  cursor: pointer;
  transition: opacity .15s;
}
.fac-see-more:hover { opacity: .65; }
.fac-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #9ca3af;
}

.fac-empty h3 { font-family: var(--font-display); color: var(--navy); margin-bottom: 0.5rem; }

/* ── Lightbox ── */
#facLightbox {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,10,20,0.94);
  backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: lbFadeIn 0.25s ease;
}
#facLightbox.open { display: flex; }

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}

.lb-img-wrap {
  width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
}
.lb-img-wrap img {
  max-width: 100%; max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  animation: lbImgIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes lbImgIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.lb-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-align: center;
  max-width: 600px;
}

.lb-counter {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lb-close {
  position: absolute; top: -0.25rem; right: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.lb-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 10;
}
.lb-nav:hover { background: rgba(255,255,255,0.2); color: #fff; }
.lb-prev { left: -58px; }
.lb-next { right: -58px; }

@media (max-width: 900px) {
  .lb-prev { left: 0; top: auto; bottom: -3.5rem; transform: none; }
  .lb-next { right: 0; top: auto; bottom: -3.5rem; transform: none; }
  .lb-inner { padding-bottom: 4rem; }

  .fac-layout-3 { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .fac-layout-3 .fac-img-item:first-child { grid-row: auto; height: 260px; }
  .fac-layout-3 .fac-img-item { height: 180px; }

  .fac-layout-4 { grid-template-columns: 1fr 1fr; height: auto; }
  .fac-layout-4 .fac-img-item { height: 160px; }

  .fac-layout-5-top { grid-template-columns: 1fr; }
  .fac-layout-5-top .fac-img-item { height: 200px; }
  .fac-layout-5-bottom { grid-template-columns: 1fr 1fr; }

  .fac-layout-many { grid-template-columns: 1fr 1fr; }
  .fac-layout-many .fac-img-item:first-child { grid-column: 1 / 3; }

  .lb-nav { display: none; }
}

@media (max-width: 600px) {
  .fac-layout-2, .fac-layout-5-bottom { grid-template-columns: 1fr; }
  .fac-layout-2 .fac-img-item, .fac-layout-5-bottom .fac-img-item { height: 220px; }
  .fac-layout-1 .fac-img-item { height: 260px; }

  /* ── Block header: stack title/desc on top, button below ── */
  .fac-block-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    padding: 1rem 1rem 0.75rem;
    margin: 1rem 1rem 0;
  }
  .fac-block-header > a {
    margin-left: 0 !important;
    align-self: flex-start !important;
    width: 100%;
    justify-content: center !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  /* ── Description: no indent, no justify — clean left-aligned ── */
  .fac-block-desc {
    font-size: 0.85rem;
    text-align: left !important;
    hyphens: none !important;
    text-indent: 0 !important;
    color: #4b5563;
    line-height: 1.65;
  }
  .fac-block-desc.is-clamped { -webkit-line-clamp: 3; }

  /* ── Title ── */
  .fac-block-title {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
}

/* ==================================================== */

/* ================================================================
   WAVE PAGE HERO
   ================================================================ */
.page-hero {
  position: relative;
  background: linear-gradient(160deg, #0a1628 0%, #0d1f3c 55%, #071020 100%);
  padding: calc(0rem + 70px) 0 0;
  overflow: hidden;
  z-index: 0;
}
.page-hero-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none; opacity: 0.18; z-index: 0;
}
.page-hero-glow {
  position: absolute; top: -60px; right: -80px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.page-hero-inner { position: relative; z-index: 2; padding-bottom: 1rem; }
.page-hero-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: rgba(255,255,255,.45);
  margin-bottom: 1.1rem;
}
.page-hero-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.page-hero-breadcrumb a:hover { color: #fff; }
.page-hero-breadcrumb span { color: rgba(255,255,255,.28); }
.page-hero-title {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: .6rem;
  text-shadow: 0 2px 24px rgba(0,0,80,.3);
}
.page-hero-sub {
  font-size: 1rem; color: rgba(255,255,255,.65);
  max-width: 520px; line-height: 1.65;
}
.page-hero-wave { position: relative; z-index: 1; display: block; margin-bottom: -2px; line-height: 0; }
.page-hero-wave svg { display: block; width: 100%; height: 45px; }