/* ===== 디자인 시스템 — 4색 테마 · 에디토리얼 · 각진 형태 =====
   바탕은 흰색, 타이틀·본문은 먹색. 색은 img/main_info.jpg 원안의 네 가지
   — 연두 / 하늘 / 민트 / 보라 — 만 쓴다.
     · 하늘(--brand-*)이 대표색. 버튼·링크·탭·포커스 등 뼈대를 전부 맡는다.
     · 나머지 3색은 성격이 다른 영역을 구분할 때만 꺼낸다.
       보라=후원·돌봄 부서, 민트=병원·운영, 연두=교육·활동.
   색마다 기본 / strong(흰 글씨용) / ink(색 위 글자용) / line / tint 다섯 단계가
   있고, 어떤 조합을 써도 대비 4.5:1을 넘도록 값을 잡아 두었다.
   형태는 그대로 — 각진 모서리, 헤어라인 테두리, 아주 옅은 그림자. */
:root {
  /* ---- 중립 스케일 ----
     타이틀은 블랙, 바탕은 화이트. 4색은 액센트로만 얹는다. */
  --ink-900: #111315;   /* 타이틀 — 블랙 */
  --ink-700: #2c3237;   /* 본문 */
  --ink-500: #59626a;   /* 보조 텍스트 */
  --ink-300: #6e777f;   /* 흐린 텍스트 — 흰 바탕 대비 4.5:1을 지키는 선 */
  --paper:   #ffffff;   /* 페이지·카드 표면 */
  --paper-2: #f4f7f8;   /* 섹션 틴트 */
  --line:    #e4e9ec;   /* 헤어라인 */
  --line-2:  #cfd6db;   /* 강한 구분선 */

  /* ---- 테마 4색 (img/main_info.jpg 원안) ----
     색마다 다섯 단계를 둔다.
       기본   원안 색 그대로. 넓은 면·뱃지·아이콘.
       strong 흰 글씨를 얹어도 4.5:1 이상 나오는 톤. 버튼·보더.
       ink    기본색 위에 얹는 글자색(5:1 이상). 흰 바탕 텍스트로도 씀.
       line   테두리,  tint 옅은 배경. */
  --care-green:  #a8d151;  --care-green-strong:  #5b7d18;  --care-green-ink:  #2f4409;  --care-green-line:  #dfeec0;  --care-green-tint:  #f1f8e2;
  --care-blue:   #64badd;  --care-blue-strong:   #1a7a9e;  --care-blue-ink:   #0d3d52;  --care-blue-line:   #cfe9f4;  --care-blue-tint:   #e8f5fa;
  --care-mint:   #5bd3c9;  --care-mint-strong:   #0f7d73;  --care-mint-ink:   #0a423d;  --care-mint-line:   #c9eeea;  --care-mint-tint:   #e6f8f6;
  --care-violet: #af97d5;  --care-violet-strong: #6b53a8;  --care-violet-ink: #33235e;  --care-violet-line: #e3daf1;  --care-violet-tint: #f2eefa;

  /* ---- 대표색: 하늘 ----
     사이트의 뼈대(버튼·링크·탭·포커스)는 전부 이 계열 하나로 통일한다.
     나머지 3색은 섹션 성격을 구분할 때만 꺼내 쓴다. */
  --brand:        var(--care-blue);
  --brand-strong: var(--care-blue-strong);
  --brand-deep:   var(--care-blue-ink);
  --brand-line:   var(--care-blue-line);
  --brand-tint:   var(--care-blue-tint);

  /* 돌봄안내 라일락 — img/guide.png 원안 팔레트. 그 페이지 카드 전용이라
     테마 4색과 별개로 유지한다. */
  --lilac:       #b469ac;
  --lilac-dark:  #a8549f;
  --lilac-line:  #e7d2ea;
  --lilac-tint:  #f8f2f9;
  --lilac-ink:   #6b5a70;

  /* ---- 의미 별칭 ---- */
  --text-primary: var(--ink-700); --text-secondary: var(--ink-500); --text-muted: var(--ink-300);

  /* ---- Fonts ----
     Apple SD Gothic Neo is an Apple system font (macOS/iOS only).
     Pretendard is loaded as the closest-matching web fallback for other platforms. */
  --font-sans: 'Apple SD Gothic Neo', 'AppleSDGothicNeo-Regular', 'Pretendard Variable', Pretendard, 'Malgun Gothic', '맑은 고딕', system-ui, -apple-system, sans-serif;
  --font-serif: var(--font-sans);

  /* ---- Depth & motion ---- */
  --card-shadow: 0 1px 2px rgba(17, 27, 34, 0.04), 0 12px 30px rgba(17, 27, 34, 0.06);
  --card-shadow-hover: 0 2px 4px rgba(17, 27, 34, 0.06), 0 20px 44px rgba(17, 27, 34, 0.10);
  --transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 3px;
  --radius-sm: 2px;
  --radius-lg: 4px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #fff;
  line-height: 1.75;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button { cursor: pointer; border: none; font-family: inherit; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Typography ===== */
.serif { font-family: var(--font-serif); }

h1, h2, h3, h4 { line-height: 1.3; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ladderGrow {
  from { height: 0; opacity: 0; }
  to { height: 100%; opacity: 0.08; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 모션을 줄여 달라고 설정한 사용자에게는 등장 효과 없이 바로 보여준다.
   (효과가 걸린 채로 두면 스크롤 때마다 화면이 밀려 올라와 어지럽다) */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(17, 27, 34, 0.06);
}

/* Home page starts with a full-bleed banner, so it must clear the fixed
   header itself (subpages clear it via .page-hero's top padding).
   Match these offsets to .nav height at each breakpoint. */
body.is-home { padding-top: 88px; }
@media (max-width: 1024px) { body.is-home { padding-top: 80px; } }
@media (max-width: 768px)  { body.is-home { padding-top: 64px; } }

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

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  position: relative;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .brand {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.5px;
}

.logo-text .sub {
  font-size: 21px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  display: block;
  padding: 12px 28px;
  font-size: 25px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 8px;
  position: relative;
}

.nav-links > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--brand-strong);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links > li > a:hover {
  color: var(--brand-deep);
}

.nav-links > li > a:hover::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-links li .dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(17, 27, 34, 0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.nav-links li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 23px;
  color: var(--text-secondary);
}

.dropdown a:hover {
  background: var(--line);
  color: var(--brand-deep);
}

/* Wrapper is transparent on desktop so nav-links + nav-cta flow inside .nav;
   on mobile it becomes the single dropdown panel (see mobile media query). */
.nav-menu {
  display: contents;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Flat, sharp, editorial buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-strong);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}

/* Donation CTA (후원하기) — clay accent */
.nav-cta .btn-primary { background: var(--care-violet-strong); }
.nav-cta .btn-primary:hover { background: var(--care-violet-ink); }

/* Donation inquiry button (후원안내 page) — clay outline */
.donation-inquiry .btn-outline {
  border-color: var(--care-violet-strong);
  color: var(--care-violet-ink);
}

.donation-inquiry .btn-outline:hover {
  background: var(--care-violet-strong);
  border-color: var(--care-violet-strong);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--line-2);
  color: var(--ink-700);
  background: transparent;
}

.btn-outline:hover {
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-color: var(--brand-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.btn-ghost:hover {
  background: var(--brand-line);
  color: var(--ink-900);
}

/* Card-news CTA colour variants (admin-selectable) — 테마 4색 */
.btn-green,
.btn-pink,
.btn-yellow,
.btn-brown { color: #fff; }
.btn-green:hover,
.btn-pink:hover,
.btn-yellow:hover,
.btn-brown:hover { transform: translateY(-1px); filter: brightness(0.94); }
.btn-green  { background: var(--brand-strong); }
.btn-pink   { background: var(--care-violet-strong); }
.btn-yellow { background: var(--care-green-strong); }
.btn-brown  { background: var(--ink-900); }

/* Mobile menu button */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 72px 0 80px;
  background: #fff;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
  width: 100%;
}

/* Card News Slider (Hero Left) */
.hero-card-news {
  animation: fadeInUp 0.8s ease forwards;
  position: relative;
  display: flex;
  flex-direction: column;
  /* 1fr is minmax(auto, 1fr), so without this the slide track's min-content
     (the sum of every slide's width) becomes the floor for the hero column
     and blows the two-column layout apart. */
  min-width: 0;
}



.card-news-viewport {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  flex: 1;
  min-width: 0;
}

.card-news-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  height: 100%;
  /* Keeps the composited layer from leaving a hairline seam at the edges.
     Slide widths are pixel-snapped in JS for the same reason. */
  backface-visibility: hidden;
}

.card-news-slide {
  min-width: 100%;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;

  /* Ink palette (admin-selectable). Every text colour below resolves from
     these custom properties, so a palette class only re-points them. */
  --cn-title: var(--ink-900);
  --cn-sub: var(--text-secondary);
  --cn-desc: var(--text-secondary);
  --cn-badge-bg: var(--brand-deep);
  --cn-badge-fg: #ffffff;
  --cn-scrim-rgb: 250, 246, 240;
}

/* Background color variants */
/* Card-news background presets (admin-selectable) */
.card-news-slide--purple {
  background: linear-gradient(160deg, var(--care-violet-line) 0%, var(--care-violet-tint) 100%);
}

.card-news-slide--blue {
  background: linear-gradient(160deg, var(--care-blue-line) 0%, var(--care-blue-tint) 100%);
}

.card-news-slide--mint {
  background: linear-gradient(160deg, var(--care-mint-line) 0%, var(--care-mint-tint) 100%);
}

.card-news-slide--transparent {
  background: transparent;
}

/* ---- Text palettes ----
   'ink' is the default declared on .card-news-slide above. Ivory flips the
   photo scrim to espresso so light type keeps its contrast. */
.card-news-slide--sienna {
  --cn-title: var(--brand-deep);
  --cn-sub: var(--brand-strong);
  --cn-desc: var(--ink-500);
  --cn-badge-bg: var(--brand-strong);
}

.card-news-slide--clay {
  --cn-title: var(--care-violet-ink);
  --cn-sub: var(--care-violet-strong);
  --cn-desc: var(--ink-500);
  --cn-badge-bg: var(--care-violet-strong);
}

.card-news-slide--ivory {
  --cn-title: var(--paper);
  --cn-sub: rgba(255, 255, 255, 0.84);
  --cn-desc: rgba(255, 255, 255, 0.92);
  --cn-badge-bg: rgba(255, 255, 255, 0.2);
  --cn-badge-fg: var(--paper);
  --cn-scrim-rgb: 42, 32, 22;
}

/* Outline buttons invert with the ivory palette so they stay visible. */
.card-news-slide--ivory .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--paper);
}

