/* 담빛문화센터 랜딩페이지
   팔레트: dark #0F2A20 · accent #3F7D5C · light #8BAA6B */

:root {
  --dark: #0f2a20;
  --accent: #3f7d5c;
  --light: #8baa6b;
  --cream: #f7f5ee;
  --ink: #14231b;
  --ink-soft: #3a473d;
  --muted: #6b7d6e;
  --notice-border: rgba(243, 241, 231, 0.12);
  --notice-muted: #7f9a85;
  --paper: #f3f1e7;
  --warn-bg: #f3e4d2;
  --warn-text: #a15d2e;
  --glow: #e0a53c;
  --glow-deep: #b97f22;
  --glow-soft: rgba(224, 165, 60, 0.18);
  --section-pad-y: 120px;
  --section-pad-x: 72px;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --ease-organic: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  word-break: keep-all;
}

.wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--section-pad-x);
  z-index: 20;
  transition: background 0.25s ease, padding 0.25s ease, position 0.25s ease;
}

/* 히어로 사진이 없는 하위 페이지(list.html, post.html)는 헤더가 덧씌워질
   배경이 없으므로 처음부터 진한 배경을 깔아 흰 글자가 보이게 합니다.
   (스크롤 시 is-stuck이 아래 규칙에서 이 상태를 다시 덮어씁니다.) */
.site-header.solid {
  position: relative;
  background: var(--dark);
}

.site-header.is-stuck {
  position: fixed;
  max-width: 1200px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background: rgba(15, 42, 32, 0.68);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 16px var(--section-pad-x);
}

.brand {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.main-nav a {
  position: relative;
  color: #e7f0e2;
  transition: color 0.3s var(--ease-organic);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 1.5px;
  background: var(--light);
  transition: right 0.4s var(--ease-organic);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #fff;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  padding: 6px;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 21;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span {
  top: 15px;
}

.nav-toggle span::before {
  top: -8px;
}

.nav-toggle span::after {
  top: 8px;
}

.nav-toggle.is-open span {
  background: transparent;
}

.nav-toggle.is-open span::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Header search ---------- */

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: var(--light);
  flex: none;
  transition: background-color 0.3s var(--ease-organic), border-color 0.3s var(--ease-organic);
}

.search-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-toggle svg {
  width: 15px;
  height: 15px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  width: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  transition: width 0.35s var(--ease-organic), opacity 0.2s var(--ease-organic), padding 0.35s var(--ease-organic);
}

.search-form.is-open {
  width: 230px;
  opacity: 1;
  padding: 7px 8px 7px 16px;
}

.main-nav.nav-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-form svg {
  width: 15px;
  height: 15px;
  color: var(--light);
  flex: none;
}

.search-form input {
  border: none;
  background: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}

.search-form input::placeholder {
  color: rgba(231, 240, 226, 0.6);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  padding: 8px;
  z-index: 30;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.search-result-row:hover {
  background: var(--cream);
}

.search-result-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: #dce8d3;
  padding: 3px 8px;
  border-radius: 100px;
  flex: none;
  white-space: nowrap;
}

.search-result-label {
  font-size: 13.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  overflow: hidden;
}

@keyframes hero-kenburns {
  from {
    transform: scale(1.02) translate(0, 0);
  }
  to {
    transform: scale(1.12) translate(-1.5%, -1%);
  }
}

.hero-photo {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #163527, var(--dark));
  animation: hero-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-photo img,
.hero-photo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-photo img[data-loaded],
.hero-photo video[data-loaded] {
  opacity: 1;
  pointer-events: auto;
}

.hero-photo[data-media="video"] {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    animation: none;
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 30, 22, 0.35),
    rgba(10, 26, 19, 0.82)
  );
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 78%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 160%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(6, 18, 13, 0.55) 0%, rgba(6, 18, 13, 0.3) 45%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

