/* ==========================================================================
   Velammal Residential School — custom design system
   Layered on top of self-hosted Bootstrap 5. Keep this file lean; it ships
   on every public page load.
   ========================================================================== */

:root {
  --primary: #0b3d78;
  --primary-dark: #082a54;
  --primary-light: #1a5aa8;
  --accent: #f2a93b;
  --accent-dark: #d98f1f;
  --emerald: #16875a;
  --ink: #16233a;
  --muted: #5b6b82;
  --bg-soft: #f5f8fc;
  --tint-cream: #fdf6ea;
  --tint-blue: #eef3fb;
  --tint-mint: #ebf8f2;
  --tint-gray: #f2f4f7;
  --card-radius: 1rem;
  --shadow-sm: 0 2px 10px rgba(11, 61, 120, 0.08);
  --shadow-md: 0 10px 30px rgba(11, 61, 120, 0.12);
  --shadow-lg: 0 20px 50px rgba(11, 61, 120, 0.18);
  --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Bootstrap's .container padding (0.75rem) is smaller than a .g-5 row's
   negative gutter margin (1.5rem), which bleeds content past the container
   edge on narrow screens where .container has no max-width to absorb it. */
@media (max-width: 767.98px) {
  .row.g-5, .row.g-4 { --bs-gutter-x: 1.5rem; }
}

/* Justified body copy across page content — DB-driven page sections,
   disclosure info panels, and the longer hardcoded homepage paragraphs. */
.content-body p,
.accordion-body p,
.text-justify {
  text-align: justify;
  text-justify: inter-word;
}

body {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

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

.text-primary-custom { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.bg-soft { background: var(--bg-soft); }
.bg-tint-cream { background: var(--tint-cream); }
.bg-tint-blue { background: var(--tint-blue); }
.bg-tint-mint { background: var(--tint-mint); }
.bg-tint-gray { background: var(--tint-gray); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-accent:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: #fff; }

.btn-outline-light-custom {
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  padding: .7rem 1.7rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(6px);
}
.btn-outline-light-custom:hover { background: #fff; color: var(--primary); }

/* ---------- Top utility bar + navbar ---------- */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  padding: .5rem 0;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--accent); }
.topbar-info { gap: 1.5rem; }
.topbar-info li { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.topbar-info li i { color: var(--accent); font-size: .9rem; }
.topbar-disclosure {
  display: inline-flex; align-items: center;
  background: rgba(242,169,59,.15);
  border: 1px solid rgba(242,169,59,.4);
  color: var(--accent) !important;
  font-weight: 600;
  font-size: .8rem;
  padding: .3rem .9rem;
  border-radius: 50px;
  white-space: nowrap;
  transition: var(--transition);
}
.topbar-disclosure:hover { background: var(--accent); color: #fff !important; }
.topbar-divider { width: 1px; height: 18px; background: rgba(255,255,255,.2); margin: 0 1rem; }

@media (max-width: 767.98px) {
  .topbar { font-size: .7rem; padding: .35rem 0; }
  .topbar-info { gap: .9rem; row-gap: .25rem; }
  .topbar-info li i { font-size: .8rem; }
}

.navbar-main {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: padding var(--transition), box-shadow var(--transition);
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: .5rem 0;
}
.navbar-main.scrolled { padding: .2rem 0; box-shadow: var(--shadow-md); }

.navbar-main .container { flex-wrap: nowrap; }
.navbar-brand { display: flex; align-items: center; gap: .7rem; padding: .25rem 0; min-width: 0; flex: 1 1 auto; }
.navbar-toggler { flex-shrink: 0; }
.brand-logo {
  height: 56px; width: auto; object-fit: contain;
  transition: height var(--transition);
  flex-shrink: 0;
}
.navbar-main.scrolled .brand-logo { height: 42px; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; min-width: 0; }
.brand-title {
  font-size: 1.02rem; font-weight: 800; color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.brand-sub-line {
  display: none;
  font-size: .58rem; font-weight: 600; letter-spacing: 0;
  line-height: 1.3;
  white-space: normal;
  max-width: 460px;
}
.brand-sub-line.affiliation { color: var(--accent-dark); }
.brand-sub-line.unit { color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }
@media (min-width: 1200px) {
  .navbar-main .nav-link { padding: .6rem .7rem !important; }
  .brand-sub-line { display: block; }
  .navbar-main.scrolled .brand-sub-line { display: none; }
}
@media (min-width: 1450px) {
  .navbar-main .nav-link { padding: .6rem 1rem !important; }
}
@media (max-width: 767.98px) {
  .brand-title {
    font-size: .78rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
  }
  .brand-logo { height: 44px; }
  .brand-sub-line.unit {
    display: block;
    font-size: .56rem;
    white-space: normal;
    max-width: 100%;
  }
}

.navbar-main .nav-link {
  color: var(--ink) !important;
  font-weight: 600;
  font-size: .95rem;
  padding: .6rem 1rem !important;
  position: relative;
}
.navbar-main .nav-link::after {
  content: '';
  position: absolute;
  left: 1rem; right: 1rem; bottom: .3rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after { transform: scaleX(1); }
.navbar-main .nav-link.active { color: var(--primary) !important; }
.navbar-main .dropdown-toggle::after { vertical-align: 1px; margin-left: .35rem; transition: transform var(--transition); }
.navbar-main .dropdown-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.navbar-main .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: .75rem;
  padding: .5rem;
  margin-top: .5rem;
  animation: dropdownFade .2s ease;
}
.navbar-main .dropdown-item {
  display: flex; align-items: center; gap: .6rem;
  border-radius: .5rem;
  padding: .55rem .8rem;
  font-weight: 500;
  font-size: .9rem;
  color: var(--ink);
}
.navbar-main .dropdown-item i { color: var(--primary-light); font-size: 1rem; width: 1.1rem; }
.navbar-main .dropdown-item:hover,
.navbar-main .dropdown-item:focus { background: var(--bg-soft); color: var(--primary); }
.navbar-main .dropdown-item:hover i { color: var(--accent-dark); }
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 992px) {
  .navbar-main .nav-item.dropdown:hover > .dropdown-menu { display: block; }
}

/* ---------- Mobile slide-in nav (offcanvas) ---------- */
.offcanvas.mobile-nav { width: 300px; max-width: 85vw; }
.offcanvas.mobile-nav .offcanvas-header {
  border-bottom: 1px solid rgba(11,61,120,.08);
  padding: 1rem 1.1rem;
}
.offcanvas.mobile-nav .offcanvas-header .navbar-brand { gap: .6rem; }
.offcanvas.mobile-nav .offcanvas-header .brand-logo { height: 42px; }
.offcanvas.mobile-nav .offcanvas-header .brand-title {
  font-size: .85rem;
  white-space: normal;
  overflow: visible;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}
.offcanvas.mobile-nav .offcanvas-body { padding: .75rem .85rem 1.5rem; }

.mobile-nav-list { display: flex; flex-direction: column; gap: .15rem; }
.mobile-nav-list .nav-link,
.mobile-nav-list .mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink) !important;
  font-weight: 600;
  font-size: .98rem;
  padding: .75rem .6rem !important;
  border-radius: .5rem;
}
.mobile-nav-list .nav-link.active,
.mobile-nav-list .mobile-dropdown-toggle.active { color: var(--primary) !important; background: var(--bg-soft); }
.mobile-dropdown-toggle .bi-chevron-down { transition: transform .25s ease; font-size: .78rem; color: var(--muted); }
.mobile-dropdown-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

.mobile-submenu {
  list-style: none;
  padding-left: .75rem;
  margin: .1rem 0 .35rem;
  border-left: 2px solid rgba(11,61,120,.1);
}
.mobile-submenu li a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: .4rem;
}
.mobile-submenu li a i { color: var(--primary-light); font-size: .95rem; width: 1.1rem; }
.mobile-submenu li a:hover,
.mobile-submenu li a:focus { background: var(--bg-soft); color: var(--primary); }

/* ---------- Homepage notice ticker (scrolling news strip) ---------- */
.notice-ticker {
  display: flex;
  align-items: stretch;
  background: var(--primary-dark);
  position: relative;
  z-index: 5;
  overflow: hidden;
}
.notice-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent);
  color: #1a1300;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .55rem 1.6rem .55rem 1.1rem;
  white-space: nowrap;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}