.card-news-slide--ivory .btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--paper);
  color: var(--paper);
}

/* Uploaded background photo (text-type slides only).
   The photo comes in as an inline background-image; --cn-overlay carries the
   admin-set scrim strength so the type stays readable over any picture. */
.card-news-slide--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-news-slide--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(var(--cn-scrim-rgb), var(--cn-overlay, 0.4));
  pointer-events: none;
  z-index: 0;
}

.card-news-slide--photo > * {
  position: relative;
  z-index: 1;
}


/* Original hero styles inside card news */
.card-news-slide .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--cn-badge-bg);
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  color: var(--cn-badge-fg);
  margin-bottom: 16px;
  align-self: flex-start;
}

.card-news-slide .hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cn-badge-fg);
}

.card-news-slide h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--cn-title);
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.card-news-slide h1 .hero-title-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.5vw, 31px);
  font-weight: 600;
  color: var(--cn-sub);
  letter-spacing: 2px;
  margin-bottom: 12px;
  -webkit-text-fill-color: unset;
  background: none;
}

.card-news-slide h1 em {
  font-style: normal;
  font-size: clamp(35px, 4.5vw, 56px);
  color: var(--cn-title);
}

.card-news-slide .hero-desc {
  font-size: 19px;
  line-height: 1.8;
  color: var(--cn-desc);
  margin-bottom: 32px;
  max-width: 520px;
}

.card-news-slide .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- Video-type card news slide ----
   The whole card is the player: poster frame + one play target. */
.card-news-slide--video {
  padding: 0;
  background: var(--ink-900);
}

.card-news-play {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.card-news-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sharp badge — matches the flat, near-square editorial language. */
.card-news-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 27, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.card-news-play:hover .card-news-play-badge,
.card-news-play:focus-visible .card-news-play-badge {
  background: var(--brand-deep);
  border-color: var(--paper);
}

.card-news-play-icon {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #ffffff;
}

/* Player panel fills the card while the video is open. */
.card-news-video {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000000;
}

.card-news-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.card-news-video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.card-news-video-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Image-type card news slide */
.card-news-slide--image {
  color: white;
  padding: 0;
}

.card-news-slide--image::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

.card-news-image-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 48px 40px;
  position: relative;
  z-index: 1;
}

.card-news-image-icon {
  font-size: 60px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.card-news-image-text {
  max-width: 440px;
}

.card-news-image-label {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.card-news-image-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(31px, 3.5vw, 41px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: white;
}

.card-news-image-text p {
  font-size: 23px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 28px;
}

.card-news-image-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 21px;
  font-weight: 600;
  transition: var(--transition);
}

.card-news-image-cta:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* Controls */
.card-news-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.card-news-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--text-primary);
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.card-news-arrow:hover {
  background: var(--brand-strong);
  color: white;
  border-color: var(--brand-strong);
}

.card-news-dots {
  display: flex;
  gap: 8px;
}

.card-news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
  border: none;
  padding: 0;
  transition: var(--transition);
  cursor: pointer;
}

.card-news-dot.active {
  background: var(--brand-strong);
  width: 24px;
  border-radius: 4px;
}

.card-news-pause {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--text-primary);
  font-size: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.card-news-pause:hover {
  background: var(--brand-strong);
  color: white;
  border-color: var(--brand-strong);
}

.card-news-pause.paused {
  background: var(--brand-tint);
  border-color: var(--brand-line);
  color: var(--brand-strong);
}

.hero-visual {
  position: relative;
  animation: fadeIn 1s ease 0.3s forwards;
  opacity: 0;
  display: flex;
  /* 좌측 카드뉴스는 박스 아래에 도트 컨트롤(8px + margin-top 16px)이 붙는다.
     오른쪽도 같은 만큼 비워둬야 이미지 바닥이 카드뉴스 박스 바닥과 맞는다. */
  padding-bottom: 24px;
}

/* 히어로 오른쪽 안내 이미지. height 100%로 좌측 카드뉴스와 높이를 맞추고,
   contain으로 비율은 유지한다(높이가 남으면 잘리는 대신 가로가 줄어든다). */
.hero-info-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  align-self: center;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 16px;
  flex: 1;
}

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--care-violet-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(17, 27, 34, 0.08);
  border-color: var(--line-2);
}

.hero-card:hover::before {
  transform: scaleX(1);
}

.hero-card-icon {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 29px;
  margin-bottom: 14px;
}

.hero-card:nth-child(1) .hero-card-icon { background: var(--brand-strong); }
.hero-card:nth-child(2) .hero-card-icon { background: var(--brand-deep); }
.hero-card:nth-child(3) .hero-card-icon { background: var(--care-violet-strong); }
.hero-card:nth-child(4) .hero-card-icon { background: var(--care-green-strong); }

.hero-card-icon img,
.service-icon img,
.donation-icon img,
.contact-item-icon img,
.map-icon img { display: block; }

/* Card icons: larger glyphs, white lines on dark-brown badge.
   돌봄 카드 아이콘은 원본 색이 들어간 PNG라 여기서 제외한다. */
.hero-card-icon img,
.donation-icon img,
.contact-item-icon img {
  filter: brightness(0) invert(1);
}
.hero-card-icon img { width: 46px; height: 46px; }
.service-icon img { width: auto; height: 61px; }
.donation-icon img { width: 58px; height: 58px; }
.contact-item-icon img { width: 30px; height: 30px; }


.hero-card h4 {
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-card p {
  font-size: 21px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--paper-2), var(--paper));
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}

.hero-card.featured .hero-card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.hero-card.featured .featured-text h4 { margin-bottom: 2px; }
.hero-card.featured .featured-text p { line-height: 1.5; }
.hero-card.featured .featured-text a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.hero-card.featured .featured-text a:hover { color: var(--brand-deep); }

/* ===== Notice Sticky Bar ===== */
/* ===== Notice Section ===== */
.notice-section {
  padding: 56px 0 64px;
  background: #fff;
}

.notice-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: var(--transition);
}

.notice-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.notice-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-label-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notice-label-icon img {
  display: block;
  filter: brightness(0) invert(1);
}

.notice-label-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

.notice-more {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.notice-more:hover {
  color: var(--brand-strong);
  background: var(--brand-tint);
}

.notice-more-arrow {
  transition: transform 0.3s ease;
}

.notice-more:hover .notice-more-arrow {
  transform: translateX(3px);
}

.notice-body {
  padding: 6px 0;
}

.notice-slider {
  overflow: hidden;
  position: relative;
  height: 56px;
}

.notice-track {
  display: flex;
  flex-direction: column;
}

.notice-item {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
  gap: 14px;
}

.notice-item-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  transition: var(--transition);
}

.notice-item-link:hover .notice-item-title {
  color: var(--brand-strong);
}

.notice-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-strong);
  opacity: 0.5;
  flex-shrink: 0;
}

.notice-item-tag {
  font-size: 16px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.notice-item-title {
  font-size: 19px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

/* ===== Section Styles ===== */
.section {
  padding: 100px 0;
}

/* Divider between adjacent sections (e.g. 조직도 ↔ 걸어온 길) */
.section-divider span {
  display: block;
  height: 1px;
  background: var(--line-2);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 21px;
  font-weight: 600;
  color: var(--brand-strong);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.section-tag::before,
.section-tag::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--brand-line);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(33px, 3.5vw, 45px);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 21px;
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto;
}

/* ===== Services Section ===== */
.services {
  background: #fff;
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-line), transparent);
}

/* ---- 돌봄 카드 (img/guide.png 원안 재현) ----
   원본은 폭 3000px 안에 485px 카드 5장 + 84px 간격. 아래 치수는 모두 그 비율을
   컨테이너 폭(1376px)에 맞춰 0.5배 가까이 줄인 값이다. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 42px;
}

.service-card {
  /* 카드마다 색만 갈아끼운다. line은 테두리·제목·아이콘, text는 본문(조금 더 진하다). */
  --care-line: #c7a0cc;
  --care-text: #be92c5;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 31px 0 30px;
  text-align: center;
  transition: var(--transition);
}

/* 원본 테두리는 닫힌 사각형이 아니라 위아래만 남긴 브래킷이다. 옆면 가운데가
   비어 있고, 아래쪽 선(10px)이 위쪽(6px)보다 두꺼워 무게가 아래로 쏠린다. */
.service-card::before,
.service-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  border: 0 solid var(--care-line);
  pointer-events: none;
}

.service-card::before {
  top: 0;
  height: 47px;
  border-width: 6px 6px 0;
  border-radius: 25px 25px 0 0;
}

.service-card::after {
  bottom: 0;
  height: 43px;
  border-width: 0 6px 10px;
  border-radius: 0 0 25px 25px;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* 아이콘은 뱃지 없이 선화만 놓는다. 잘라낸 PNG의 여백까지 포함한 높이라
   원본 카드별 아이콘 크기 차이가 그대로 유지된다. */
.service-icon {
  margin-bottom: 22px;
}

.service-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--care-line);
}

.service-card p {
  /* 원본 본문은 가운데가 아니라 왼쪽 정렬이고 좌우로 카드 폭의 12.8%씩 들어가 있다. */
  align-self: stretch;
  margin: 0 12.8%;
  text-align: left;
  font-size: 18px;
  line-height: 1.48;
  color: var(--care-text);
}

/* 본문 길이가 달라도 마크는 카드 바닥에서 같은 높이에 오도록 밀어낸다. */
.service-mark {
  display: block;
  width: 22px;
  height: auto;
  margin-top: auto;
  padding-top: 18px;
}