@keyframes hero-appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge,
.hero-title,
.hero-sub,
.hero-actions {
  opacity: 0;
  animation: hero-appear 0.6s ease-out forwards;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #0f2a20;
  background: var(--light);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  animation-delay: 0.1s;
}

.hero-title .accent-serif {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0;
  background: linear-gradient(135deg, #fff2c9 0%, #ffc93c 60%, #ffb01a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ffc93c;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 0 18px rgba(255, 210, 90, 0.9), 0 0 42px rgba(255, 190, 60, 0.6);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.hero-sub {
  font-size: 16px;
  line-height: 1.7;
  color: #eaf3e5;
  max-width: 440px;
  margin: 0 0 40px;
  animation-delay: 0.2s;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation-delay: 0.3s;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 28px;
  border-radius: 100px;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-organic), background-color 0.4s var(--ease-organic),
    color 0.4s var(--ease-organic), box-shadow 0.4s var(--ease-organic);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(9, 26, 19, 0.22);
}

.btn-primary {
  background: linear-gradient(135deg, #f4d58a 0%, var(--glow) 55%, var(--glow-deep) 100%);
  color: #241605;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 4px 10px var(--glow-soft);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffe6ab 0%, var(--glow) 100%);
  color: #241605;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 6px 14px var(--glow-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge,
  .hero-title,
  .hero-sub,
  .hero-actions {
    animation: none;
    opacity: 1;
  }
}

/* ---------- Scroll reveal ----------
   [data-reveal] 요소는 기본적으로 항상 보이는 상태입니다 (JS가 없어도 안전).
   script.js가 IntersectionObserver를 지원을 확인하면 <html>에 reveal-ready를 붙이고,
   그때부터 화면에 들어오는 요소마다 is-visible을 추가해 서서히 떠오르게 합니다. */

html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-organic), transform 0.8s var(--ease-organic);
}

html.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section shell ---------- */

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.eyebrow.on-dark {
  color: var(--light);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 44px;
}

/* ---------- About ---------- */

.about {
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.placeholder-block {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 12px ui-monospace, "SFMono-Regular", monospace;
  color: #5b7a5f;
  text-align: center;
  background: repeating-linear-gradient(
    135deg,
    #dce8d3,
    #dce8d3 10px,
    #cfe0c4 10px,
    #cfe0c4 20px
  );
  border: 1px solid rgba(20, 35, 27, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.visit-map-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
}

.visit-map-address {
  font: 700 14px "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink-soft);
}

.visit-map-hint {
  font-size: 11px;
}

.placeholder-block img,
.course-icon img,
.news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-block img:not([data-loaded]) {
  display: none;
}

.about-photo {
  height: 240px;
}

.about-points {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
}

.about-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pt-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent);
}

.pt-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.about-point p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Schedule calendar ---------- */

.calendar-section {
  background:
    radial-gradient(circle at 12% 18%, rgba(63, 125, 92, 0.1), transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(224, 165, 60, 0.1), transparent 46%),
    #fff;
}

.calendar-widget {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 28px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 60px rgba(15, 42, 32, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 17px;
}

.cal-head button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(20, 35, 27, 0.12);
  background: none;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background-color 0.25s var(--ease-organic);
}

.cal-head button:hover {
  background: var(--cream);
}

.cal-head button svg {
  width: 13px;
  height: 13px;
}

table.cal-grid {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
}

.cal-grid th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 4px;
  border-bottom: 1px solid rgba(20, 35, 27, 0.08);
}

.cal-grid th:first-child {
  color: #c23b3b;
}

.cal-grid th:last-child {
  color: #2f6690;
}