.notice-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.notice-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: noticeScroll 32s linear infinite;
}
.notice-ticker:hover .notice-track { animation-play-state: paused; }
.notice-item {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: .6rem 0;
  font-size: .85rem;
  font-weight: 500;
  transition: color var(--transition);
}
.notice-item:hover { color: var(--accent); }
.notice-item .notice-date { color: rgba(255,255,255,.55); font-size: .74rem; }
.notice-sep { color: rgba(255,255,255,.3); margin: 0 1.25rem; flex-shrink: 0; }
@keyframes noticeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-track { animation: none; }
  .notice-track-wrap { overflow-x: auto; }
}
@media (max-width: 575.98px) {
  .notice-label { font-size: .7rem; padding: .5rem 1.2rem .5rem .8rem; }
  .notice-item { font-size: .78rem; }
}

/* ---------- Hero (boxed, alternating image) ---------- */
.hero-boxed {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(160deg, var(--tint-cream) 0%, #fff 50%, var(--tint-cream) 100%);
}
.hero-boxed::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 15%, rgba(11,61,120,.05), transparent 40%),
                     radial-gradient(circle at 85% 80%, rgba(242,169,59,.14), transparent 45%);
  pointer-events: none;
}
.hero-boxed .dotted-arrow { position: absolute; pointer-events: none; opacity: .35; z-index: 1; }