.service-card:nth-child(1) { --care-line: #c7a0cc; --care-text: #be92c5; }
.service-card:nth-child(2) { --care-line: #c78fc0; --care-text: #be7db5; }
.service-card:nth-child(3) { --care-line: #b28abf; --care-text: #a779b7; }
.service-card:nth-child(4) { --care-line: #b47ab4; --care-text: #a966a9; }
.service-card:nth-child(5) { --care-line: #b469ac; --care-text: #a8549f; }

/* ===== About / Intro Section ===== */
.about {
  background: #fff;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--care-blue), var(--care-blue-strong));
}

/* Whole "걸어온 길" banner is a click target → jumps to bottom of history */
.about-visual-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}

.about-visual-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  text-align: center;
  padding: 40px;
}

.about-visual-inner .year {
  font-family: var(--font-serif);
  font-size: 76px;
  font-weight: 700;
  opacity: 0.3;
  line-height: 1;
}

.about-visual-inner h3 {
  font-family: var(--font-serif);
  font-size: 35px;
  font-weight: 600;
  margin-top: -10px;
}

.about-visual-inner p {
  font-size: 23px;
  opacity: 0.85;
  margin-top: 12px;
}

.about-stats {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
}

.stat-chip {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 12px 16px;
  flex: 1;
  text-align: center;
  color: white;
}

.stat-chip .num {
  font-size: 29px;
  font-weight: 700;
  display: block;
}

.stat-chip .label {
  font-size: 21px;
  opacity: 0.85;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: 37px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ink-900);
}

.about-text h2 em {
  font-style: normal;
  color: var(--brand-strong);
}

.about-text p {
  font-size: 21.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}

/* 부서 네 개를 img/main_info.jpg 돌봄 4색으로 나눠 칠한다.
   교육 카드 배너와 같은 토큰이라 두 페이지가 같은 색 순서를 공유한다. */
.about-feature {
  --f: var(--care-green);
  --f-ink: var(--care-green-ink);
  --f-tint: var(--care-green-tint);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--f-tint);
  color: var(--f-ink);
  border-radius: var(--radius-sm);
  font-size: 21px;
  font-weight: 500;
}

.about-feature:nth-child(1) { --f: var(--care-green);  --f-ink: var(--care-green-ink);  --f-tint: var(--care-green-tint); }
.about-feature:nth-child(2) { --f: var(--care-blue);   --f-ink: var(--care-blue-ink);   --f-tint: var(--care-blue-tint); }
.about-feature:nth-child(3) { --f: var(--care-mint);   --f-ink: var(--care-mint-ink);   --f-tint: var(--care-mint-tint); }
.about-feature:nth-child(4) { --f: var(--care-violet); --f-ink: var(--care-violet-ink); --f-tint: var(--care-violet-tint); }

.about-feature .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--f);
  color: var(--f-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Staff Section ===== */
.staff {
  background: #fff;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.staff-card {
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.staff-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--card-shadow);
  transform: translateY(-4px);
}

.staff-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--care-blue), var(--care-blue-strong));
}

.staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.staff-photo-placeholder svg {
  width: 44px;
  height: 44px;
}

.staff-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.staff-position {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--brand-strong);
  margin-bottom: 2px;
}

.staff-department {
  display: block;
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 2px;
}

.staff-bio {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.6;
}

/* ===== Department Leads (부서장) =====
   넓은 화면은 부서/이름 2행 표, 1024px 이하는 같은 내용을 세로 2열 표로 교체.
   9개 부서를 한 줄에 넣으면 좁은 폭에서 부서명이 깨져 두 벌을 두고 전환한다 */
.dept-leads {
  background: #fff;
}

.dl-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid var(--line-2);
}

.dl-table th,
.dl-table td {
  padding: 16px 8px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
}

/* 행 머리 — 부서 / 이름 */
.dl-table--wide th[scope="row"] {
  width: 96px;
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
  font-weight: 700;
}

/* 1행: 부서명 */
.dl-table--wide tbody tr:first-child td {
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-weight: 600;
}

/* 2행: 부서장 이름 */
.dl-table--wide tbody tr:last-child td {
  color: var(--text-primary);
  font-weight: 500;
}

.dl-table--narrow {
  display: none;
  max-width: 460px;
  margin: 0 auto;
}

.dl-table--narrow thead th {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
  font-weight: 700;
}

.dl-table--narrow tbody td:first-child {
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-weight: 600;
}

.dl-table--narrow tbody td:last-child {
  font-weight: 500;
}

@media (max-width: 1024px) {
  .dl-table--wide { display: none; }
  .dl-table--narrow { display: table; }
}

@media (max-width: 480px) {
  .dl-table th,
  .dl-table td { padding: 13px 8px; font-size: 17px; }
}

/* ===== 자료실 (Archive board) =====
   목록은 번호·제목·첨부·등록일·조회 5열 표. 첨부파일은 private 디스크에 있어
   목록에서는 개수만 보여주고 실제 내려받기는 상세 페이지에서만 한다 */
.archive-section {
  background: #fff;
}

.archive-board {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
}

.archive-row {
  display: grid;
  grid-template-columns: 76px 1fr 76px 116px 76px;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.archive-row:first-child {
  border-top: none;
}

.archive-row--head {
  background: var(--brand-strong);
  border-top: none;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
}

.archive-row:not(.archive-row--head):hover {
  background: var(--paper);
}

.ar-num,
.ar-files,
.ar-date,
.ar-views {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
}

.archive-row--head .ar-num,
.archive-row--head .ar-files,
.archive-row--head .ar-date,
.archive-row--head .ar-views,
.archive-row--head .ar-title {
  font-size: 17px;
  color: #fff;
}

.ar-title {
  min-width: 0;
  font-size: 18px;
}

.ar-title a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-primary);
}

.ar-title a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.ar-clip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 15px;
  color: var(--brand-strong);
}

.ar-clip svg {
  width: 15px;
  height: 15px;
}

.archive-empty {
  padding: 64px 20px;
  text-align: center;
  font-size: 18px;
  color: var(--text-muted);
}

.archive-pagination {
  margin-top: 28px;
}

/* ----- 자료실 상세 ----- */
.archive-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 32px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}

.archive-detail-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.archive-detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.archive-detail-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-muted);
}

.archive-files {
  padding: 18px;
  margin-bottom: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.archive-files-title {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
}

.archive-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.archive-file {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.archive-file:hover {
  background: var(--brand-tint);
  border-color: var(--brand-strong);
}

.archive-file-ext {
  padding: 3px 8px;
  background: var(--brand-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

/* 파일명은 공백 없는 긴 이름이 흔해 어디서든 끊을 수 있게 둔다 */
.archive-file-name {
  min-width: 0;
  font-size: 17px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.archive-file-size {
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
}

.archive-file-action {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-deep);
  white-space: nowrap;
}

.archive-detail-body {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.archive-detail-empty {
  color: var(--text-muted);
}

.archive-detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.archive-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.archive-nav-item--next {
  text-align: right;
}

.archive-nav-item--off {
  opacity: 0.5;
}

a.archive-nav-item:hover {
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

.archive-nav-label {
  font-size: 15px;
  color: var(--text-muted);
}

.archive-nav-title {
  font-size: 17px;
  color: var(--text-primary);
}

.archive-detail-actions {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

@media (max-width: 768px) {
  /* 열 머리를 감추고 한 행을 제목 + 메타 두 줄로 접는다.
     아래 .archive-row와 특정도가 같아 감추는 규칙이 뒤에 와야 이긴다 */
  .archive-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 15px 16px;
  }

  .archive-row--head { display: none; }

  .ar-num { display: none; }

  .ar-title {
    order: 1;
    flex: 1 1 100%;
    font-size: 17px;
  }

  .ar-title a { white-space: normal; }

  .ar-files { order: 2; }

  .ar-date {
    order: 3;
    margin-left: auto;
  }

  .ar-views { order: 4; }

  .archive-detail { padding: 26px 20px; }
  .archive-detail-title { font-size: 23px; }
  .archive-detail-body { font-size: 17px; }

  .archive-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
  }

  .archive-file-name { flex: 1 1 60%; }
  .archive-file-size { font-size: 14px; }
  .archive-file-action { margin-left: auto; }

  .archive-detail-nav { grid-template-columns: 1fr; }
  .archive-nav-item--next { text-align: left; }
}

/* ===== History Timeline Section ===== */
.history {
  background: #fff;
}

.history-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-line), var(--line-2));
}

.history-year-group {
  margin-bottom: 40px;
}

.history-year-group:last-child {
  margin-bottom: 0;
}

.history-year-marker {
  position: relative;
  margin-bottom: 16px;
}

.history-year-marker::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-strong);
  border: 3px solid var(--paper-2);
  box-shadow: 0 0 0 2px var(--brand-line);
}

.history-year {
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 700;
  color: var(--brand-strong);
}

.history-entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-entry {
  display: flex;
  gap: 16px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.history-entry:hover {
  border-color: var(--brand-line);
  box-shadow: var(--card-shadow);
}

.history-entry-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.history-entry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-entry-content h4 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.history-entry-content p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Process Section ===== */
.process {
  background: #fff;
}

/* Care process (돌봄안내) — pink tag */
.process .section-tag { color: var(--care-violet-strong); }
.process .section-tag::before,
.process .section-tag::after { background: var(--care-violet-line); }

.process-timeline {
  display: flex;
  gap: 0;
  position: relative;
  padding: 0 40px;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--care-violet-line);
}

.process-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 80px;
}

/* 단계 번호는 처음부터 색을 채워 둔다. 호버로만 채우면 마우스를 올린
   하나만 보이고 터치 기기에서는 아예 드러나지 않아, 연결선 위에서 순서가
   읽히지 않았다. */
.process-step .step-dot {
  --step: var(--care-blue-strong);
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--step);
  border: 3px solid var(--step);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}

/* 번호마다 다른 색. 1~4는 테마 4색을 색상환 순서(연두→민트→하늘→보라)로
   얹고, 5·6(임종·사별)은 같은 계열의 ink 톤으로 내려 마무리 단계임을
   색의 깊이로도 드러낸다. 여섯 색 모두 흰 숫자 대비 4.5:1 이상. */