.cal-grid td {
  vertical-align: top;
  border: 1px solid rgba(20, 35, 27, 0.06);
  height: 84px;
  padding: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.cal-grid td.muted {
  color: #c7cfc9;
}

.cal-daynum {
  font-variant-numeric: tabular-nums;
}

.cal-daynum.holiday,
.cal-daynum.sunday {
  color: #c23b3b;
  font-weight: 700;
}

.cal-daynum.saturday {
  color: #2f6690;
  font-weight: 700;
}

.cal-pill {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-pill.course {
  background: #dce8d3;
  color: var(--accent);
}

.cal-pill.event {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.cal-pill.holiday {
  background: #f6dede;
  color: #c23b3b;
}

.cal-scroll-hint {
  display: none;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}

.cal-legend {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.legend-dot.course {
  background: var(--accent);
}

.legend-dot.event {
  background: var(--warn-text);
}

.legend-dot.holiday {
  background: #c23b3b;
}

/* ---------- Courses ---------- */

.courses {
  position: relative;
  z-index: 0;
  background:
    radial-gradient(circle at 8% 15%, rgba(63, 125, 92, 0.16), transparent 45%),
    radial-gradient(circle at 92% 85%, rgba(224, 165, 60, 0.18), transparent 45%),
    #fff;
  overflow: hidden;
}

.courses::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(63, 125, 92, 0.22), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(224, 165, 60, 0.22), transparent 28%),
    radial-gradient(circle at 60% 80%, rgba(63, 125, 92, 0.16), transparent 32%);
  pointer-events: none;
  z-index: -1;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid rgba(20, 35, 27, 0.06);
}

.skeleton-block {
  border-radius: 8px;
  background: linear-gradient(90deg, #eceae1 25%, #f6f4ec 37%, #eceae1 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-card .skeleton-block.circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
}

.skeleton-card .skeleton-block.line-lg { height: 15px; width: 65%; }
.skeleton-card .skeleton-block.line-sm { height: 12px; width: 45%; }
.skeleton-card .skeleton-block.pill { height: 26px; width: 64px; border-radius: 100px; }

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-block { animation: none; }
}

.content-empty {
  font-size: 14px;
}

.courses .content-empty {
  grid-column: 1 / -1;
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.updates .content-empty {
  color: var(--notice-muted);
  padding: 8px 0;
}

.course-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 20px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid rgba(20, 35, 27, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s var(--ease-organic), box-shadow 0.4s var(--ease-organic),
    background-color 0.4s var(--ease-organic), border-color 0.4s var(--ease-organic);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 42, 32, 0.09);
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(224, 165, 60, 0.25);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.course-ribbon {
  position: absolute;
  top: 14px;
  right: -32px;
  transform: rotate(38deg);
  background: linear-gradient(135deg, var(--glow), var(--glow-deep));
  color: #241505;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 38px;
  box-shadow: 0 6px 14px rgba(224, 165, 60, 0.35);
}

.course-icon {
  position: relative;
  overflow: hidden;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: repeating-linear-gradient(
    45deg,
    #c9dcc0,
    #c9dcc0 6px,
    #b5cfa8 6px,
    #b5cfa8 12px
  );
}

.course-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.meta-line svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex: none;
}

.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--dark);
  padding: 8px 16px;
  border-radius: 100px;
  transition: transform 0.3s var(--ease-organic), background-color 0.3s var(--ease-organic);
}

.detail-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.detail-btn svg {
  width: 12px;
  height: 12px;
}

.badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: #dce8d3;
  padding: 5px 12px;
  border-radius: 100px;
}

.badge.warn {
  color: var(--warn-text);
  background: var(--warn-bg);
}

/* ---------- Notice & News ---------- */

.updates {
  background: var(--dark);
}

.updates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head-row .eyebrow {
  margin-bottom: 0;
}

.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(243, 241, 231, 0.35);
  color: var(--light);
  font-size: 15px;
  line-height: 1;
  transition: background-color 0.3s var(--ease-organic), color 0.3s var(--ease-organic),
    border-color 0.3s var(--ease-organic);
}

