:root {
  --primary: #1976D2;
  --primary-dark: #115293;
  --primary-light: #63a4ff;
  --ink: rgba(51, 48, 60, 0.87);
  --ink-soft: rgba(51, 48, 60, 0.6);
  --bg: #F8F7FA;
  --card-bg: #FFFFFF;
  --border: rgba(51, 48, 60, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header - dark gradient bar, styled after the CBH (รพ.ชลบุรี) reference nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.site-header .container {
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  flex-shrink: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text { color: #fff; transition: color .2s; }
.brand:hover .brand-text { color: var(--primary-light); }

.brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.main-nav > a {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}

.main-nav > a:hover {
  background: #fff;
  color: var(--primary);
}

/* Dropdown nav items */
.nav-dropdown {
  position: relative;
}

.nav-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
  background: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}

.nav-dd-trigger .caret {
  font-size: 0.65rem;
  transition: transform .25s;
}

.nav-dropdown:hover .nav-dd-trigger,
.nav-dropdown.open .nav-dd-trigger {
  background: #fff;
  color: var(--primary);
}

.nav-dropdown.open .nav-dd-trigger .caret,
.nav-dropdown:hover .nav-dd-trigger .caret {
  transform: rotate(180deg);
}

.nav-dd-menu {
  position: absolute;
  /* Flush against the trigger (no gap) so the cursor never leaves the
     hoverable area while moving from the button down into the menu —
     a gap here causes the classic dropdown "dead zone" where hover is
     lost mid-transit and the menu closes before you reach it. */
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20,37,61,0.18);
  padding: 10px 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 50;
}

.nav-dropdown:hover .nav-dd-menu,
.nav-dropdown.open .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  /* Stays flush (translateY 0, matching top:100%) so hover is never lost
     mid-transition — only the hidden/closed state is offset, purely for
     the slide-in entrance effect, since it isn't hoverable while hidden. */
  transform: translateX(-50%) translateY(0);
}

.nav-dd-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.88rem;
  color: var(--ink);
}

.nav-dd-menu a:hover {
  background: rgba(25, 118, 210, 0.08);
  color: var(--primary);
}

.nav-cta {
  background: transparent;
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
  margin-left: 8px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  white-space: nowrap;
  color: #fff;
  opacity: 0.92;
}

.nav-user__name { white-space: nowrap; }

.nav-user__logout {
  opacity: 0.78;
  text-decoration: underline;
}

.nav-user__logout:hover { opacity: 1; }

.nav-auth { display: flex; align-items: center; gap: 10px; margin-left: 4px; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-pill--login { background: #0e9488; color: #fff !important; }
.btn-pill--login:hover { background: #0c7d73; }

.btn-pill--register { background: #55728c; color: #fff !important; }
.btn-pill--register:hover { background: #46617a; }

.nav-cta:hover { background: #fff; color: var(--primary-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* Hero carousel (homepage banner slider) */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  line-height: 0;
}

.hc-track {
  display: flex;
  transition: transform .5s ease;
}

.hc-slide {
  flex: 0 0 100%;
  display: block;
}

.hc-slide img {
  width: 100%;
  height: 380px;
  /* contain, not cover: some slides are tall/portrait (e.g. a QR donation
     poster) where cropping would cut off content that has to stay readable
     (a QR code, key text) — letterboxing on the branded gradient background
     is safer than cover ever slicing off something that matters. */
  object-fit: contain;
  display: block;
}

.hc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 5;
}

.hc-arrow:hover { background: rgba(0,0,0,0.55); }
.hc-prev { left: 16px; }
.hc-next { right: 16px; }

.hc-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.hc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}

.hc-dot.active { background: #fff; }

@media (max-width: 640px) {
  .hc-slide img { height: 200px; }
  .hc-arrow { width: 32px; height: 32px; font-size: 0.85rem; }
}

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 60%, var(--primary-light));
  color: #fff;
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.14), transparent 45%);
}