.hero-track-wrap { position: relative; z-index: 2; overflow: hidden; }
.hero-track {
  display: flex;
  transition: transform 1.2s cubic-bezier(.65,0,.35,1);
  will-change: transform;
}
.hero-slide-row { flex: 0 0 100%; min-width: 0; }

.hero-slide-row .hero-text-col > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.hero-slide-row.active .hero-text-col > * { opacity: 1; transform: none; }
.hero-slide-row .hero-text-col > *:nth-child(1) { transition-delay: .15s; }
.hero-slide-row .hero-text-col > *:nth-child(2) { transition-delay: .3s; }
.hero-slide-row .hero-text-col > *:nth-child(3) { transition-delay: .45s; }
.hero-slide-row .hero-text-col > *:nth-child(4) { transition-delay: .6s; }

/* Image enters from the side the slide is flipped toward — a distinct,
   later-timed "slide in" separate from the text column's fade-up stagger. */
.hero-slide-row .hero-image-col .blob-frame {
  opacity: 0;
  transform: translateX(70px) scale(.96);
  transition: opacity .7s ease .5s, transform .7s cubic-bezier(.34,1.56,.64,1) .5s;
}
.hero-slide-row.flip .hero-image-col .blob-frame { transform: translateX(-70px) scale(.96); }
.hero-slide-row.active .hero-image-col .blob-frame { opacity: 1; transform: none; }

@media (min-width: 992px) {
  .hero-slide-row.flip .hero-image-col { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { transition: none; }
  .hero-slide-row .hero-text-col > *, .hero-slide-row .hero-image-col .blob-frame { transition: none; opacity: 1; transform: none; }
}

.hero-text-col .eyebrow {
  display: inline-block;
  background: rgba(11,61,120,.08);
  border: 1px solid rgba(11,61,120,.15);
  color: var(--primary);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-text-col h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.12;
  color: var(--primary-dark);
  margin-bottom: 1.1rem;
}
.hero-text-col p { font-size: 1.1rem; color: var(--muted); max-width: 560px; }

.hero-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; position: relative; z-index: 2; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: rgba(11,61,120,.2);
  cursor: pointer; transition: var(--transition);
}
.hero-dots button.active { background: var(--accent); width: 28px; border-radius: 6px; }

.btn-outline-primary-custom {
  border: 2px solid rgba(11,61,120,.25);
  color: var(--primary);
  padding: .7rem 1.7rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  background: transparent;
}
.btn-outline-primary-custom:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.hero-image-col { position: relative; }

@media (max-width: 991.98px) {
  .hero-image-col .blob-frame { margin-top: 2rem; }
}