.more-link:hover {
  background: var(--light);
  color: var(--dark);
  border-color: var(--light);
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-list a.notice-row {
  transition: transform 0.3s var(--ease-organic), background-color 0.3s var(--ease-organic), border-color 0.3s var(--ease-organic);
}

.notice-list a.notice-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(224, 165, 60, 0.3);
}

.notice-title {
  font-size: 14.5px;
  color: var(--paper);
}

.notice-date {
  font-size: 11.5px;
  color: var(--notice-muted);
  white-space: nowrap;
  flex: none;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 10px;
  border-radius: 100px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-row {
  display: flex;
  gap: 14px;
  align-items: center;
  transition: opacity 0.2s ease;
}

.news-row:hover {
  opacity: 0.75;
}

.news-thumb {
  position: relative;
  overflow: hidden;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  flex: none;
  background: repeating-linear-gradient(
    135deg,
    #1e4a36,
    #1e4a36 6px,
    #173d2c 6px,
    #173d2c 12px
  );
}

.news-title {
  font-size: 14.5px;
  color: var(--paper);
  line-height: 1.4;
}

.yt-widget {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
}

.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #1e4a36, #1e4a36 8px, #173d2c 8px, #173d2c 16px);
  margin-bottom: 10px;
}

.yt-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-play span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(220, 40, 40, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-organic);
}

.yt-play:hover span {
  transform: scale(1.08);
}

.yt-play svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.yt-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f3f1e7;
  line-height: 1.4;
  margin: 0 0 12px;
}

.yt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yt-channel-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--light);
}

.yt-channel-link:hover {
  text-decoration: underline;
}

.yt-arrows {
  display: flex;
  gap: 6px;
}

.yt-arrows button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.yt-arrows svg {
  width: 12px;
  height: 12px;
}

/* ---------- Visit ---------- */

.visit {
  background: #fff;
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

/* 실제 지도(Google/Kakao Maps iframe)를 연동할 때 이 클래스를 iframe에 추가하면
   사이트 톤앤매너에 맞는 흑백/저채도 지도 스타일을 적용할 수 있습니다. */
.map-frame {
  filter: grayscale(1) contrast(1.05) brightness(1.02);
}

.visit-map {
  height: 280px;
}

.visit-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

.visit-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.visit-row .pt-icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.visit-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  min-width: 64px;
  padding-top: 1px;
}

.visit-value {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.visit-value a {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Instagram ---------- */

.instagram {
  background: var(--cream);
  text-align: center;
}

.instagram-marquee {
  overflow: hidden;
  width: 100%;
  margin: 0 auto 32px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.instagram-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: instagram-scroll 38s linear infinite;
}

.instagram-marquee:hover .instagram-track {
  animation-play-state: paused;
}

@keyframes instagram-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .instagram-track {
    animation: none;
  }
}

.instagram-tile {
  position: relative;
  overflow: hidden;
  flex: 0 0 150px;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
}

.instagram-visual {
  position: absolute;
  inset: 0;
  transition: transform 0.5s var(--ease-organic);
}

.instagram-tile:hover .instagram-visual {
  transform: scale(1.08);
}

.instagram-tile:nth-child(odd) .instagram-visual {
  background: repeating-linear-gradient(
    45deg,
    #dce8d3,
    #dce8d3 8px,
    #cfe0c4 8px,
    #cfe0c4 16px
  );
}

.instagram-tile:nth-child(even) .instagram-visual {
  background: repeating-linear-gradient(
    45deg,
    #c9dcc0,
    #c9dcc0 8px,
    #b5cfa8 8px,
    #b5cfa8 16px
  );
}

.instagram-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-visual img:not([data-loaded]) {
  display: none;
}

.instagram-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(15, 42, 32, 0.05), rgba(15, 42, 32, 0.6));
  color: #fff;
  opacity: 0;
  transition: opacity 0.35s var(--ease-organic);
}

.instagram-tile:hover .instagram-overlay {
  opacity: 1;
}