.process-step:nth-child(1) .step-dot { --step: var(--care-green-strong); }   /* #5b7d18 · 4.8:1 */
.process-step:nth-child(2) .step-dot { --step: var(--care-mint-strong); }    /* #0f7d73 · 5.0:1 */
.process-step:nth-child(3) .step-dot { --step: var(--care-blue-strong); }    /* #1a7a9e · 4.9:1 */
.process-step:nth-child(4) .step-dot { --step: var(--care-violet-strong); }  /* #6b53a8 · 6.1:1 */
.process-step:nth-child(5) .step-dot { --step: var(--care-mint-ink); }       /* #0a423d · 13:1  */
.process-step:nth-child(6) .step-dot { --step: var(--care-violet-ink); }     /* #33235e · 14:1  */

.process-step h4 {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 8px;
}

.process-step p {
  font-size: 21px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 10px;
}

/* ===== Education Section ===== */
.education {
  background: #fff;
  position: relative;
  overflow: hidden;
}


.edu-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* 교육 카드 배너 색은 img/main_info.jpg의 돌봄 4색을 그대로 쓴다.
   --edu는 원본 색, --edu-ink는 그 위에 얹는 글자색(같은 계열을 어둡게 눌러
   흰 글씨로는 얻을 수 없는 대비 5:1 이상을 확보한다), --edu-line은 카드 테두리. */
.edu-card {
  --edu: var(--care-green);
  --edu-ink: var(--care-green-ink);
  --edu-line: var(--care-green-line);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--edu-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.edu-card:nth-child(1) { --edu: var(--care-green);  --edu-ink: var(--care-green-ink);  --edu-line: var(--care-green-line); }
.edu-card:nth-child(2) { --edu: var(--care-blue);   --edu-ink: var(--care-blue-ink);   --edu-line: var(--care-blue-line); }
.edu-card:nth-child(3) { --edu: var(--care-mint);   --edu-ink: var(--care-mint-ink);   --edu-line: var(--care-mint-line); }
.edu-card:nth-child(4) { --edu: var(--care-violet); --edu-ink: var(--care-violet-ink); --edu-line: var(--care-violet-line); }

.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.edu-card-img {
  height: 180px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--edu);
}

.edu-card-img-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--edu-ink);
  text-align: center;
  padding: 0 14px;
}

/* 배너의 주역은 한글 제목. 긴 이름은 어절 단위로만 접어 두 줄이 되어도
   배너 안에서 균형이 무너지지 않게 한다. */
.edu-card-ko {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

/* 한글 아래 받치는 영문 워드마크. 두 줄로 끊어 좁은 카드에서도
   자간을 넉넉히 유지한다. */
.edu-card-en {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.14em;
  /* 자간은 마지막 글자 뒤에도 붙는다. 그만큼 상자를 줄여야 두 줄 모두
     배너 한가운데에 선다(보정 없으면 2px씩 왼쪽으로 쏠린다). */
  margin-right: -0.14em;
}

/* 한글과 영문 사이 가는 구분선. 영문 쪽에 붙이면 위의 자간 보정만큼
   같이 밀리므로 한글 라벨에 붙인다. */
.edu-card-ko::after {
  content: '';
  display: block;
  width: 34px;
  height: 2px;
  margin: 14px auto 12px;
  background: currentColor;
  opacity: 0.45;
}

/* Column so the CTA can be pinned to the bottom — descriptions differ in
   length, and the buttons must still line up across all three cards. */
.edu-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 20px;
  text-align: center;
}

.edu-card-body h3 {
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 10px;
}

.edu-card-body p {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  word-break: keep-all;
}

/* 배너 색을 버튼까지 이어 붙여야 카드가 한 덩어리로 읽힌다.
   기본 .btn-outline은 대표색이라 여기서만 덮어쓴다. */
.edu-card .btn-outline {
  border-color: var(--edu);
  color: var(--edu-ink);
}

.edu-card .btn-outline:hover {
  background: var(--edu);
  border-color: var(--edu);
  color: var(--edu-ink);
}

/* 수칙 카드만 <button>, 나머지는 <a>. 버튼은 line-height를 상속하지 않아
   그대로 두면 "자세히 보기"만 낮아진다 — 본문과 같은 1.75로 고정해 높이를 맞춤 */
.edu-card-body .btn {
  width: 100%;
  margin-top: auto;
  padding: 10px 18px;
  font-size: 19px;
  line-height: 1.75;
}
/* ===== 자원봉사자 수칙 — charter modal =====
   The 수칙 is a scanned certificate that carries its own gilt border and
   typography, so the dialog stays out of its way: dark scrim, no frame of our
   own, image scaled to fit the viewport. */
.charter-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  /* Centring is done with auto margins on the panel, NOT align-items: center.
     A centred flex item that outgrows its container overflows in both
     directions and the part above the top edge cannot be scrolled to; auto
     margins centre the same way but keep the whole panel reachable. */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.charter-modal.open {
  opacity: 1;
  visibility: visible;
}

/* Fixed, not absolute: an absolute backdrop only covers the first viewport of
   a scrolling container, leaving the scrolled-to area unshaded. */
.charter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 26, 0.82);
  backdrop-filter: blur(3px);
}

.charter-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  max-width: 100%;
  transform: translateY(16px) scale(0.986);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.charter-modal.open .charter-panel { transform: none; }

/* Bounded on both axes so the portrait scan fits whichever runs out first —
   viewport height on desktop, panel width on a phone. */
.charter-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  box-shadow: 0 26px 64px rgba(12, 20, 26, 0.55);
}

.charter-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border: 0;
  background: none;
  color: #e8ecef;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.22s ease;
}

.charter-close:hover,
.charter-close:focus-visible { opacity: 1; }

/* Escape hatch for phones, where the whole sheet scaled to fit is small. */
.charter-zoom {
  margin-top: 14px;
  padding: 4px 2px;
  color: #e8ecef;
  font-size: 16px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(232, 236, 239, 0.4);
  opacity: 0.85;
  transition: opacity 0.22s ease;
}

.charter-zoom:hover,
.charter-zoom:focus-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .charter-modal,
  .charter-panel { transition: none; }
  .charter-panel { transform: none; }
}

/* ===== Care Intro (돌봄 대상 안내) ===== */
.care-intro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* 바로 아래 돌봄 카드가 라일락 계열이라 이 안내 상자도 같은 계열로 맞춘다.
   본문은 팔레트에서 가장 어두운 톤이라 긴 문단에서도 대비가 5.6:1로 유지된다. */
.care-intro-card {
  background: var(--lilac-tint);
  border: 1px solid var(--lilac-line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
}

.care-intro-card h3 {
  font-size: 22px;
  color: var(--lilac-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.care-intro-card h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lilac);
  flex-shrink: 0;
}

.care-intro-card p {
  font-size: 19px;
  line-height: 1.75;
  color: var(--lilac-ink);
}

/* ===== Education Overview (교육 개요) ===== */
.edu-overview {
  margin-top: 48px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.edu-overview-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.edu-meta {
  flex: 1 1 220px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.edu-meta strong {
  display: block;
  font-size: 16px;
  color: var(--care-violet-ink);
  margin-bottom: 6px;
}

.edu-meta span {
  font-size: 19px;
  color: var(--text-primary);
  line-height: 1.6;
}

.edu-overview h3 {
  font-size: 21px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.edu-topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 12px 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.edu-topics li {
  position: relative;
  padding-left: 26px;
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.edu-topics li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--care-violet-strong);
  font-weight: 700;
}

@media (max-width: 768px) {
  .care-intro-grid { grid-template-columns: 1fr; gap: 16px; }
  .care-intro-card { padding: 24px 22px; }
  .edu-overview { padding: 28px 20px; }
  .edu-topics { grid-template-columns: 1fr; grid-template-rows: auto; grid-auto-flow: row; }
}

/* ===== Org Chart (조직도) ===== */
.org-chart-section {
  background: #fff;
}

/* 부서 행(가장 넓은 요소)이 가로 스크롤 없이 들어가도록 1040px.
   위쪽 노드들은 가운데 정렬이라 폭 변화의 영향을 받지 않는다 */
.orgchart {
  max-width: 1040px;
  margin: 0 auto;
}

.oc-level {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* Main authority spine (팀장 등) — 대표색 틴트 */
.oc-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 172px;
  padding: 14px 28px;
  background: var(--care-blue-tint);
  border: 1.5px solid var(--care-blue);
  border-radius: var(--radius);
  font-size: 21px;
  font-weight: 600;
  color: var(--care-blue-ink);
  box-shadow: 0 4px 18px rgba(17, 27, 34, 0.08);
}

/* 이사장 · 단장 — 대표색 채움 */
.oc-node--lead {
  background: var(--care-blue-strong);
  border: 1.5px solid var(--care-blue-strong);
  color: #fff;
  box-shadow: 0 6px 22px rgba(26, 122, 158, 0.28);
}

/* 운영위원장 · 간사 — gold (크기는 .oc-node와 동일, 색만 구분) */
.oc-node--sm {
  background: var(--care-mint-tint);
  border-color: var(--care-mint);
  color: var(--care-mint-ink);
}

.oc-connector {
  width: 2px;
  height: 24px;
  background: #ccc;
  margin: 6px auto;
}

/* 고문단 / 후원회 — 단장·팀장 사이 수직선에서 양옆으로 뻗음.
   칩이 다른 노드와 같은 크기라 행 높이는 칩에 맞춰 늘리고,
   수직선(stem)이 행 전체를 지나 단장~팀장을 잇도록 한다 */
.oc-branch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  margin: 6px auto;
}

/* 가로 arm은 세로선(2px)보다 훨씬 길어 같은 2px이면 더 굵어 보인다.
   1px로 낮춰 세로선과 시각적 굵기를 맞춤 */
.oc-branch-arm {
  flex: 1 1 auto;
  min-width: 16px;
  height: 1px;
  margin: 0 6px;
  background: #ccc;
}

.oc-branch-stem {
  flex: none;
  align-self: stretch;
  width: 2px;
  background: #ccc;
}

.oc-branch .oc-chip {
  flex: none;
}

/* 고문단 · 후원회 — clay (크기·폰트는 이사장 노드와 동일) */
.oc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 172px;
  padding: 14px 28px;
  background: var(--care-violet-tint);
  border: 1.5px solid var(--care-violet);
  border-radius: var(--radius);
  font-size: 21px;
  font-weight: 600;
  color: var(--care-violet-ink);
  white-space: nowrap;
}

.oc-departments {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  max-width: 100%;
}

.oc-dept-group {
  flex: 0 1 auto;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
}

.oc-dept-title {
  font-size: 18px;
  color: #111;
  margin-bottom: 14px;
  text-align: center;
}

.oc-dept-list {
  display: flex;
  flex-wrap: nowrap;   /* 맨 아래 항목들 가로 일행 */
  gap: 8px;
  justify-content: center;
}

.oc-dept {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
}

/* 환우 돌봄 부서 — terracotta / rose */
.oc-dept-group--care {
  border-color: var(--care-violet-line);
}
.oc-dept-group--care .oc-dept-title { color: var(--care-violet-ink); }
.oc-dept-group--care .oc-dept {
  background: var(--care-violet-tint);
  border-color: var(--care-violet-line);
  color: var(--care-violet-ink);
}

/* 활동지원부서 — sage */
.oc-dept-group--activity {
  border-color: var(--care-green-line);
}
.oc-dept-group--activity .oc-dept-title { color: var(--care-green-ink); }
.oc-dept-group--activity .oc-dept {
  background: var(--care-green-tint);
  border-color: var(--care-green-line);
  color: var(--care-green-ink);
}

/* 가로 한 줄(약 1008px)이 안 들어가는 폭부터는 세로로 쌓아 스크롤바를 없앤다.
   컨테이너 좌우 여백 32px씩을 빼면 1120px 뷰포트에서 쓸 수 있는 폭이 1056px이라,
   그 아래부터 접어야 부서 행이 잘리지 않는다 */
@media (max-width: 1120px) {
  .oc-departments {
    flex-direction: column;
    align-items: center;
  }
  .oc-dept-group { width: 100%; max-width: 460px; }
  .oc-dept-list { flex-wrap: wrap; }
}

/* 좁은 화면에서도 이사장~간사 노드는 서로 같은 크기를 유지한 채 함께 줄인다 */
@media (max-width: 560px) {
  .oc-node,
  .oc-chip {
    min-width: 116px;
    padding: 10px 14px;
    font-size: 17px;
  }
  .oc-branch-arm { min-width: 10px; margin: 0 4px; }
}

/* ===== Activity / News Section ===== */
.activity {
  background: #fff;
}

.activity-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.tab-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 21px;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--brand-strong);
  color: white;
  border-color: var(--brand-strong);
}

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

