/* SDGs — Official UN Sustainable Development Goals palette */
:root {
  --sdg-1: #E5243B;
  --sdg-2: #DDA63A;
  --sdg-3: #4C9F38;
  --sdg-4: #C5192D;
  --sdg-5: #FF3A21;
  --sdg-6: #26BDE2;
  --sdg-7: #FCC30B;
  --sdg-8: #A21942;
  --sdg-9: #FD6925;
  --sdg-10: #DD1367;
  --sdg-11: #FD9D24;
  --sdg-12: #BF8B2E;
  --sdg-13: #3F7E44;
  --sdg-14: #0A97D9;
  --sdg-15: #56C02B;
  --sdg-16: #00689D;
  --sdg-17: #19486A;

  --brand: #19486A;
  --brand-deep: #0f2f45;
  --brand-soft: #00689D;
  --brand-pale: #eef5f9;
  --brand-line: #b7d4e5;

  /* จากเอกสาร SDGs.docx — สีตัวอักษร SDGs (โทนสด) */
  --sdg-letter-s: #0088FF;
  --sdg-letter-d: #FFD400;
  --sdg-letter-g: #00C853;
  --sdg-letter-s2: #FF1744;
  --faculty: #7030A0;

  /* legacy aliases used across the stylesheet */
  --orange: var(--brand);
  --orange-deep: var(--brand-deep);
  --orange-soft: var(--brand-soft);
  --orange-pale: var(--brand-pale);
  --orange-line: var(--brand-line);

  --ink: #1a2332;
  --muted: #5a6a7a;
  --paper: #ffffff;
  --wash: #f4f8fb;
  --shadow: 0 12px 40px rgba(25, 72, 106, 0.14);
  --radius: 18px;
  --font-display: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --font-body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --max: 1120px;

  --sdg-rainbow: linear-gradient(
    90deg,
    var(--sdg-1), var(--sdg-2), var(--sdg-3), var(--sdg-4), var(--sdg-5),
    var(--sdg-6), var(--sdg-7), var(--sdg-8), var(--sdg-9), var(--sdg-10),
    var(--sdg-11), var(--sdg-12), var(--sdg-13), var(--sdg-14), var(--sdg-15),
    var(--sdg-16), var(--sdg-17)
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -8%, rgba(10, 151, 217, 0.12), transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(86, 192, 43, 0.1), transparent 55%),
    radial-gradient(700px 360px at 70% 10%, rgba(229, 36, 59, 0.06), transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--wash) 42%, #fff 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Official SDG color utilities */
.sdg-c-1 { --sdg-tone: var(--sdg-1); }
.sdg-c-2 { --sdg-tone: var(--sdg-2); }
.sdg-c-3 { --sdg-tone: var(--sdg-3); }
.sdg-c-4 { --sdg-tone: var(--sdg-4); }
.sdg-c-5 { --sdg-tone: var(--sdg-5); }
.sdg-c-6 { --sdg-tone: var(--sdg-6); }
.sdg-c-7 { --sdg-tone: var(--sdg-7); }
.sdg-c-8 { --sdg-tone: var(--sdg-8); }
.sdg-c-9 { --sdg-tone: var(--sdg-9); }
.sdg-c-10 { --sdg-tone: var(--sdg-10); }
.sdg-c-11 { --sdg-tone: var(--sdg-11); }
.sdg-c-12 { --sdg-tone: var(--sdg-12); }
.sdg-c-13 { --sdg-tone: var(--sdg-13); }
.sdg-c-14 { --sdg-tone: var(--sdg-14); }
.sdg-c-15 { --sdg-tone: var(--sdg-15); }
.sdg-c-16 { --sdg-tone: var(--sdg-16); }
.sdg-c-17 { --sdg-tone: var(--sdg-17); }

.badge.sdg,
.sdg-chip,
.sdg-tag,
.cat-num.sdg-c-1, .cat-num.sdg-c-2, .cat-num.sdg-c-3, .cat-num.sdg-c-4,
.cat-num.sdg-c-5, .cat-num.sdg-c-6, .cat-num.sdg-c-7, .cat-num.sdg-c-8,
.cat-num.sdg-c-9, .cat-num.sdg-c-10, .cat-num.sdg-c-11, .cat-num.sdg-c-12,
.cat-num.sdg-c-13, .cat-num.sdg-c-14, .cat-num.sdg-c-15, .cat-num.sdg-c-16,
.cat-num.sdg-c-17 {
  background: var(--sdg-tone, var(--brand)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.sdg-c-2.badge.sdg,
.sdg-c-7.badge.sdg,
.sdg-c-11.badge.sdg,
.sdg-c-2.sdg-tag,
.sdg-c-7.sdg-tag,
.sdg-c-11.sdg-tag,
.cat-num.sdg-c-2,
.cat-num.sdg-c-7,
.cat-num.sdg-c-11,
.chip.sdg-c-2.active,
.chip.sdg-c-7.active,
.chip.sdg-c-11.active {
  color: #1a2332 !important;
}

.chip.sdg-tone.active,
.chip[class*="sdg-c-"].active {
  background: var(--sdg-tone, var(--brand));
  border-color: var(--sdg-tone, var(--brand));
  color: #fff;
}

.sdg-rainbow-bar {
  height: 5px;
  width: 100%;
  background: var(--brand);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(25, 72, 106, 0.1);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  height: 58px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-mark {
  min-width: 52px;
  height: 42px;
  padding: 0 0.45rem;
  border-radius: 12px;
  background: var(--sdg-rainbow);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(25, 72, 106, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-text .brand-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--faculty);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  max-width: none;
}

/* สีตัวอักษร SDGs ตามเอกสาร: S น้ำเงิน · D เหลือง · G เขียว · s แดง */
.sdg-letters {
  display: inline-flex;
  letter-spacing: 0.02em;
  font-weight: 800;
  line-height: 1;
}

.sdg-letters .s1 { color: var(--sdg-letter-s); }
.sdg-letters .d  {
  color: var(--sdg-letter-d);
  -webkit-text-stroke: 0.4px rgba(180, 120, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 200, 0, 0.35);
}
.sdg-letters .g  { color: var(--sdg-letter-g); }
.sdg-letters .s2 { color: var(--sdg-letter-s2); }

.sdg-letters-lg {
  font-size: 1.08em;
  gap: 0.02em;
  vertical-align: baseline;
  filter: saturate(1.15);
}

.sdg-legend {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.sdg-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sdg-legend .dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.sdg-legend .dot.s1 { background: var(--sdg-letter-s); }
.sdg-legend .dot.d  { background: var(--sdg-letter-d); }
.sdg-legend .dot.g  { background: var(--sdg-letter-g); }
.sdg-legend .dot.s2 { background: var(--sdg-letter-s2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (min-width: 901px) {
  .nav-links {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
}

.nav-links a {
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange-deep);
  background: var(--orange-pale);
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(25, 72, 106, 0.25);
}

.nav-icon-btn:hover,
.nav-icon-btn.active {
  filter: brightness(1.08);
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand)) !important;
}

.nav-icon-btn svg {
  display: block;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--orange-pale);
  color: var(--orange-deep);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-soft), var(--brand));
  color: #fff;
  box-shadow: 0 10px 24px rgba(25, 72, 106, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  background: #fff;
  color: var(--orange-deep);
  border: 1px solid var(--orange-line);
}

.btn-ghost:hover {
  background: var(--orange-pale);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 90% 40%, rgba(10, 151, 217, 0.1), transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(86, 192, 43, 0.08), transparent 70%),
    radial-gradient(ellipse 35% 35% at 40% 10%, rgba(229, 36, 59, 0.06), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--sdg-rainbow);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  line-height: 1.25;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1rem;
}

.hero-tagline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.45;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-panel {
  position: relative;
  border-radius: 28px;
  padding: 1.5rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(238, 245, 249, 0.96));
  border: 1px solid rgba(25, 72, 106, 0.12);
  box-shadow: var(--shadow);
  min-height: 280px;
  overflow: hidden;
  animation: rise 0.8s ease both;
}

.hero-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--sdg-rainbow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 70%;
  background: radial-gradient(circle at center, rgba(10, 151, 217, 0.18), transparent 65%);
  pointer-events: none;
}