.instagram-overlay-icon {
  width: 22px;
  height: 22px;
}

.instagram-overlay-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}

.instagram-overlay-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.instagram-overlay-stats svg {
  width: 13px;
  height: 13px;
}

.instagram-handle {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 24px;
}

.btn-follow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--cream);
  background: var(--dark);
  padding: 13px 30px;
  border-radius: 100px;
}

.btn-follow:hover {
  opacity: 0.9;
}

/* ---------- List / Post pages (공지사항·소식 전체보기 및 상세) ---------- */

.list-page,
.post-page {
  background: #fff;
}

.post-page {
  max-width: 760px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

.back-link:hover {
  text-decoration: underline;
}

.full-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(20, 35, 27, 0.08);
  transition: opacity 0.2s ease;
}

.list-row:hover {
  opacity: 0.65;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.list-row-thumb {
  position: relative;
  overflow: hidden;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex: none;
  background: repeating-linear-gradient(135deg, #dce8d3, #dce8d3 8px, #cfe0c4 8px, #cfe0c4 16px);
}

.list-row-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-row-title {
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 500;
}

.list-row-date {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -28px 0 32px;
}

.post-meta-text {
  font-size: 13.5px;
  color: var(--muted);
}

.post-date {
  font-size: 13px;
  color: var(--muted);
  margin: -28px 0 32px;
}

.post-period {
  font-size: 13px;
  color: var(--muted);
  margin: -18px 0 32px;
}

.post-image {
  height: 320px;
  margin-bottom: 32px;
}

.post-content {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  white-space: pre-line;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 28px var(--section-pad-x);
  background: var(--ink);
  font-size: 12px;
  color: var(--notice-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  :root {
    --section-pad-x: 32px;
    --section-pad-y: 76px;
  }

  /* 브랜드 로고/햄버거 버튼과 겹치지 않도록, 검색창이 열리면 헤더 아래로
     내려와 폭 전체를 사용하는 드롭다운 형태로 바뀝니다. */
  .search-box {
    position: static;
  }

  .search-form.is-open {
    position: absolute;
    top: 100%;
    left: var(--section-pad-x);
    right: var(--section-pad-x);
    width: auto;
    margin-top: 10px;
  }

  .search-results {
    left: var(--section-pad-x);
    right: var(--section-pad-x);
    width: auto;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 78vw);
    background: #0f2a20;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 19;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: block;
  }

  .about-grid,
  .visit-grid {
    grid-template-columns: 1fr;
  }

  .course-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .course-card {
    padding: 14px 6px;
    gap: 6px;
    border-radius: 10px;
  }

  .course-ribbon {
    top: 8px;
    right: -26px;
    font-size: 8px;
    padding: 3px 30px;
    white-space: nowrap;
  }

  .course-icon {
    width: 52px;
    height: 52px;
  }

  .course-name {
    font-size: 11.5px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .course-card .meta-row {
    display: none;
  }

  .course-card .badge {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  .course-card .detail-btn {
    font-size: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    margin-top: 0;
  }

  .course-card .detail-btn svg {
    width: 12px;
    height: 12px;
  }

  .course-card.course-card-extra {
    display: none;
  }

  .course-grid.course-grid-expanded .course-card.course-card-extra {
    display: flex;
  }

  .course-more-btn {
    display: block;
    margin: 20px auto 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: #dce8d3;
    padding: 10px 24px;
    border-radius: 100px;
  }

  .updates-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .instagram-tile {
    flex: 0 0 110px;
    width: 110px;
  }

  .site-footer {
    flex-direction: column;
  }

  .calendar-widget {
    padding: 20px 16px;
  }

  table.cal-grid {
    min-width: 480px;
  }

  .cal-grid td {
    padding: 6px 4px;
    height: 72px;
    font-size: 11.5px;
  }

  .cal-scroll-hint {
    display: block;
  }
}
