/* ==========================================================================
   คณะกรรมการสถานศึกษาโรงเรียนบางแก้วประชาสรรค์ — ธีมชมพู-แสด
   หัวข้อใช้ Kanit / เนื้อหาใช้ Sarabun
   ========================================================================== */
:root {
  --pink: #ff2f7e;
  --orange: #ff7a30;
  --sunset: linear-gradient(135deg, #ff2f7e 0%, #ff5f6d 45%, #ff7a30 100%);
  --ink: #401225;
  --ink-soft: #6b3a51;
  --pale: #fff4ef;
  --paler: #fffaf8;
  --shadow-pink: 0 18px 40px -20px rgba(216, 17, 89, 0.34);
  --shadow-soft: 0 10px 26px -14px rgba(64, 18, 37, 0.18);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sarabun", Arial, sans-serif;
  background: var(--paler);
  color: var(--ink);
}

h1, h2, h3 {
  font-family: "Kanit", sans-serif;
  margin: 0;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 0 var(--pale);
  transition: box-shadow .3s ease;
}

.navbar.is-scrolled {
  box-shadow: var(--shadow-soft);
}

.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pink);
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .2px;
}

.navbar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--pale);
  background: #fff;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--pink);
  transition: transform .3s var(--ease), opacity .3s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}

.nav-links li a:hover,
.nav-links li a:focus-visible {
  color: var(--pink);
  background: var(--pale);
}

.nav-cta {
  background: var(--sunset) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-pink);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  color: #fff !important;
  background: var(--sunset) !important;
  transform: translateY(-1px) scale(1.03);
}

@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    padding: 10px 16px 18px;
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s var(--ease), opacity .3s ease, padding .35s var(--ease);
  }

  .nav-links.is-open {
    max-height: 300px;
    opacity: 1;
  }

  .nav-links li a {
    display: block;
    text-align: center;
  }

  .nav-cta {
    margin-top: 6px;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sunset);
  color: #fff;
  text-align: center;
  padding: 56px 20px 68px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.hero-blob--1 { width: 260px; height: 260px; top: -110px; left: -70px; }
.hero-blob--2 { width: 200px; height: 200px; bottom: -90px; right: -40px; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: var(--shadow-pink);
  margin-bottom: 16px;
  object-fit: cover;
}

.hero-eyebrow {
  display: inline-block;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .4px;
  color: var(--ink);
  background: #fff;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .2px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero h1 span {
  font-weight: 500;
  font-size: 0.82em;
  opacity: .95;
}

.hero p {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: .2px;
  opacity: .96;
  font-family: "Sarabun", sans-serif;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   SECTIONS / LAYOUT
   ========================================================================== */
section {
  padding: 52px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.section-eyebrow {
  display: inline-block;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .4px;
  color: var(--pink);
  background: var(--pale);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   CHAIRMAN CARD
   ========================================================================== */
.chair-section {
  padding-bottom: 8px;
}

.chair-card {
  max-width: 300px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  padding: 28px 26px 30px;
  text-align: center;
  box-shadow: var(--shadow-pink);
  border: 1px solid var(--pale);
  position: relative;
}

.chair-photo {
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--pale);
  box-shadow: var(--shadow-soft);
}

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

.chair-badge {
  display: inline-block;
  background: var(--sunset);
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-pink);
  margin-bottom: 12px;
}

.chair-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.chair-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
}

/* ==========================================================================
   BOARD GRID
   ========================================================================== */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.board-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px 16px 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--pale);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.board-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-pink);
}

.board-photo {
  width: 104px;
  height: 104px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--pale);
}

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

.board-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}

.board-card .role {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 6px;
  line-height: 1.5;
  min-height: 19px;
}

.board-card .pos {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pink);
  background: var(--pale);
  padding: 3px 12px;
  border-radius: 999px;
  margin: 0;
  letter-spacing: .2px;
}

.board-card--lead {
  border-color: var(--orange);
}

.board-card--lead .board-photo {
  border-color: var(--orange);
}

.board-card--lead .pos {
  color: #fff;
  background: var(--sunset);
}

@media (max-width: 980px) {
  .board-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .board-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .board-card {
    padding: 16px 10px 18px;
  }
  .board-photo {
    width: 84px;
    height: 84px;
  }
}

@media (max-width: 420px) {
  .board-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--sunset);
  color: #fff;
  text-align: center;
  padding: 36px 20px 30px;
  margin-top: 20px;
  border-radius: 32px 32px 0 0;
}

.footer-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  margin-bottom: 14px;
  object-fit: cover;
}

.social-icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 16px;
  padding: 0;
  flex-wrap: wrap;
  list-style: none;
}

.social-icon__item {
  list-style: none;
}

.social-icon__link {
  font-size: 1.7rem;
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: transform .3s var(--ease), opacity .25s ease;
  opacity: .92;
}

.social-icon__link:hover,
.social-icon__link:focus-visible {
  transform: translateY(-4px);
  opacity: 1;
}

footer h5 {
  margin: 0;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.8;
  opacity: .95;
  font-family: "Sarabun", sans-serif;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