/* ---------- Hero bouncing vector accents ---------- */
.hero-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hero-shape {
  position: absolute;
  color: rgba(11,61,120,.14);
  animation: heroBounce ease-in-out infinite;
}
.hero-shape.accent { color: rgba(242,169,59,.55); }
.hero-shape.mint { color: rgba(22,135,90,.4); }
.hero-shape.s1 { top: 14%; left: 6%; font-size: 3.2rem; animation-duration: 6s; }
.hero-shape.s2 { top: 68%; left: 12%; font-size: 2.2rem; animation: heroBounceX ease-in-out infinite; animation-duration: 5s; animation-delay: .4s; }
.hero-shape.s3 { top: 22%; right: 10%; font-size: 2.6rem; animation-duration: 7s; animation-delay: .8s; }
.hero-shape.s4 { top: 60%; right: 18%; font-size: 3.6rem; animation: heroBounceX ease-in-out infinite; animation-duration: 5.5s; animation-delay: .2s; }
.hero-shape.s5 { top: 40%; left: 46%; font-size: 1.8rem; animation-duration: 4.5s; animation-delay: 1s; }
.hero-shape.s6 { bottom: 10%; right: 42%; font-size: 2.4rem; animation-duration: 6.5s; animation-delay: .6s; }
.hero-shape.s7 { top: 8%; left: 42%; font-size: 1.6rem; animation: heroBounceX ease-in-out infinite; animation-duration: 6.2s; animation-delay: .3s; }
.hero-shape.s8 { bottom: 22%; left: 4%; font-size: 2rem; animation-duration: 5.8s; animation-delay: 1.2s; }
@keyframes heroBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(6deg); }
}
@keyframes heroBounceX {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(18px) rotate(-8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-shape { animation: none; }
}
@media (max-width: 767.98px) {
  .hero-shape.s7, .hero-shape.s8 { display: none; }
}

.cloud-shape { animation: cloudDrift ease-in-out infinite; }
.cloud-shape.c1 { width: 190px; height: 114px; top: 8%; left: 18%; animation-duration: 9s; color: rgba(11,61,120,.16); }
.cloud-shape.c2 { width: 140px; height: 84px; top: 70%; right: 18%; animation-duration: 7.5s; animation-delay: .8s; color: rgba(242,169,59,.28); }
.cloud-shape.c3 { width: 110px; height: 66px; top: 42%; left: 1%; animation-duration: 8.5s; animation-delay: .4s; color: rgba(22,135,90,.2); }
.cloud-shape.c4 { width: 160px; height: 96px; top: 14%; right: 6%; animation-duration: 8s; animation-delay: .6s; color: rgba(11,61,120,.14); }
@keyframes cloudDrift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(16px) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) { .cloud-shape { animation: none; } }
@media (max-width: 767.98px) {
  .cloud-shape.c1 { width: 120px; height: 72px; }
  .cloud-shape.c3, .cloud-shape.c4 { display: none; }
}
@media (max-width: 767.98px) {
  .hero-shape.s5, .hero-shape.s6 { display: none; }
}

/* ---------- Section titles ---------- */
.section-title { margin-bottom: 3rem; }
.section-title .eyebrow {
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
}
.section-title h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--primary-dark); }
.section-title .underline {
  width: 70px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  margin: 1rem auto 0;
}
.section-title.text-start .underline { margin: 1rem 0 0; }

/* ---------- Cards ---------- */
.glass-card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  border: 1px solid rgba(11,61,120,.06);
}
.glass-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.feature-card { padding: 2rem 1.75rem; text-align: center; height: 100%; }
.feature-card .icon-wrap {
  width: 70px; height: 70px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  color: #fff; font-size: 1.8rem;
  transition: transform var(--transition);
}
.feature-card:hover .icon-wrap { transform: rotate(-8deg) scale(1.08); }

/* ---------- Why Choose Us tabs ---------- */
.choose-us-tabs { border: none; display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.choose-us-tabs .nav-link {
  border: none;
  border-radius: 50px;
  padding: .55rem 1.3rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.choose-us-tabs .nav-link:hover { color: var(--primary); }
.choose-us-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.choose-us-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1.5rem;
}
.choose-us-checklist li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
}
.choose-us-checklist li i { color: var(--emerald); font-size: 1.15rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .choose-us-checklist { grid-template-columns: 1fr; }
}

/* ---------- Stats counters ---------- */
.stats-strip {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  position: relative;
}
.stat-item { text-align: center; color: #fff; padding: 2rem 0; }
.stat-item .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--accent); }
.stat-item .label { color: rgba(255,255,255,.85); font-weight: 500; }

/* ---------- News / event cards ---------- */
.post-card { height: 100%; display: flex; flex-direction: column; }
.post-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .thumb img { transform: scale(1.08); }
.post-card .cat-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  padding: .3rem .8rem; border-radius: 50px;
}
.post-card .body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.post-card .date { color: var(--muted); font-size: .82rem; margin-bottom: .4rem; }
.post-card h5 { font-size: 1.05rem; margin-bottom: .6rem; }
.post-card .excerpt { color: var(--muted); font-size: .92rem; flex: 1; }