.hero-visual {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding: 0.5rem 0.25rem 0.75rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 0;
  overflow: visible;
  position: relative;
  animation: none;
}

.hero-visual.hero-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 0;
  overflow: visible;
  animation: none;
}

.hero-visual::before,
.hero-visual::after {
  display: none !important;
  content: none !important;
}

/* วงกลมชัด — ใช้ PNG โปร่งใสแล้วหมุนภาพด้านใน */
.hero-wheel-clip {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 16px 40px rgba(25, 72, 106, 0.22);
  line-height: 0;
}

.hero-wheel {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  border-radius: 0;
  animation: sdg-spin-soft 24s linear infinite !important;
  transform-origin: 50% 50%;
  filter: none;
  backface-visibility: hidden;
}

@keyframes sdg-spin-soft {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-stats {
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-stack {
  display: grid;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(25, 72, 106, 0.1);
  animation: fade-up 0.7s ease both;
  text-align: center;
}

.stat-card:nth-child(2) { animation-delay: 0.12s; }
.stat-card:nth-child(3) { animation-delay: 0.22s; }

.stat-card strong {
  display: block;
  font-size: 1.55rem;
  color: var(--brand-deep);
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.sdg-goals-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(238,245,249,0.9));
  border: 1px solid rgba(25, 72, 106, 0.1);
}

.sdg-goals-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.sdg-goals-badge {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

/* Category chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--orange-line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.chip:hover {
  border-color: var(--brand-soft);
  color: var(--brand);
}

.chip.active:not([class*="sdg-c-"]) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chip[class*="sdg-c-"].active {
  background: var(--sdg-tone, var(--brand));
  border-color: var(--sdg-tone, var(--brand));
  color: #fff;
}

.chip.sdg-c-2.active,
.chip.sdg-c-7.active,
.chip.sdg-c-11.active {
  color: #1a2332;
}

/* Project cards — interaction containers */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.project-card {
  background: #fff;
  border: 1px solid rgba(232, 93, 4, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(28, 25, 23, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  animation: fade-up 0.6s ease both;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-card .thumb {
  aspect-ratio: 16 / 10;
  background: #d8e2ea;
  overflow: hidden;
  position: relative;
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .thumb img {
  transform: scale(1.05);
}

.project-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--orange-pale);
  color: var(--orange-deep);
}

.badge.sdg {
  background: var(--brand);
  color: #fff;
}

.project-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}

.link-more {
  color: var(--orange-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Category blocks */
.cat-list {
  display: grid;
  gap: 1rem;
}

.cat-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(232, 93, 4, 0.12);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  transition: 0.2s ease;
}

.cat-item:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.cat-num {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand-soft), var(--brand));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.cat-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.cat-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Detail */
.detail-hero {
  padding: 2rem 0 1rem;
}

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: #d8e2ea;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.25;
}

.detail-summary {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48rem;
}

.detail-body {
  background: #fff;
  border: 1px solid rgba(232, 93, 4, 0.1);
  border-radius: 20px;
  padding: 1.5rem;
  white-space: pre-wrap;
  margin: 1.5rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 0.85rem;
}

.gallery figure {
  margin: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(25, 72, 106, 0.1);
  position: relative;
  box-shadow: 0 8px 24px rgba(25, 72, 106, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fade-up 0.55s ease both;
}

.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery .sdg-tag {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  background: var(--sdg-tone, var(--brand));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.gallery .zoom-hint {
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery figure:hover .zoom-hint,
.gallery figure:focus-within .zoom-hint {
  opacity: 1;
}

.gallery button.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery figure:hover img {
  transform: scale(1.04);
}

.gallery figcaption {
  padding: 0.7rem 0.85rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.gallery figcaption .sdg-caption {
  display: block;
  margin-top: 0.25rem;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 47, 69, 0.92);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 1rem;
  touch-action: none;
}

.lightbox.open {
  display: grid;
}

.lightbox-stage {
  position: relative;
  width: min(96vw, 1100px);
  max-height: 90vh;
  display: grid;
  place-items: center;
}

.lightbox img {
  max-height: min(82vh, 900px);
  max-width: 94vw;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  max-width: 90vw;
}

.lightbox-counter {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: #fff;
  color: var(--brand-deep);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.lightbox-nav.prev {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.next {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Admin multi-upload dropzone */
.upload-drop {
  border: 2px dashed #b7d4e5;
  border-radius: 16px;
  padding: 1.1rem;
  background: #f7fbfe;
  text-align: center;
  transition: 0.2s ease;
}

.upload-drop.dragover {
  border-color: var(--brand);
  background: #eef5f9;
}

.upload-drop strong {
  display: block;
  color: var(--brand-deep);
  margin-bottom: 0.25rem;
}

.upload-drop p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-drop input[type="file"] {
  margin-top: 0.75rem;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.upload-preview .upload-item {
  display: grid;
  gap: 0.4rem;
}

.upload-preview .thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5eef4;
  background: #fff;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview .upload-item input {
  width: 100%;
  border: 1px solid #d7e3ec;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
}

.upload-preview .count-bar {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--brand-deep);
  font-weight: 700;
  text-align: left;
}

.cover-preview {
  margin-top: 0.35rem;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5eef4;
  background: #d8e2ea;
  aspect-ratio: 16 / 10;
}

.cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.schedule-list {
  display: grid;
  gap: 0.75rem;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid #e5eef4;
  border-radius: 12px;
  background: #f8fbfd;
}

.schedule-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: #1f2937;
}

.schedule-date-selects,
.schedule-time-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.schedule-date-selects select,
.schedule-time-selects select {
  min-width: 0;
  flex: 1;
  border: 1px solid #d7e3ec;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  background: #fff;
}

.schedule-time-selects span {
  color: #5a6a7a;
  font-weight: 600;
}

.schedule-panel {
  margin-bottom: 1.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e5eef4;
  border-radius: 16px;
  background: #f8fbfd;
}

.schedule-panel h2,
.detail-section-title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  color: var(--brand-deep);
}

.schedule-display {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.schedule-display li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5eef4;
}

.schedule-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.schedule-meta {
  display: grid;
  gap: 0.25rem;
  color: #334155;
  font-size: 0.95rem;
}

.schedule-meta strong {
  color: var(--brand-deep);
  margin-right: 0.35rem;
}

@media (max-width: 900px) {
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .schedule-display li {
    grid-template-columns: 1fr;
  }
}

/* Empty / alerts */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed var(--orange-line);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-info {
  background: var(--orange-pale);
  color: var(--orange-deep);
  border: 1px solid var(--orange-line);
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  background: linear-gradient(180deg, transparent, rgba(25, 72, 106, 0.06));
  border-top: 1px solid rgba(25, 72, 106, 0.1);
  padding: 1.25rem 0;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.footer-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Admin */
.admin-body {
  background: #faf7f4;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: linear-gradient(180deg, #1c1917, #292524);
  color: #fff;
  padding: 1.25rem;
}

.admin-side .logo {
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #7ec8e8;
}

.side-user {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 1rem;
}

.side-user strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
  line-height: 1.3;
}

.side-user span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.admin-side a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.admin-side a:hover,
.admin-side a.active {
  background: rgba(232, 93, 4, 0.25);
  color: #fff;
}

.admin-main {
  padding: 1.5rem;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(232, 93, 4, 0.1);
  padding: 1.25rem;
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.04);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: #fff;
  border-radius: 16px;
  padding: 1.1rem;
  border: 1px solid rgba(232, 93, 4, 0.1);
}

.stat-box strong {
  display: block;
  font-size: 1.8rem;
  color: var(--orange-deep);
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f0e7df;
  vertical-align: middle;
  font-size: 0.92rem;
}

table.data th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data img.thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label.field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e7d5c5;
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(232, 93, 4, 0.25);
  border-color: var(--orange);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.sdg-multi {
  border: 1px solid #e5eef4;
  border-radius: 14px;
  padding: 0.9rem 1rem 1rem;
  margin: 0;
}

.sdg-multi legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.sdg-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.sdg-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid #e7eef3;
  background: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
}

.sdg-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.sdg-check:has(input:checked) {
  border-color: var(--sdg-tone, var(--brand));
  background: color-mix(in srgb, var(--sdg-tone, var(--brand)) 12%, #fff);
}

@media (max-width: 720px) {
  .sdg-check-grid {
    grid-template-columns: 1fr;
  }
}

.check-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.check-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(10, 151, 217, 0.18), transparent),
    radial-gradient(600px 300px at 90% 10%, rgba(229, 36, 59, 0.1), transparent),
    #f4f8fb;
}

.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(232, 93, 4, 0.12);
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  height: 88px;
  width: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  text-align: center;
}

.login-card .sub {
  color: var(--muted);
  margin: 0 0 1.25rem;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.image-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.image-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem;
  border: 1px solid #f0e7df;
  border-radius: 12px;
}

.image-item img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
}