.activity-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.activity-thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.activity-thumb .activity-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.activity-tag.home { background: var(--brand-strong); }
.activity-tag.hospital { background: var(--care-mint-strong); }
.activity-tag.city { background: var(--care-violet-strong); }

.activity-card-body {
  padding: 20px;
}

.activity-card-body h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card-body .meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Donation Section — clean light, solid pink accents ===== */
.donation {
  background: #fff;
  color: var(--text-primary);
  position: relative;
}

.donation .section-tag { color: var(--care-violet-ink); }
.donation .section-tag::before,
.donation .section-tag::after { background: var(--care-violet-line); }
.donation .section-title { color: var(--ink-900); }
.donation .section-desc { color: var(--text-secondary); }

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

.donation-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.donation-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--care-violet-line);
}

.donation-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--care-violet-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 29px;
  margin: 0 auto 18px;
}

.donation-card h3 {
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-900);
}

.donation-card p {
  font-size: 21px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.donation-card .price {
  font-size: 21px;
  font-weight: 600;
  color: var(--care-violet-ink);
  margin-bottom: 20px;
}

.btn-donate {
  background: linear-gradient(180deg, var(--care-violet-strong) 0%, var(--care-violet-ink) 100%);
  color: #fff;
  border: none;
  padding: 11px 30px;
  border-radius: var(--radius-sm);
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(26, 122, 158, 0.38), inset 0 1.5px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-donate:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(26, 122, 158, 0.48), inset 0 1.5px 0 rgba(255, 255, 255, 0.55);
}

.donation-account {
  text-align: center;
  margin-top: 40px;
  padding: 26px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
}

.donation-account p {
  font-size: 21px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.donation-account .account-num {
  font-size: 25px;
  font-weight: 700;
  color: var(--care-violet-ink);
  letter-spacing: 1px;
}

.donation-account .account-name {
  font-size: 21px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Scripture / Quote ===== */
.scripture {
  background: #fff;
  padding: 80px 0;
  text-align: center;
}

.scripture-inner {
  max-width: 800px;
  margin: 0 auto;
}

.scripture blockquote {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 37px);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.6;
  margin-bottom: 16px;
}

.scripture cite {
  font-style: normal;
  font-size: 23px;
  color: var(--brand-strong);
  font-weight: 500;
}

/* ===== Donation Inquiry ===== */
.donation-inquiry {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--line);
}

.donation-inquiry-text {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 16px;
}

/* The primary instruction now that the request button is gone — clay is the
   care/donation accent, so it carries the emphasis without shouting. */
.donation-inquiry-note {
  font-size: 22px;
  font-weight: 600;
  color: var(--care-violet-ink);
  margin-top: 4px;
}

.donation-inquiry-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.donation-inquiry-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #fff;
  border: 1px solid var(--care-violet-line);
  border-radius: var(--radius);
  font-size: 19px;
  font-weight: 600;
  color: var(--care-violet-ink);
  transition: var(--transition);
}

.donation-inquiry-contact:hover {
  background: var(--care-violet-strong);
  border-color: var(--care-violet-strong);
  color: #fff;
}

.donation-inquiry-contact-label {
  flex-shrink: 0;
  padding: 2px 9px;
  background: var(--care-violet-tint);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--care-violet-ink);
}

.donation-inquiry-contact:hover .donation-inquiry-contact-label {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

/* 번호가 둘일 때: '전화' 라벨 하나에 번호 둘을 한 칩에 묶는다.
   칩 자체는 링크가 아니므로 hover 강조는 각 번호에만 준다 */
.donation-inquiry-contact--group,
.donation-inquiry-contact--group:hover {
  background: #fff;
  border-color: var(--care-violet-line);
  color: var(--care-violet-ink);
}

.donation-inquiry-contact--group:hover .donation-inquiry-contact-label {
  background: var(--care-violet-tint);
  color: var(--care-violet-ink);
}

.donation-inquiry-contact--group {
  flex-wrap: wrap;
  justify-content: center;
}

/* 좁은 폭에서 번호가 하이픈마다 끊기지 않도록 — 대신 칩 안에서 줄바꿈 */
.donation-inquiry-contact--group a {
  color: inherit;
  white-space: nowrap;
}

.donation-inquiry-contact--group a:hover {
  color: var(--care-violet-strong);
  text-decoration: underline;
}

.donation-inquiry-contact-sep {
  color: var(--care-violet-line);
  font-weight: 400;
}

/* 번호 둘이 한 줄에 못 들어가면 세로로 쌓고 구분선은 감춘다 */
@media (max-width: 480px) {
  .donation-inquiry-contact--group { gap: 4px 10px; }
  .donation-inquiry-contact-sep { display: none; }
}

/* ===== Contact / Map Section ===== */
.contact {
  background: #fff;
}

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

.contact-info-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--line);
}

.contact-info-card h3 {
  font-family: var(--font-serif);
  font-size: 35px;
  font-weight: 700;
  margin-bottom: 24px;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  flex-shrink: 0;
}

.contact-item-text {
  font-size: 21px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-item-text strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  min-height: 380px;
  position: relative;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text-muted);
  font-size: 21px;
  background: linear-gradient(135deg, var(--paper-2), var(--care-blue-line));
}

.map-placeholder .map-icon { font-size: 43px; line-height: 1; }

/* Location photo filling the contact map chip */
.map-photo {
  position: absolute;
  inset: 0;
}

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

.map-photo-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 56px 26px 24px;
  color: #fff;
  background: linear-gradient(to top, rgba(17, 27, 34, 0.88), rgba(17, 27, 34, 0.6) 55%, rgba(17, 27, 34, 0));
}

.map-photo-address {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.map-photo-detail {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.map-photo-caption .btn {
  margin-top: 14px;
  padding: 10px 22px;
  font-size: 15px;
}

/* ===== Org Section ===== */
.org {
  background: #fff;
}

.org-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.org-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 21px;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.org-item:hover {
  border-color: var(--brand-line);
  box-shadow: var(--card-shadow);
}

.org-item .org-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 로고마다 가로세로 비가 달라, 높이와 폭을 함께 묶어 눈에 보이는 크기를 맞춘다.
   가로로 긴 로고는 폭 상한(240px)에 먼저 걸려 높이가 자연히 낮아진다.
   상한이 200px일 때는 가로형 로고가 과하게 줄어 옆 로고보다 작아 보였다. */
.org-item .org-logo {
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
}

.org-item .org-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand .footer-logo .brand-name {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  color: white;
}

.footer-brand p {
  font-size: 21px;
  line-height: 1.7;
  max-width: 360px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: #fff;
}

/* 번호가 둘이라 '전화'는 한 번만 쓰고 번호만 각각 링크 */
.footer-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

.footer-phones-sep {
  color: rgba(255, 255, 255, 0.45);
}

.footer-col h4 {
  color: white;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul li a {
  font-size: 21px;
  color: rgba(255,255,255,0.5);
}

.footer-col ul li a:hover {
  color: var(--brand-line);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 21px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.62);
}

.footer-bottom a:hover {
  color: var(--brand-line);
}

/* ===== Gallery board (활동 갤러리) =====
   A 갤러리형 게시판: thumbnail cards in a grid, board chrome (tabs, filters,
   search, paging) around them, each card linking to its own detail page. */
.board-section { padding: 60px 0 80px; }

/* --- Category tabs --- */
.board-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.board-tab {
  position: relative;
  padding: 12px 24px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.board-tab:hover { color: var(--brand-deep); }

.board-tab.active { color: var(--brand-deep); }

/* Sits on top of the strip's own border so the active tab reads as connected. */
.board-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand-strong);
}

/* --- Education sub-tags --- */
.board-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.board-subtab {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 16px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.board-subtab:hover { border-color: var(--brand-line); color: var(--brand-deep); }
.board-subtab.active { color: #fff; border-color: transparent; }
.board-subtab.active.edu-tag-1 { background: var(--brand-strong); }
.board-subtab.active.edu-tag-2 { background: var(--brand-deep); }
.board-subtab.active.edu-tag-3 { background: var(--care-violet-strong); }
.board-subtab.active:not(.edu-tag-1):not(.edu-tag-2):not(.edu-tag-3) { background: var(--ink-500); }

/* --- Toolbar --- */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.board-count {
  font-size: 17px;
  color: var(--text-muted);
}

.board-count strong { color: var(--brand-deep); }

.board-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-select {
  height: 40px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  /* Native arrow varies wildly across platforms; draw our own. */
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239a8870' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.board-select:focus { border-color: var(--brand-strong); outline: none; }

.board-search {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.2s ease;
}

.board-search:focus-within { border-color: var(--brand-strong); }

.board-search input {
  width: 190px;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
}

.board-search input:focus { outline: none; }
.board-search input::placeholder { color: var(--ink-300); }

.board-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.board-search button:hover { color: var(--brand-deep); }

/* --- Card grid --- */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  padding: 0;
}

.board-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: var(--transition);
}

.board-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: var(--card-shadow-hover);
}

.board-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 사진을 잘라내지 않고 4:3 칸 안에 통째로 담는다. 카드 높이를 맞추려면
   칸 비율은 고정해야 하므로 남는 위아래·좌우는 카드 배경이 그대로 비치게 둔다 */
.board-card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: transparent;
  overflow: hidden;
}