/* Compact variant — used for the homepage news preview, smaller than the full listing page */
.post-card.compact .thumb { aspect-ratio: 16/10; }
.post-card.compact .cat-badge { top: .6rem; left: .6rem; font-size: .62rem; padding: .2rem .65rem; }
.post-card.compact .body { padding: 1rem; }
.post-card.compact .date { font-size: .72rem; margin-bottom: .25rem; }
.post-card.compact h5 {
  font-size: .92rem; margin-bottom: .35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card.compact .excerpt {
  font-size: .8rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card.compact .body a { font-size: .78rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .75rem; }
.gallery-item { position: relative; border-radius: .75rem; overflow: hidden; aspect-ratio: 1/1; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.12); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,42,84,.85));
  opacity: 0; transition: opacity var(--transition);
  display: flex; align-items: flex-end; padding: .9rem; color: #fff; font-size: .85rem; font-weight: 600;
}
.gallery-item:hover .overlay { opacity: 1; }

/* ---------- Video cards ---------- */
.video-card { display: block; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); }
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.video-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(242,169,59,.92); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: var(--shadow-md);
  transition: transform var(--transition), background var(--transition);
}
.video-card:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.1); background: var(--accent-dark); }
#videoModal .modal-content { background: #000; }
#videoModal .modal-title { font-size: 1rem; }

/* ---------- PDF viewer modal (mandatory disclosure documents) ---------- */
.doc-viewer-trigger { cursor: pointer; }
.pdf-viewer-modal .modal-content { background: #525659; }
.pdf-viewer-modal .modal-header {
  background: #333638;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative;
  justify-content: center;
}
.pdf-viewer-modal .modal-title {
  color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.pdf-viewer-modal .btn-close { margin-left: auto; opacity: .85; }
.pdf-viewer-modal .btn-close:hover { opacity: 1; }
.pdf-viewer-pages {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  border-radius: .25rem;
  pointer-events: none;
}
@media print {
  .pdf-viewer-modal { display: none !important; }
}

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(6,20,40,.92);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; padding: 2rem;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 86vh; border-radius: .5rem; box-shadow: var(--shadow-lg); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); }
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-nav.prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Testimonials ---------- */
.testimonial-card { padding: 2rem; text-align: center; }
.testimonial-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 4px solid var(--bg-soft); }
.testimonial-card .quote { color: var(--muted); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.75); }
.site-footer h5 { color: #fff; margin-bottom: 1.2rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-bottom { background: #061d3d; padding: 1rem 0; font-size: .85rem; }
.social-icons a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: .5rem; transition: var(--transition);
}
.social-icons a:hover { background: var(--accent); transform: translateY(-3px); }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: .6rem; border: 1px solid #e1e7f0; padding: .75rem 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 .2rem rgba(11,61,120,.12);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background-color: var(--primary);
  background-image:
    linear-gradient(135deg, var(--primary-dark), var(--primary)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 80'%3E%3Cg fill='white' fill-opacity='0.07'%3E%3Cellipse cx='30' cy='55' rx='28' ry='20'/%3E%3Cellipse cx='60' cy='40' rx='34' ry='26'/%3E%3Cellipse cx='95' cy='55' rx='26' ry='20'/%3E%3Crect x='15' y='50' width='100' height='26' rx='13'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 80'%3E%3Cg fill='%23f2a93b' fill-opacity='0.16'%3E%3Cellipse cx='30' cy='55' rx='28' ry='20'/%3E%3Cellipse cx='60' cy='40' rx='34' ry='26'/%3E%3Cellipse cx='95' cy='55' rx='26' ry='20'/%3E%3Crect x='15' y='50' width='100' height='26' rx='13'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 8% 15%, 82% 68%;
  background-size: auto, 150px 92px, 100px 62px;
  color: #fff; padding: 5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: heroBounce ease-in-out infinite;
}
.page-hero::before { width: 90px; height: 90px; top: 12%; right: 8%; background: rgba(255,255,255,.08); animation-duration: 6s; }
.page-hero::after { width: 50px; height: 50px; bottom: 10%; left: 8%; background: rgba(242,169,59,.2); animation-duration: 5s; animation-delay: .5s; }
@media (prefers-reduced-motion: reduce) {
  .page-hero::before, .page-hero::after { animation: none; }
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero .breadcrumb .active { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.active { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-40px); }
.reveal-left.active { transform: none; }
.reveal-right { transform: translateX(40px); }
.reveal-right.active { transform: none; }
.reveal-zoom { transform: scale(.88); }
.reveal-zoom.active { transform: none; }
.reveal-delay-1.active { transition-delay: .1s; }
.reveal-delay-2.active { transition-delay: .2s; }
.reveal-delay-3.active { transition-delay: .3s; }
.reveal-delay-4.active { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-zoom { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  [data-parallax] { transform: none !important; }
}

/* ---------- Organic blob image shapes ----------
   .blob-shape-N defines the border-radius only (used on the outer .blob-frame
   wrapper so its ::before/::after decorative backing can peek outside the box).
   .img-blob-N applies the same shape PLUS overflow:hidden (used on the inner
   wrapper that actually clips the <img>). Keeping these separate matters: if
   overflow:hidden lived on the same element as the ::before/::after, it would
   clip its own decorative pseudo-elements before they could peek out. */
.blob-shape-1, .img-blob-1 { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
.blob-shape-2, .img-blob-2 { border-radius: 42% 58% 68% 32% / 45% 41% 59% 55%; }
.blob-shape-3, .img-blob-3 { border-radius: 50% 50% 38% 62% / 62% 44% 56% 38%; }
.img-blob-1, .img-blob-2, .img-blob-3 { overflow: hidden; }
.img-blob-1 img, .img-blob-2 img, .img-blob-3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blob-anim { animation: blobMorph 9s ease-in-out infinite; }
@keyframes blobMorph {
  0%, 100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
  50% { border-radius: 42% 58% 68% 32% / 45% 41% 59% 55%; }
}
@media (prefers-reduced-motion: reduce) { .blob-anim { animation: none; } }

.blob-frame { position: relative; }
.blob-frame::before {
  content: '';
  position: absolute; inset: -18px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--emerald));
  opacity: .18;
}
.blob-frame::after {
  content: '';
  position: absolute; inset: -34px;
  z-index: -2;
  border-radius: inherit;
  border: 2px dashed rgba(11,61,120,.15);
}

/* Floating stat badge that overlaps the corner of an image */
.floating-badge {
  position: absolute;
  bottom: -1.25rem; right: -1rem;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.4rem;
  display: flex; align-items: center; gap: .8rem;
  z-index: 3;
  animation: badgeFloat 4s ease-in-out infinite;
}
.floating-badge .icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.floating-badge .num { font-weight: 800; color: var(--primary-dark); font-size: 1.15rem; line-height: 1; }
.floating-badge .label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .floating-badge { animation: none; } }
@media (max-width: 575.98px) {
  .floating-badge { padding: .75rem 1rem; bottom: -1rem; right: .5rem; }
  .floating-badge .icon { width: 38px; height: 38px; font-size: 1.05rem; }
}