.hero .container { position: relative; }

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0 0 14px;
  font-weight: 600;
  max-width: 640px;
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: #fff; color: var(--primary-dark); }
.btn-primary:hover { background: #eef4ff; }

.btn-ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* Public-facing forms (e.g. register.php) */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
.form-field input[type=text], .form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.form-field textarea { min-height: 120px; resize: vertical; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}
.btn-submit:hover { background: var(--primary-dark); }

.flash-ok { background: #dcfce7; color: #15803d; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }
.flash-err { background: #fef2f2; color: #b91c1c; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }

.provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.provider-btn:hover { background: var(--bg); }
.provider-btn-logo { height: 22px; width: auto; display: block; }

.form-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-soft); font-size: 0.8rem; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.back-home-link { display: inline-block; margin-bottom: 16px; color: var(--ink-soft); font-size: 0.88rem; }
.back-home-link:hover { color: var(--primary); }

/* Show/hide toggle injected by js/admin.js next to any password field. */
.password-field { position: relative; }
.password-field input[type="password"], .password-field input[type="text"] { padding-right: 40px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle:hover { color: var(--primary); }

/* Sections */
section { padding: 64px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}

.section-head .eyebrow {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 8px 0 10px;
}

.section-head p { color: var(--ink-soft); margin: 0; }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 2px 10px rgba(51,48,60,0.04);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pillar-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.pillar-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-thumb {
  height: 130px;
  background: linear-gradient(135deg, rgba(25,118,210,0.14), rgba(25,118,210,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
}

.news-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }

.news-tag {
  align-self: flex-start;
  background: rgba(25,118,210,0.1);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.news-body h3 { font-size: 0.98rem; margin: 0 0 8px; }
.news-body p { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 12px; flex: 1; }
.news-date { font-size: 0.78rem; color: var(--ink-soft); }

/* Director */
.director {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.director-photo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.6rem;
  font-weight: 600;
}

.director-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.director-info h3 { margin: 0 0 4px; font-size: 1.15rem; }
.director-info p { margin: 0; color: var(--ink-soft); }

/* Info cards (about/contact) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.info-card h3 {
  margin: 0 0 14px;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.92rem; }
.info-card ul li { margin-bottom: 6px; }

.placeholder-note {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.76rem;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: none; }

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(25,118,210,0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-list strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.contact-list span { color: var(--ink-soft); font-size: 0.88rem; }

.map-placeholder {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: repeating-linear-gradient(45deg, #fff, #fff 10px, #f2f4f8 10px, #f2f4f8 20px);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

/* Contact page: map + details on the left, inquiry form card on the right */
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  line-height: 0;
}
.map-embed iframe { display: block; width: 100%; height: 380px; }

.contact-details-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-details-card h3 { margin-top: 0; }

.contact-detail-item { margin-bottom: 20px; }
.contact-detail-item:last-child { margin-bottom: 0; }
.contact-detail-item h4 { margin: 0 0 6px; font-size: 0.95rem; }
.contact-detail-item p { margin: 0; color: var(--ink-soft); line-height: 1.7; }

.contact-form-card { position: sticky; top: 84px; }
.contact-form-card h3 { margin-top: 0; }

/* Footer */
.site-footer {
  background: #14253d;
  color: rgba(255,255,255,0.82);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 11px;
  margin-bottom: 32px;
}

.footer-grid--compact {
  grid-template-columns: 2fr 1fr;
  max-width: 640px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1.01rem;
  margin: 0 0 14px;
}

.footer-grid p, .footer-grid a {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.68);
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 10px; font-size: 1.05rem; }
.footer-grid ul a:hover { color: #fff; }

.footer-director { display: flex; align-items: center; gap: 22px; }
.footer-director-photo {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}
.footer-director-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-director strong { display: block; color: #fff; font-size: 1.42rem; margin-bottom: 4px; }
.footer-director span { display: block; font-size: 1.33rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Welcome popup (shown once per browser session on the homepage) */
.welcome-popup {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}

.welcome-popup.show { opacity: 1; visibility: visible; }

.welcome-popup__dialog {
  position: relative;
  max-width: 462px;
  width: 100%;
}

.welcome-popup__dialog img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  background: #fff;
}

.welcome-popup__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-popup__close:hover { background: var(--primary); color: #fff; }

/* Cookie consent */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20,37,61,0.18);
  padding: 20px 22px;
  z-index: 999;
  transform: translateY(140%);
  transition: transform .35s ease;
}

.cookie-banner.show { transform: translateY(0); }

.cookie-banner h4 { margin: 0 0 6px; font-size: 0.98rem; }
.cookie-banner p { margin: 0 0 14px; font-size: 0.85rem; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }

.btn-sm {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
}

.btn-sm.accept { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 1180px) {
  .brand-text small { display: none; }
  .site-header .container { height: 62px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(20,37,61,0.1);
  }

  .main-nav.open { display: flex; }

  .main-nav > a, .nav-dd-trigger {
    color: var(--ink);
  }

  .main-nav > a:hover, .main-nav > a.active,
  .nav-dd-trigger:hover, .nav-dropdown.open .nav-dd-trigger {
    color: var(--primary);
    background: rgba(25,118,210,0.08);
    border-radius: 8px;
  }

  .main-nav > a, .nav-cta {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .nav-user {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
    color: var(--ink);
    opacity: 1;
  }
  .nav-user__logout { color: var(--primary); }

  .nav-auth {
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 0;
  }
  .btn-pill { width: 100%; justify-content: center; padding: 12px 14px; font-size: 0.95rem; }

  .nav-cta {
    margin: 6px 0 0;
    text-align: center;
    background: var(--primary);
    color: #fff !important;
  }

  .nav-dropdown { width: 100%; }
  .nav-dd-trigger { width: 100%; justify-content: space-between; padding: 12px 14px; font-size: 0.95rem; }

  .nav-dd-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    margin-left: 10px;
    padding: 0 0 4px;
  }

  .nav-dropdown.open .nav-dd-menu { display: block; }

  .nav-toggle { display: block; }
  .director { flex-direction: column; text-align: center; }
}

/* ===== Responsive tiers below (mobile-first: base styles above are the
   desktop/"lg" layout; each tier here narrows the layout further) =====
   md (tablet, ≤900px): 3-column grids become 2-column, section padding
   trimmed a bit — a tablet has room for 2 columns, no need to drop to 1. */
@media (max-width: 900px) {
  .pillars, .news-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 48px 0; }
  .hero { padding: 56px 0 76px; }
  .director { padding: 28px; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-form-card { position: static; }
}

/* sm (mobile, ≤560px): everything single-column, spacing/padding tightened
   so content doesn't need excessive scrolling on a small phone screen. */
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .pillars, .news-grid, .info-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 36px 0; }
  .hero { padding: 44px 0 60px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .pillar-card { padding: 22px 18px; }
  .info-card { padding: 20px; }
  .news-body { padding: 14px 16px 18px; }
  .director { padding: 22px 18px; }
  .director-photo { width: 76px; height: 76px; font-size: 1.3rem; }
  .contact-list li { padding: 12px 0; }
  .map-embed iframe { height: 260px; }
  .contact-details-card { padding: 20px; }
  .form-card { padding: 22px; }
  .footer-grid { gap: 24px; }
  .footer-director-photo { width: 121px; height: 121px; }
  .footer-director { gap: 16px; }
  .footer-director strong { font-size: 1.1rem; }
  .footer-director span { font-size: 1rem; }
  .site-footer { padding: 36px 0 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