.image-item-sdg {
  grid-template-columns: 100px 1fr;
  align-items: start;
}

.image-item-edit {
  grid-template-columns: 100px 1fr auto;
  align-items: center;
}

.image-item-sdg img,
.image-item-edit img {
  width: 100px;
  height: 75px;
}

.image-fields {
  display: grid;
  gap: 0.55rem;
}

.pdf-file-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.pdf-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e5eef4;
  border-radius: 12px;
  background: #f8fafc;
}

.pdf-file-list.public .pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #e5eef4;
  background: #fff;
  font-weight: 600;
  color: var(--brand);
  transition: 0.2s ease;
}

.pdf-file-list.public .pdf-link:hover {
  border-color: var(--brand);
  background: #f3f8fb;
}

.pdf-icon {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: #c62828;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sort-actions {
  flex-direction: column;
  gap: 0.25rem;
}

.sort-actions .btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ===== SDG content pages ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.btn-light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-light:hover {
  background: #fff;
}

.sdg-hero {
  --hero-ink: #fff;
  position: relative;
  color: var(--hero-ink);
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(135deg, var(--sdg-tone, var(--brand)), color-mix(in srgb, var(--sdg-tone, var(--brand)) 70%, #0b1b2b));
  padding: 2.25rem 0 2rem;
  overflow: hidden;
}

.sdg-hero.sdg-c-2,
.sdg-hero.sdg-c-7,
.sdg-hero.sdg-c-11 {
  --hero-ink: #1a2332;
}

.sdg-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: center;
}

.sdg-hero-num {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.sdg-hero-back {
  margin-bottom: 0.75rem;
}

.sdg-hero-kicker {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.sdg-hero h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.25;
}

.sdg-hero-intro {
  margin: 0 0 0.75rem;
  max-width: 52rem;
  white-space: pre-line;
  opacity: 0.95;
}

.sdg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sdg-switcher .chip {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.sdg-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sdg-toc a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(25, 72, 106, 0.1);
  border-left: 4px solid var(--sdg-tone, var(--brand));
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
  transition: 0.2s ease;
}

.sdg-toc a:hover {
  box-shadow: var(--shadow);
}

.sdg-toc strong {
  margin-right: 0.3rem;
}

.sdg-targets {
  display: grid;
  gap: 1rem;
}

.sdg-target {
  background: #fff;
  border: 1px solid rgba(25, 72, 106, 0.1);
  border-top: 5px solid var(--sdg-tone, var(--brand));
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(25, 72, 106, 0.05);
  scroll-margin-top: 90px;
}

.sdg-target > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.sdg-target > summary::-webkit-details-marker {
  display: none;
}

.sdg-target > summary::after {
  content: "▾";
  margin-left: 0.25rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.sdg-target:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.sdg-target-title {
  flex: 1;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.4;
}

.sdg-target-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.sdg-target-body {
  padding: 0 1.25rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.sdg-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  background: var(--sdg-tone, var(--brand));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

.sdg-c-2 .sdg-code-badge:not(.outline),
.sdg-c-7 .sdg-code-badge:not(.outline),
.sdg-c-11 .sdg-code-badge:not(.outline) {
  color: #1a2332;
}

.sdg-code-badge.outline {
  background: color-mix(in srgb, var(--sdg-tone, var(--brand)) 12%, #fff);
  color: color-mix(in srgb, var(--sdg-tone, var(--brand)) 75%, #000);
  border: 1px solid color-mix(in srgb, var(--sdg-tone, var(--brand)) 35%, #fff);
  min-width: 3.6rem;
}

.sdg-desc {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
  font-size: 0.95rem;
}

.sdg-indicators {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.sdg-indicator {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--wash);
  border: 1px solid rgba(25, 72, 106, 0.07);
  display: grid;
  gap: 0.5rem;
  scroll-margin-top: 90px;
}

.sdg-indicator-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.sdg-indicator-head h3 {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.sdg-indicator .sdg-desc {
  padding-left: 4.25rem;
  font-size: 0.9rem;
}

.gallery.gallery-sm {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 0.6rem;
}

.sdg-indicator .gallery-sm {
  padding-left: 4.25rem;
}

.gallery.gallery-sm figure {
  border-radius: 12px;
}

.gallery.gallery-sm figcaption {
  font-size: 0.78rem;
  padding: 0.5rem 0.6rem 0.6rem;
}

.sdg-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 0.85rem;
}

.sdg-tile {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-height: 170px;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: var(--sdg-tone, var(--brand));
  color: #fff;
  box-shadow: 0 10px 26px rgba(25, 72, 106, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sdg-tile.sdg-c-2,
.sdg-tile.sdg-c-7,
.sdg-tile.sdg-c-11 {
  color: #1a2332;
}

.sdg-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.sdg-tile-num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.sdg-tile-name {
  font-weight: 700;
  line-height: 1.35;
}

.sdg-tile-meta {
  margin-top: auto;
  font-size: 0.78rem;
  opacity: 0.9;
}

.sdg-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--sdg-tone, var(--brand)) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--sdg-tone, var(--brand)) 35%, #fff);
  color: var(--ink);
  font-size: 0.92rem;
}

/* Admin: SDG editor */
.admin-sep {
  border: 0;
  border-top: 1px solid #e5eef4;
  margin: 0.25rem 0;
}

.admin-hint {
  margin: 0;
  color: #57534e;
  font-size: 0.9rem;
}

.admin-sdg-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(25, 72, 106, 0.1);
  border-left: 6px solid var(--sdg-tone, var(--brand));
}

.admin-sdg-targets {
  display: grid;
  gap: 0.65rem;
}

.admin-sdg-target {
  border: 1px solid #e5eef4;
  border-left: 4px solid var(--sdg-tone, var(--brand));
  border-radius: 12px;
  background: #fff;
  scroll-margin-top: 20px;
}

.admin-sdg-target > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
}

.admin-sdg-summary-title {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
}

.admin-sdg-summary-meta {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.admin-sdg-body {
  padding: 0.25rem 0.9rem 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.admin-item-grid {
  display: grid;
  grid-template-columns: 120px 1fr 90px;
  gap: 0.6rem;
}

.admin-sdg-indicators {
  display: grid;
  gap: 0.6rem;
  padding-left: 1rem;
  border-left: 2px dashed #dbe6ee;
}

.admin-sdg-indicator {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5eef4;
  scroll-margin-top: 20px;
}

.admin-sdg-indicator:target {
  outline: 2px solid var(--sdg-tone, var(--brand));
}

.admin-indicator-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-add-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.sdg-upload {
  display: grid;
  gap: 0.45rem;
}

.sdg-upload-btn {
  justify-self: start;
  cursor: pointer;
}

.sdg-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sdg-upload-preview:empty {
  display: none;
}

.sdg-upload-preview img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.sdg-upload-note {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
}

.admin-sticky-save {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 0.75rem 0 0.25rem;
  background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0));
}

@media (max-width: 720px) {
  .sdg-hero-inner {
    grid-template-columns: 1fr;
  }

  .sdg-hero-num {
    width: 84px;
    height: 84px;
    font-size: 2.8rem;
    border-radius: 20px;
  }

  .sdg-indicator .sdg-desc,
  .sdg-indicator .gallery-sm {
    padding-left: 0;
  }

  .sdg-target > summary {
    flex-wrap: wrap;
  }

  .admin-item-grid,
  .admin-add-row,
  .sdg-banner {
    grid-template-columns: 1fr;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .project-grid,
  .gallery,
  .stats-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-side {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
  }

  .admin-side .logo {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .admin-side a {
    margin: 0;
  }
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 0.2rem;
  }

  .nav-links a:not(.nav-icon-btn) {
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid rgba(232, 93, 4, 0.12);
    padding: 0.75rem 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a:not(.nav-icon-btn) {
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    white-space: normal;
  }

  .brand-logo {
    height: 48px;
    max-width: 150px;
  }

  .brand-text .brand-sub {
    display: none;
  }

  .hero-grid,
  .project-grid,
  .form-row-2,
  .cat-item {
    grid-template-columns: 1fr;
  }

  .lightbox-nav.prev { left: 0.35rem; }
  .lightbox-nav.next { right: 0.35rem; }
  .lightbox-close,
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .detail-cover {
    aspect-ratio: 16 / 10;
  }
}