/* ---------- Decorative section blobs + wave dividers ---------- */
.section-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.section-blobs span {
  position: absolute;
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  opacity: .5;
}
.section-blobs .b1 { width: 260px; height: 260px; background: rgba(11,61,120,.04); top: -60px; left: -80px; }
.section-blobs .b2 { width: 180px; height: 180px; background: rgba(242,169,59,.08); bottom: -40px; right: -40px; }
.section-blobs .b3 { width: 120px; height: 120px; background: rgba(22,135,90,.06); top: 40%; right: 12%; }

.wave-divider { position: relative; line-height: 0; z-index: 1; }
.wave-divider svg { display: block; width: 100%; height: 60px; }
.wave-divider.flip svg { transform: rotate(180deg); }

/* Scalloped "cloud edge" divider — a row of soft puffy bumps between sections */
.cloud-divider { position: relative; line-height: 0; z-index: 2; height: 70px; overflow: hidden; }
.cloud-divider svg { display: block; width: 100%; height: 100%; }
.cloud-divider.flip svg { transform: rotate(180deg); }
@media (max-width: 767.98px) {
  .cloud-divider { height: 40px; }
}

/* ---------- Cloud shapes ---------- */
.cloud-shape { position: absolute; opacity: .5; }
.cloud-shape svg { display: block; width: 100%; height: 100%; }
.cloud-shape svg * { fill: currentColor; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 1040;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--accent-dark); }

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; background: #fff; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid #e1e7f0; border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Misc ---------- */
.divider-wave { display: block; width: 100%; height: 60px; }
.badge-soft { background: rgba(11,61,120,.08); color: var(--primary); font-weight: 600; padding: .4rem .9rem; border-radius: 50px; font-size: .8rem; }

@media (max-width: 991.98px) {
  .hero { min-height: 78vh; }
}