.board-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.board-card-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(17, 27, 34, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.board-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
}

.board-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.board-badge {
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--ink-500);
}

.board-badge.cat-edu { background: var(--brand-strong); }
.board-badge.cat-event { background: var(--care-violet-strong); }
.board-badge.cat-past { background: var(--care-mint-strong); }
.board-badge.cat-other { background: var(--ink-500); }
.board-badge.edu-tag-1 { background: var(--brand-deep); }
.board-badge.edu-tag-2 { background: var(--care-mint-strong); }
.board-badge.edu-tag-3 { background: var(--care-violet-ink); }

.board-card-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: keep-all;
  /* Two lines max so cards in a row keep a common height. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.board-card:hover .board-card-title { color: var(--brand-deep); }

.board-card-date {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  color: var(--text-muted);
}

.board-empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
}

.board-empty .btn { margin-top: 18px; }

.board-pagination { margin-top: 44px; }

/* --- Detail page --- */
.board-detail-section { padding-top: 40px; }

.board-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--text-muted);
}

.board-breadcrumb a { color: var(--text-secondary); }
.board-breadcrumb a:hover { color: var(--brand-deep); }

.board-post {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.board-post-head {
  padding: 30px 34px 24px;
  border-bottom: 1px solid var(--line);
}

.board-post-title {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  word-break: keep-all;
}

.board-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-muted);
}

.board-post-gallery { padding: 26px 34px 0; }

.board-stage {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
}

.board-stage img {
  display: block;
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  background: var(--paper-2);
}

.board-stage-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(17, 27, 34, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.board-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
  padding: 0;
}

.board-thumb {
  display: block;
  width: 84px;
  height: 62px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: none;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.board-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-thumb:hover { opacity: 1; }
.board-thumb.active { opacity: 1; border-color: var(--brand-strong); }

.board-post-body {
  padding: 26px 34px 34px;
  font-size: 19px;
  line-height: 1.9;
  color: var(--text-secondary);
  white-space: pre-line;
  word-break: keep-all;
}

/* --- Prev / next --- */
.board-nav {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.board-nav-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.board-nav-label {
  flex-shrink: 0;
  width: 58px;
  color: var(--text-muted);
  font-size: 16px;
}

.board-nav-row a {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-nav-row a:hover { color: var(--brand-deep); }
.board-nav-none { color: var(--ink-300); }

.board-detail-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* --- Pagination controls (shared with vendor.pagination.gallery) --- */
.gallery-pager {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--line);
}

.pager-btn:hover:not(.disabled):not(.active) {
  border-color: var(--brand-line);
  color: var(--brand-deep);
}

.pager-btn.active {
  background: var(--brand-strong);
  color: #fff;
  border-color: transparent;
}

.pager-btn.disabled {
  opacity: 0.4;
  cursor: default;
}

/* Hidden utility */
.hidden { display: none !important; }

/* Lightbox modal */
.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  justify-content: center;
  /* See .charter-modal — auto margins on .lightbox-content do the centring so
     tall content stays scrollable on short viewports. */
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.gallery-lightbox-modal.open {
  opacity: 1;
  visibility: visible;
}

/* Fixed so the controls stay pinned to the viewport while a tall image scrolls. */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  font-size: 39px;
  color: #fff;
  background: none;
  opacity: 0.7;
  z-index: 10;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 51px;
  color: #fff;
  background: none;
  opacity: 0.5;
  z-index: 10;
  padding: 20px;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* No max-height here: content overflowing a capped box does not add to the
   scroll container's scrollable area, so the cap would defeat the scrolling. */
.lightbox-content {
  max-width: 90vw;
  margin: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-info {
  color: #fff;
  text-align: center;
  margin-top: 16px;
  max-width: 600px;
}

.lightbox-cat {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.lightbox-cat.edu { background: var(--care-green-strong); }
.lightbox-cat.event { background: rgba(91, 125, 24, 0.82); }

.lightbox-info h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.lightbox-info p {
  font-size: 16px;
  opacity: 0.7;
  margin-top: 6px;
}

.lightbox-date {
  font-size: 15px;
  opacity: 0.5;
  display: block;
}

/* Lightbox bottom row */
.lightbox-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.lightbox-counter {
  font-size: 15px;
  opacity: 0.6;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Lightbox slide transition */
#lightboxImg {
  transition: opacity 0.15s ease;
}

/* Lightbox dots */
.lightbox-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.lightbox-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.lightbox-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

.lightbox-dot:hover {
  border-color: #fff;
}

/* ===== Responsive: Fluid Typography ===== */
html { font-size: clamp(15px, 1vw + 10px, 18px); scroll-padding-top: 96px; }
@media (max-width: 768px) { html { scroll-padding-top: 72px; } }

/* ===== Responsive: Tablet Landscape (max-width: 1280px) ===== */
@media (max-width: 1280px) {
  .container { padding: 0 24px; }
  .nav-links > li > a { padding: 12px 20px; font-size: 22px; }
  .dropdown a { font-size: 20px; }
  .hero-content { gap: 40px; }
  .board-grid { grid-template-columns: repeat(3, 1fr); }
  .staff-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  /* 5단으로는 카드가 좁아 본문이 두 글자씩 끊긴다. */
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ===== Responsive: Tablet Portrait (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 32px; }
  /* 한 컬럼으로 떨어지면 나란히 놓일 카드뉴스가 없으니 맞출 높이도 없다. */
  .hero-visual { padding-bottom: 0; }
  .hero-card-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .edu-cards { grid-template-columns: repeat(2, 1fr); }
  .activity-grid { grid-template-columns: repeat(2, 1fr); }
  .donation-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .staff-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .board-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .nav-links > li > a { padding: 10px 16px; font-size: 20px; }
  .dropdown a { font-size: 19px; padding: 8px 16px; }
  .btn { font-size: 20px; padding: 10px 22px; }
  .nav { height: 80px; }

  .section { padding: 80px 0; }
  .section-header { margin-bottom: 48px; }
  .section-desc { font-size: 19px; }

  .card-news-slide { padding: 40px 32px; }
  .card-news-slide .hero-desc { font-size: 19px; }

  .process-timeline { padding: 0 20px; }
  .process-step h4 { font-size: 19px; }
  .process-step p { font-size: 18px; }

  .contact-info-card h3 { font-size: 29px; }
  .contact-info-card { padding: 32px; }

  .about-visual-inner .year { font-size: 60px; }
  .about-visual-inner h3 { font-size: 29px; }
  .about-text h2 { font-size: 31px; }

  .donation-card { padding: 28px 20px; }
  .donation-card h3 { font-size: 22px; }
}

/* ===== Responsive: Mobile Large (max-width: 768px) ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 36px; }
  .section-tag { font-size: 16px; letter-spacing: 1px; }
  .section-desc { font-size: 18px; }

  /* Header / Nav */
  .nav { height: 64px; }
  .logo-icon { width: 40px; height: 40px; }
  .logo-text .brand { font-size: 22px; }
  .logo-text .sub { font-size: 16px; }
  .nav-links, .nav-cta { display: none; }
  .mobile-toggle { display: flex; }

  /* Mobile Menu Panel */
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--paper);
    padding: 12px 12px 16px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
    border-top: 1px solid var(--line);
    animation: slideDown 0.28s ease;
    z-index: 999;
  }
  .nav-menu.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }
  .nav-menu.open .nav-links > li { width: 100%; }
  .nav-menu.open .nav-links > li > a {
    display: block;
    padding: 15px 16px;
    font-size: 20px;
    font-weight: 700;
    border-radius: var(--radius-sm);
  }
  .nav-menu.open .nav-links > li > a::after { display: none; }
  .nav-menu.open .nav-links > li > a:active,
  .nav-menu.open .nav-links > li > a:hover { background: var(--line); }
  .nav-menu.open .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    background: var(--line);
    border-radius: var(--radius-sm);
    margin: 2px 0 8px 12px;
    padding: 4px;
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
  }
  .nav-menu.open .dropdown a {
    font-size: 18px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
  }
  .nav-menu.open .nav-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .nav-menu.open .nav-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 19px;
    padding: 13px 20px;
  }

  /* Hamburger → X animation */
  .mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Hero */
  .hero { min-height: auto; padding: 52px 0 44px; }
  .hero-card-grid { grid-template-columns: 1fr; gap: 12px; }
  /* Care cards: icon on the left, title + text on the right */
  .hero-card:not(.featured) {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 16px;
    padding: 18px 20px;
  }
  .hero-card:not(.featured) .hero-card-icon { grid-row: 1 / span 2; }
  .hero-card-icon { width: 44px; height: 44px; font-size: 24px; margin-bottom: 0; }
  .hero-card-icon img { width: 26px; height: 26px; }
  .hero-card h4 { font-size: 22px; }
  .hero-card p { font-size: 19px; }
  .hero-card.featured { flex-direction: column; text-align: center; gap: 12px; padding: 16px 20px; }
  .card-news-slide { min-height: 320px; padding: 32px 20px; }
  .card-news-slide h1 em { font-size: clamp(31px, 7vw, 37px); }
  .card-news-slide .hero-badge { font-size: 15px; }
  .card-news-slide .hero-desc { font-size: 17px; margin-bottom: 24px; }
  .card-news-slide .hero-actions { gap: 10px; }
  .card-news-slide .hero-actions .btn { font-size: 17px; padding: 10px 20px; }
  .card-news-slide--image { padding: 0; }
  .card-news-image-content { min-height: 320px; padding: 32px 20px; }
  .card-news-image-icon { font-size: 43px; margin-bottom: 16px; }
  .card-news-image-label { font-size: 16px; }
  .card-news-image-text h2 { font-size: clamp(24px, 5vw, 31px); }
  .card-news-image-text p { font-size: 18px; }
  .card-news-image-cta { font-size: 17px; padding: 10px 22px; }
  .card-news-controls { gap: 12px; margin-top: 12px; }
  .card-news-arrow, .card-news-pause { width: 32px; height: 32px; font-size: 18px; }

  /* Notice */
  .notice-section { padding: 32px 0 28px; }
  .notice-header { padding: 16px 20px; }
  .notice-label-icon { width: 34px; height: 34px; border-radius: 10px; }
  .notice-label-icon img { width: 18px; height: 18px; }
  .notice-label-text { font-size: 19px; }
  .notice-more { font-size: 16px; padding: 6px 12px; }
  .notice-item { height: 48px; padding: 0 20px; gap: 10px; }
  .notice-slider { height: 48px; }
  .notice-item-link { gap: 10px; }
  .notice-item-tag { font-size: 15px; padding: 2px 8px; }
  .notice-item-title { font-size: 17px; }

  /* Services */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .service-card { padding: 26px 0 24px; }
  .service-card::before { height: 36px; border-width: 4px 4px 0; border-radius: 18px 18px 0 0; }
  .service-card::after { height: 32px; border-width: 0 4px 7px; border-radius: 0 0 18px 18px; }
  .service-icon { margin-bottom: 16px; }
  .service-icon img { height: 46px; }
  .service-card h3 { font-size: 19px; margin-bottom: 14px; }
  .service-card p { font-size: 17px; }
  .service-mark { width: 18px; padding-top: 14px; }

  /* About */
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-visual { aspect-ratio: 16/9; }
  .about-visual-inner { padding: 24px; }
  .about-visual-inner .year { font-size: 51px; }
  .about-visual-inner h3 { font-size: 24px; }
  .about-visual-inner p { font-size: 18px; }
  .about-stats { gap: 8px; left: 12px; right: 12px; bottom: 12px; }
  .stat-chip { padding: 10px 8px; }
  .stat-chip .num { font-size: 22px; }
  .stat-chip .label { font-size: 15px; }
  .about-text h2 { font-size: 26px; }
  .about-text p { font-size: 18px; }
  .about-features { grid-template-columns: 1fr; gap: 10px; }
  .about-feature { font-size: 17px; padding: 12px 14px; }

  /* Staff */
  .staff-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .staff-card { padding: 20px 14px; }
  .staff-photo { width: 72px; height: 72px; }
  .staff-name { font-size: 18px; }
  .staff-position { font-size: 15px; }
  .staff-department { font-size: 14px; }
  .staff-bio { font-size: 15px; }

  /* History */
  .history-timeline { padding-left: 28px; }
  .history-year-marker::before { left: -21px; width: 12px; height: 12px; }
  .history-year { font-size: 24px; }
  .history-entry { flex-direction: column; padding: 16px; }
  .history-entry-image { width: 100%; height: 160px; }
  .history-entry-content h4 { font-size: 17px; }
  .history-entry-content p { font-size: 16px; }

  /* Process */
  .process-timeline { flex-direction: column; padding: 0; gap: 16px; }
  .process-timeline::before { display: none; }
  .process-step { padding-top: 0; padding-left: 48px; text-align: left; }
  .process-step .step-dot { left: 0; top: 4px; transform: none; width: 30px; height: 30px; font-size: 17px; }
  .process-step h4 { font-size: 18px; }
  .process-step p { font-size: 16px; padding: 0; }

  /* Education */
  .edu-cards { grid-template-columns: 1fr; gap: 16px; }
  .edu-card-img { height: 165px; }
  .edu-card-body { padding: 20px; }
  .edu-card-body h3 { font-size: 20px; }
  .edu-card-body p { font-size: 17px; }
  .edu-card-body .btn { font-size: 17px; }

  /* 자원봉사자 수칙 charter */
  .charter-modal { padding: 14px 12px; }
  .charter-image { max-height: 72vh; }
  .charter-zoom { margin-top: 12px; font-size: 15px; }

  /* Activity */
  .activity-tabs { flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
  .tab-btn { padding: 8px 18px; font-size: 17px; }
  .activity-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .activity-thumb { height: 150px; }
  .activity-tag { font-size: 15px !important; padding: 3px 10px !important; }
  .activity-card-body { padding: 14px; }
  .activity-card-body h4 { font-size: 17px; }
  .activity-card-body .meta { font-size: 16px; }

  /* Donation */
  .donation-grid { grid-template-columns: 1fr; gap: 16px; }
  .donation-card { padding: 28px 20px; }
  .donation-icon { width: 64px; height: 64px; font-size: 24px; }
  .donation-card h3 { font-size: 21px; }
  .donation-card p { font-size: 18px; }
  .donation-account { padding: 20px; margin-top: 28px; }
  .donation-account .account-num { font-size: 21px; }
  .donation-account p { font-size: 17px; }

  /* Scripture */
  .scripture { padding: 60px 0; }

  /* Contact */
  .contact-info-card { padding: 28px 20px; }
  .contact-info-card h3 { font-size: 26px; }
  .contact-item-icon { width: 44px; height: 44px; font-size: 20px; }
  .contact-item-text { font-size: 17px; }
  .contact-map { min-height: 280px; }
  .map-photo-caption { padding: 44px 20px 20px; }
  .map-photo-address { font-size: 18px; }

  /* Org */
  .org-item { padding: 12px 18px; font-size: 17px; }
  .org-item .org-logo { height: 36px; max-width: 150px; }
  .org-grid { gap: 8px; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-brand p { font-size: 17px; }
  .footer-col h4 { font-size: 18px; margin-bottom: 12px; }
  .footer-col ul li a { font-size: 17px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; font-size: 16px; }

  /* Gallery */
  .board-section { padding: 40px 0 60px; }
  .board-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .board-tab { white-space: nowrap; flex-shrink: 0; padding: 11px 16px; font-size: 17px; }
  .board-toolbar { align-items: stretch; flex-direction: column; }
  .board-controls { width: 100%; }
  .board-search { flex: 1; min-width: 160px; }
  .board-search input { width: 100%; }
  .board-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .board-card-body { padding: 12px 13px 14px; }
  .board-card-title { font-size: 17px; }
  .board-card-date { font-size: 14px; }
  .board-post-head { padding: 22px 18px 18px; }
  .board-post-title { font-size: 24px; }
  .board-post-gallery { padding: 18px 18px 0; }
  .board-post-body { padding: 20px 18px 26px; font-size: 17px; }
  .board-thumb { width: 64px; height: 48px; }
  .board-nav-row { padding: 13px 14px; font-size: 16px; }

  /* Lightbox */
  .lightbox-close { top: 12px; right: 16px; font-size: 31px; }
  .lightbox-nav { font-size: 31px; padding: 8px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-content img { max-height: 60vh; }

  /* Page Hero (Sub-pages) */
  .page-hero { padding: 5rem 0 2rem; }
  .page-hero-title { font-size: 1.625rem; }
  .page-hero-desc { font-size: 1.125rem; }
  .page-hero-lede { font-size: 1rem; margin-bottom: 0.625rem; }
  .page-hero-cta { margin-top: 1.125rem; }
  .page-hero-cta .btn { font-size: 1rem; padding: 10px 20px; }
  .breadcrumb { font-size: 0.925rem; gap: 0.4rem; }

  /* Donation Inquiry */
  .donation-inquiry { padding: 28px 20px; }
  .donation-inquiry-text { font-size: 18px; }
  .donation-inquiry-note { font-size: 19px; }
  .donation-inquiry-contacts { flex-direction: column; gap: 10px; }
  .donation-inquiry-contact { justify-content: center; font-size: 17px; padding: 12px 16px; }

  /* Scroll top */
  .scroll-top { width: 42px; height: 42px; font-size: 22px; bottom: 20px; right: 16px; }
}

/* ===== Responsive: Mobile Small (max-width: 480px) ===== */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .section { padding: 48px 0; }
  .section-header { margin-bottom: 28px; }

  /* Hero */
  .hero { padding: 44px 0 32px; }
  .hero-content { gap: 20px; }
  .card-news-slide { min-height: 280px; padding: 24px 16px; }
  .card-news-slide h1 .hero-title-sub { font-size: 18px; }
  .card-news-slide h1 em { font-size: 29px; }
  .card-news-slide .hero-desc { font-size: 16px; line-height: 1.7; margin-bottom: 20px; }
  .card-news-slide .hero-actions .btn { font-size: 16px; padding: 8px 16px; }
  .card-news-image-content { min-height: 280px; padding: 24px 16px; }
  .card-news-image-text h2 { font-size: 22px; }
  .card-news-image-text p { font-size: 16px; }
  .card-news-image-cta { font-size: 16px; padding: 8px 18px; }
  .hero-card:not(.featured) { padding: 16px 18px; column-gap: 14px; }
  .hero-card-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; margin-bottom: 0; }
  .hero-card-icon img { width: 24px; height: 24px; }
  .hero-card h4 { font-size: 21px; margin-bottom: 4px; }
  .hero-card p { font-size: 18px; }

  /* Services - 1 column on smallest */
  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-card { padding: 24px 0 22px; }

  /* Activity - 1 column on smallest */
  .activity-grid { grid-template-columns: 1fr; }
  .activity-tabs { gap: 4px; }
  .tab-btn { padding: 7px 14px; font-size: 16px; }

  /* Staff */
  .staff-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-brand .footer-logo .brand-name { font-size: 20px; }

  /* Gallery */
  .board-tab { padding: 9px 13px; font-size: 16px; }

  /* Buttons */
  .btn { font-size: 17px; padding: 10px 20px; }
  .btn-donate { font-size: 17px; padding: 8px 20px; }

  /* Popup */
  .popup-container { padding: 0.5rem; gap: 0.75rem; }
  .popup-modal { max-width: 95vw; }
  .popup-image { max-height: 45vh; }

  /* Lightbox */
  .lightbox-content img { max-height: 50vh; border-radius: 4px; }
  .lightbox-info h3 { font-size: 17px; }
  .lightbox-info p { font-size: 15px; }

  /* Scroll top - smaller on tiny screens */
  .scroll-top { width: 38px; height: 38px; font-size: 20px; bottom: 16px; right: 12px; }
}

/* ===== Touch Interaction Enhancements ===== */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets on touch devices */
  .nav-links > li > a { padding: 14px 20px; }
  .tab-btn { min-height: 44px; }
  .card-news-arrow, .card-news-pause { width: 40px; height: 40px; }
  .pager-btn { min-width: 40px; height: 40px; }
  .board-tab { min-height: 44px; }
  .btn { min-height: 44px; }
  .scroll-top { width: 48px; height: 48px; }

  /* Disable hover effects on touch */
  .hero-card:hover { transform: none; }
  .service-card:hover { transform: none; }
  .edu-card:hover { transform: none; }
  .activity-card:hover { transform: none; }
  .donation-card:hover { transform: none; }
  .staff-card:hover { transform: none; }

  /* Show gallery overlay always on touch */
}

/* ===== Landscape phone ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 70px 0 32px; }
  .card-news-slide { min-height: 240px; }
  .card-news-image-content { min-height: 240px; }
  .page-hero { padding: 4.5rem 0 1.5rem; }
  .popup-image { max-height: 40vh; }
  .lightbox-content img { max-height: 70vh; }
}

/* ===== Scroll to top ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--care-violet-strong);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  box-shadow: 0 6px 16px rgba(26, 122, 158, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
  cursor: pointer;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  background: var(--care-violet-ink);
}

/* ===== Popup Ads ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  /* See .charter-modal — auto margins on .popup-container centre it while
     leaving tall content scrollable. */
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}

.popup-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  margin: auto;
  padding: 1rem;
}

.popup-modal {
  flex: 0 1 auto;
  max-width: min(420px, 90vw);
  animation: popupFadeIn 0.3s ease-out;
}

.popup-content {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.popup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.popup-content a {
  display: block;
}

.popup-actions {
  display: flex;
  border-top: 1px solid #e5e7eb;
}

.popup-actions button {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.975rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.popup-btn-today {
  background: #f9fafb;
  color: #6b7280;
}

.popup-btn-today:hover {
  background: #f3f4f6;
}

.popup-btn-close {
  background: #fff;
  color: #374151;
  font-weight: 600;
  border-left: 1px solid #e5e7eb !important;
}

.popup-btn-close:hover {
  background: #f9fafb;
}

/* ===== Page Hero (Sub-page banner) — clean white, coloured title ===== */
.page-hero {
  background: #fff;
  color: var(--text-primary);
  padding: 7rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid rgba(17, 27, 34, 0.08);
  position: relative;
  overflow: hidden;
}


.page-hero .container { position: relative; z-index: 1; }

.page-hero-title {
  font-family: var(--font-serif);
  font-size: 2.3875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.page-hero-lede {
  max-width: 40rem;
  margin: 0 auto 0.75rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  word-break: keep-all;
}

.page-hero-desc {
  font-size: 1.275rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* 후원안내 히어로의 인용 문구 — 고운바탕(부드러운 세리프).
   본문 산세리프보다 작아 보여 크기를 조금 올리고 자간을 넉넉히 둔다.
   웹폰트는 donation.blade.php에서 이 페이지에만 로드 */
.page-hero--donation .page-hero-desc {
  font-family: 'Gowun Batang', var(--font-sans);
  font-size: 1.45rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .page-hero--donation .page-hero-desc { font-size: 1.25rem; }
}

/* Page hero call-to-action (e.g. 밴드 바로가기 on 활동소식) */
.page-hero-cta {
  margin-top: 1.5rem;
}

.page-hero-cta .btn {
  font-size: 1.0625rem;
  padding: 11px 24px;
}

.btn-ext-icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.22s ease;
}

.btn:hover .btn-ext-icon { opacity: 1; }

/* Screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 0.975rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.breadcrumb-sep {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 6rem 0 2rem;
  }
  .page-hero-title {
    font-size: 1.7875rem;
  }
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 모바일: 한 열로 쌓기 */
@media (max-width: 640px) {
  .popup-container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .popup-modal {
    max-width: 92vw;
    width: 100%;
  }
  .popup-image {
    max-height: 50vh;
  }
  .popup-actions button {
    padding: 0.65rem;
    font-size: 0.925rem;
  }
}


/* ===== Full-width Hero Slideshow ===== */
.hero-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 1900 / 640;   /* fixed banner ratio — no top/bottom crop as width changes */
  overflow: hidden;
  background: var(--ink-900);
}

.hero-slideshow-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s ease-in-out, visibility 1.4s ease-in-out;
  display: block;
  text-decoration: none;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);   /* rest state fills the 1900:640 frame exactly — no crop */
}

/* Both states carry an identical animation shorthand on purpose: the class
   swaps from .is-active to .is-leaving while the slide crossfades out, and an
   unchanged animation-name lets the zoom keep running instead of restarting —
   or, as it did before .is-leaving existed, snapping back to scale(1) while
   the slide was still visible. Duration is set from JS as interval + fade. */
.hero-slide.is-active img,
.hero-slide.is-leaving img {
  animation: heroKenBurns var(--hero-kb-duration, 7.4s) ease-out forwards;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

.hero-slideshow-scrim {
  display: none;   /* 그라데이션 오버레이 제거 — 원본 이미지만 노출 */
}

.hero-slideshow-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(84px, 15vh, 156px);
  z-index: 2;
  color: #fff;
  pointer-events: none;
}

.hero-slideshow-sub {
  display: inline-block;
  font-size: clamp(0.975rem, 1.6vw, 1.175rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #374151;   /* 산뜻한 짙은 회색 */
  margin-bottom: 12px;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.55);
}

.hero-slideshow-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8875rem, 4.4vw, 3.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 20ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

/* Caption horizontal alignment (admin: 좌측 / 중앙 / 우측) */
.hero-slideshow-caption--center { text-align: center; }
.hero-slideshow-caption--center .hero-slideshow-title { margin-left: auto; margin-right: auto; }

.hero-slideshow-caption--right { text-align: right; }
.hero-slideshow-caption--right .hero-slideshow-title { margin-left: auto; }

/* CTA button (shown when an admin sets 이동 버튼 텍스트) */
.hero-slideshow-btn {
  pointer-events: auto;
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background: #fff;
  color: var(--brand-deep);
  font-size: clamp(1.025rem, 1.5vw, 1.175rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;   /* 친근감 있는 둥근(pill) 버튼 */
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-slideshow-btn:hover {
  background: var(--brand-tint);
  transform: translateY(-2px);
}

.hero-slideshow-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-slideshow-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
}

.hero-slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.hero-slideshow-dot.is-active {
  width: 26px;
  border-radius: 5px;
  background: #fff;
}

@media (max-width: 640px) {
  /* keep the 1900:640 ratio (set on .hero-slideshow) — just tuck the caption in */
  .hero-slideshow-caption {
    bottom: clamp(24px, 7vw, 52px);
  }
  .hero-slideshow-btn {
    margin-top: 10px;
    padding: 8px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active img,
  .hero-slide.is-leaving img {
    animation: none;
    transform: scale(1);
  }
}

/* ===================================================================
   에디토리얼 · 각진 형태 — 마지막 기하 보정
   뱃지·아바타·컨트롤의 둥근 모서리를 각지게, 남은 볼록한 CTA를 평평하게.
   =================================================================== */

/* Square the round badges, avatars & control buttons.
   .service-icon은 뱃지가 없어져(돌봄 카드 개편) 목록에서 뺐다. */
.hero-card-icon,
.donation-icon,
.notice-label-icon,
.contact-item-icon,
.card-news-arrow,
.card-news-pause,
.scroll-top,
.about-feature .check,
.process-step .step-dot,
.staff-photo { border-radius: var(--radius-sm); }

/* Icon badges — 대표색 라인 아이콘 판 */
.notice-label-icon,
.contact-item-icon { background: var(--brand-deep); }

/* Flat clay donate button (was puffy pink) */
.btn-donate {
  background: var(--care-violet-strong);
  box-shadow: none;
  font-weight: 600;
  transition: background 0.22s ease, transform 0.22s ease;
}
.btn-donate:hover {
  background: var(--care-violet-ink);
  transform: translateY(-1px);
  box-shadow: none;
}

/* Scroll-to-top — 대표색, 옅은 그림자 */
.scroll-top {
  background: var(--brand-strong);
  box-shadow: 0 6px 16px rgba(17, 27, 34, 0.26);
}
.scroll-top:hover { background: var(--brand-deep); }

/* Section eyebrow — restrained editorial rule */
.section-tag { letter-spacing: 0.18em; font-weight: 600; font-size: 17px; }

/* Serif display gets a touch more presence */
.section-title,
.card-news-slide h1,
.hero-slideshow-title,
.about-text h2,
.scripture blockquote { letter-spacing: -0.01em; }

/* Notice ticker tag — 각진 대표색 칩 */
.notice-item-tag {
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-radius: var(--radius-sm);
}
