/* ==========================================================
   blocks.css — 블록별 스타일 (+반응형)
   header / hero / services / gallery / contact / footer
   데스크톱 수치는 Figma 1920 캔버스 기준, 그 아래는 브레이크포인트로 축소
   브레이크포인트: 1440 / 1280 / 1200 / 1024 / 768 / 640 / 480
   ========================================================== */

/* ----------------------------------------------------------
   block: header (1920 기준 150높이, 흰 배경)
   ---------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50; /* 본문 위에 고정 — 드로어(gnb z:50)도 헤더 기준으로 따라온다 */
  height: 150px;
  background: var(--main-white);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.header__logo img { width: 371px; height: 63px; }
.header__gnb { display: flex; gap: 67px; }
/* 상위 링크에만 적용 — 서브메뉴 링크와 겹치지 않게 자식 셀렉터 사용 */
.header__gnb > .gnb-item > a {
  font-size: 24px;
  font-weight: 500;
  line-height: 29px;
  letter-spacing: -0.48px;
  color: #17171a;
  transition: color .2s ease;
}
.header__gnb > .gnb-item > a:hover { color: var(--main-brand); }

/* 데스크톱 드롭다운 — hover + 키보드 포커스 */
.gnb-item { position: relative; }
.gnb-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 20px;
  min-width: 176px;
  padding: 12px 0;
  background: #fff;
  border: 1px solid var(--main-line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(23, 46, 36, .14);
  list-style: none;
  z-index: 100;
}
.gnb-sub::before { /* 호버 갭 메우기 */
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}
.gnb-item:hover .gnb-sub,
.gnb-item:focus-within .gnb-sub { display: block; }
.gnb-sub a {
  display: block;
  padding: 10px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--main-ink);
  text-decoration: none;
  white-space: nowrap;
}
.gnb-sub a:hover,
.gnb-sub a:focus-visible {
  background: var(--main-pale);
  color: var(--main-brand);
}

/* 햄버거 (≤1024에서 표시) */
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.header__toggle span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--main-ink);
  transition: transform .25s ease, opacity .25s ease;
}
.header__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header__toggle.is-open span:nth-child(2) { opacity: 0; }
.header__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ----------------------------------------------------------
   block: header (1920 기준 150높이, 흰 배경)
   ========================================================== */
.header {
  height: 150px;
  background: var(--main-white);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.header__logo { margin: 0; }
.header__logo img { width: 371px; height: 63px; }
.header__gnb { display: flex; gap: 67px; }
.header__gnb > .gnb-item > a {
  font-size: 24px;
  font-weight: 500;
  line-height: 29px;
  letter-spacing: -0.48px;
  color: #17171a;
  transition: color .2s ease;
}
.header__gnb > .gnb-item > a:hover { color: var(--main-brand); }

/* 데스크톱 드롭다운 — hover + 키보드 포커스 */
.gnb-item { position: relative; }
.gnb-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 20px;
  min-width: 176px;
  padding: 12px 0;
  background: #fff;
  border: 1px solid var(--main-line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(23, 46, 36, .14);
  list-style: none;
  z-index: 100;
}
.gnb-item:hover .gnb-sub,
.gnb-item:focus-within .gnb-sub { display: block; }
.gnb-sub a {
  display: block;
  padding: 10px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--main-ink);
  text-decoration: none;
  white-space: nowrap;
}
.gnb-sub a:hover,
.gnb-sub a:focus-visible {
  background: var(--main-pale);
  color: var(--main-brand);
}

/* 햄버거 (≤1024에서 표시) */
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.header__toggle span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--main-ink);
  transition: transform .25s ease, opacity .25s ease;
}
.header__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header__toggle.is-open span:nth-child(2) { opacity: 0; }
.header__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================
   block: hero (리뉴얼 — 2컬럼: 일러스트 카드 + 소식 패널/퀵링크)
   ========================================================== */
.hero {
  display: flex;
  align-items: center;
  min-height: 787px;
  background: #e7eff4;
}
.hero__grid {
  display: flex;
  gap: 26px;
  align-items: stretch;
}
.hero__card {
  position: relative;
  flex: 1 1 auto;
  min-height: 690px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--main-selected01-pale, #f0f7f1);
}
.hero__artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__copy {
  position: absolute;
  top: 9.3%;
  left: 4.7%;
  max-width: 55%;
}
.hero__label {
  display: inline-block;
  margin: 0 0 4.5%;
  padding: 6px 12px;
  border-radius: 16px;
  background: #e1f0f8;
}
.hero__label span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15px;
  color: #214f70;
  white-space: nowrap;
}
.hero__title {
  margin: 0 0 22px;
  font-family: 'Jua', var(--font-kr);
  font-size: clamp(30px, 2.5vw, 48px);
  line-height: 1.29;
  font-weight: 400;
  color: var(--main-brand);
}
.hero__title mark {
  background: linear-gradient(transparent 55%, #ffe7a1 55%, #ffe7a1 92%, transparent 92%);
  color: inherit;
}
.hero__desc {
  margin: 0 0 40px;
  font-size: 17px;
  line-height: 28px;
  color: #466052;
}
.btn--round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 180px;
  height: 56px;
  padding: 16px 22px;
  border-radius: 28px;
  background: var(--main-brand);
  color: var(--main-white);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s ease;
}
.btn--round:hover { opacity: .92; }

.hero__side {
  flex: 0 0 475px;
  min-width: 0; /* 긴 제목이 패널을 밀어내지 못하게 */
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.hero__side .notice-panel { flex: 1 1 auto; } /* 히어로 카드 높이와 동기화 */

/* 최신소식 패널 */
.notice-panel {
  display: flex;
  flex-direction: column;
  min-height: 539px;
  padding: 26px;
  background: var(--main-white);
  border: 1px solid #cee5f3; /* sky/line — 하늘색 포인트 패널 (Section 6) */
  border-radius: 24px;
}
.notice-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 26px;
}
.notice-panel__tabs {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 0 2px;
  background: #edf6fc; /* sky/soft 탭 트랙 — 탭만 감싸고 + 버튼은 트랙 밖 (Section 6 v2) */
  border-radius: 12px;
}
.notice-panel__tab {
  flex: 0 0 108px;
  height: 48px;
  margin-top: 2px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: var(--font-kr);
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  color: #214f70; /* sky/ink */
  cursor: pointer;
}
.notice-panel__tab.is-active {
  height: 52px;
  margin-top: 0;
  background: #a9d4ef; /* sky/active — 텍스트는 하늘 잉크 유지 */
  color: #214f70;
}
.notice-panel__more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  height: 48px;
  margin-top: 2px;
  margin-left: auto;
  padding: 12px;
}
.notice-panel__divider { height: 1px; background: #cee5f3; }
/* 히어로 카드(690px)와 높이 동기화 — 남는 공간은 항목 간격이 균등 분산 */
.notice-panel__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}
.notice-panel__post {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--main-line);
  text-decoration: none;
}
.notice-panel__post.is-last { border-bottom: 0; }
.notice-panel__post.is-hidden { display: none; }
.notice-panel__post-title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 29px;
  color: var(--main-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice-panel__post:hover .notice-panel__post-title { color: var(--main-brand); }
.notice-panel__post-date {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  line-height: 26px;
  color: var(--main-muted);
}
.notice-panel__empty {
  padding: 24px 0;
  font-size: 16px;
  color: var(--main-muted);
}
.notice-panel__viewall {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 16px;
  background: #edf6fc; /* sky/soft 버튼 */
  border: 1px solid #cee5f3;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #214f70;
  text-decoration: none;
  margin-top: auto;
}
.notice-panel__viewall img { margin-left: auto; }
.notice-panel__viewall:hover { background: #f4f9fc; }

/* 퀵링크 4카드 */
.quick-links {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 112px;
  height: 106px;
  padding: 8px;
  background: var(--main-white);
  border: 1px solid #cee5f3;
  border-radius: 18px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.quick-links a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(23, 46, 36, .1);
}
.quick-links img { width: 64px; height: 64px; object-fit: contain; }
.quick-links span {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #173f34;
}

/* ==========================================================
   block: services (리뉴얼 — 생성형 아이콘 5카드)
   ========================================================== */
.services {
  background: var(--main-white);
  padding: 64px 0;
}
.services__grid {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.services__grid li {
  flex: 1 1 0;
  min-width: 0;
}
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 284px;
  padding: 20px;
  background: var(--main-white);
  border: 1px solid #d6e8de;
  border-radius: 18px;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23, 46, 36, .1);
}
.service-card__icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.service-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  color: #173f34;
}
.service-card__desc {
  font-size: 14px;
  line-height: 21px;
  color: var(--main-muted);
}
.service-card__arrow { margin-top: 2px; }

/* ==========================================================
   block: gallery (리뉴얼 — 카메라 아이콘 헤더 + 자원봉사 스트립)
   ========================================================== */
.gallery {
  background: #fcfcf7; /* 크림 톤 — Section 6 */
  padding: 40px 0 72px;
}
.gallery__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.gallery__head-copy {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.gallery__head-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  margin: -12px 0 0;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0 0 56px;
  padding: 0;
  list-style: none;
}
.gallery-card a {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
}
.gallery-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background-color: var(--main-gray);
  background-size: cover;
  background-position: center;
}
.gallery-card p {
  margin: 0;
  font-size: 16px;
  line-height: 26px;
  color: var(--main-ink);
}
.gallery-card a:hover p { text-decoration: underline; }

/* 메인 갤러리 카드 — 폴라로이드형 (Section 6). 갤러리 페이지(.sub-gallery)는
   기본 .gallery-card 스타일을 그대로 쓰므로 섹션 스코프로 한정한다 */
.gallery .gallery-card a {
  position: relative;
  gap: 16px;
  padding: 14px;
  background: var(--main-white);
  border: 1px solid #d6e8de;
  border-radius: 12px;
  box-shadow: 0 5px 6px rgba(13, 51, 31, .04);
}
.gallery .gallery-card__thumb {
  aspect-ratio: auto;
  height: 216px;
  border-radius: 8px;
}
.gallery .gallery-card p {
  font-size: 18px;
  line-height: 27px;
  color: #173f34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-card__tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 76px;
  height: 22px;
  border-radius: 3px;
  transform: translateX(-50%) rotate(4deg);
  z-index: 1;
}
.gallery-card__tape--1 { background: #d5e8b2; }  /* 연두 */
.gallery-card__tape--2 { background: #fae7ab; }  /* 노랑 */
.gallery-card__tape--3 { background: #f8bdc4; }  /* 핑크 */
.gallery-card__tape--4 { background: #a9d4ef; }  /* 하늘 */

/* 자원봉사 배너 스트립 (후원 분리 — 리뉴얼) */
.volunteer-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: #f0f7f1;
  border-radius: 16px;
}
.volunteer-strip__icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex-shrink: 0;
}
.volunteer-strip__copy { flex: 1 1 auto; }
.volunteer-strip__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  color: #173f34;
}
.volunteer-strip__desc {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--main-muted);
}
.volunteer-strip__btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  width: 170px;
  height: 56px;
  padding: 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}
.volunteer-strip__btn img { margin-left: auto; }

/* ==========================================================
   block: contact (상담 스트립 + 배너 로고)
   ========================================================== */
.contact {
  background: #e7efe9;
  padding: 56px 0;
}
/* 연락처 스트립 — 아이콘+카피 조합 (Section 6) */
.contact-phone { display: flex; align-items: center; gap: 20px; }
.contact-phone__icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--main-brand);
}
.contact-phone__copy { display: flex; flex-direction: column; gap: 3px; }
.contact-phone__label { margin: 0; font-size: 15px; font-weight: 500; line-height: 24px; color: var(--main-brand); }
.contact-phone__number {
  margin: 0; font-size: 36px; font-weight: 700; line-height: 48px;
  letter-spacing: -0.5px; color: var(--main-brand); text-decoration: none;
}
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-item > img { flex-shrink: 0; margin-top: 2px; }
.contact-item__label { margin: 0; font-size: 15px; font-weight: 500; line-height: 24px; color: var(--main-brand); }
.contact-item__value { margin: 4px 0 0; font-size: 16px; line-height: 26px; color: var(--main-ink); }
.contact-item__value--small { font-size: 14px; line-height: 22px; color: var(--main-muted); }

.contact__row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: stretch;
}
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 0 640px;
  max-width: 100%;
  min-height: 137px;
  padding: 30px;
  background: var(--main-white);
  border: 1px solid var(--main-line);
  border-radius: 24px;
}
.band-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-shrink: 0;
  width: 310px;
  min-height: 144px;
  padding: 21px 34px 15px;
  background: var(--main-brand);
  border-radius: 24px;
  color: var(--main-white);
  text-decoration: none;
  transition: opacity .2s ease;
}
.band-card:hover { opacity: .92; }
.band-card img { width: 41px; height: 41px; object-fit: contain; }
.band-card__title {
  margin-top: 8px;
  font-size: 24px;
  line-height: 26px;
  font-weight: 700;
}
.band-card__desc {
  margin-top: 1px;
  font-size: 15px;
  line-height: 26px;
  font-weight: 400;
}

/* 배너 로고 마퀴 — 관련기관 9종 무한 슬라이드 (Section 6)
   구조: 트랙(=세트×2)을 -50% 이동 → 세트 경계 없이 끊김 없는 루프 */
.banner-strip {
  overflow: hidden;
  margin-top: 24px;
  padding: 32px 0;
  background: var(--main-white);
  border-radius: 24px;
}
.banner-strip__track {
  display: flex;
  width: max-content;
  animation: banner-marquee 72s linear infinite;
}
.banner-strip:hover .banner-strip__track { animation-play-state: paused; }
.banner-strip__set {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 48px 0 0; /* 세트 사이 간격 — 루프 이음새 */
  margin: 0;
  list-style: none;
}
.banner-strip__set img {
  height: 96px;
  width: auto;
  object-fit: contain;
}
@keyframes banner-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .banner-strip__track { animation: none; }
}

/* ----------------------------------------------------------
   block: footer (1920 기준 396높이, 브랜드 그린)
   ---------------------------------------------------------- */
/* Figma PTFAMILY/Footer/1920 — 36+128+28+30+14+28+12+28+36+24+32 = 396px */
.footer {
  padding: 36px 0 32px;
  background: var(--main-brand);
}
.footer__info {
  text-align: center;
  color: var(--main-white);
}
.footer__name {
  font-family: var(--font-kr);
  font-size: 19px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.19px;
}
.footer__addr, .footer__contact {
  font-family: var(--font-kr);
  font-size: 17px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.17px;
}
.footer__addr { margin-top: 14px; }
.footer__contact { margin-top: 12px; }
.footer__copy {
  margin-top: 36px;
  text-align: center;
  font-family: var(--font-kr);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.14px;
  color: #d2e3d8;
}

/* ==========================================================
   반응형 — 1920의 문장을 각 화면의 문법으로 다시 쓰기
   원칙
   ① 일러스트는 모든 폭의 감정 앵커 (잘리지 않고 인사한다)
   ② 사업 5카드는 동등한 형제 — 고아 카드 없는 구성
   ③ 그린 액센트 체계를 브라우저 기본면까지 확장
   ④ 손가락 우선 — 44px+ 타깃, hover 의존 제거
   ⑤ 핵심 정보는 상호작용 없이 노출 (접근성 최우선 관객)
   브레이크포인트: 1440 / 1280 / 1200 / 1024 / 768 / 640 / 480
   ========================================================== */

/* ≤1440 : 노트북 — GNB 간격 축소 */
@media (max-width: 1440px) {
  .header__gnb { gap: 40px; }
  .header__gnb > .gnb-item > a { font-size: 20px; line-height: 26px; letter-spacing: -0.3px; }
  .hero { display: block; min-height: 0; padding: 40px 0; }
  .hero__grid { flex-direction: column; align-items: stretch; }
  /* 세로 스택 구간 — 퀵링크 4카드가 행 전체를 균등하게 채운다 (고정 112px는 좌측 몰림) */
  .quick-links li { flex: 1 1 0; min-width: 0; }
  .quick-links a { width: 100%; }
}


/* ≤1446 : 세로 쌓임 구간(행 폭 < 1399px) — 쌓이는 순간부터 밴드 카드는 행 전체 폭.
   전환점은 .contact-card의 flex 계산(1064+25+310=1399, 컨테이너 여백 48px)과 맞물림 — 수치를 바꾸면 같이 수정 */
@media (max-width: 1446px) {
  .contact__row { display: grid; gap: 26px; grid-auto-rows: 1fr; }  /* 쌓임 구간에서도 두 카드 높이 동일 */
  .band-card { width: 100%; height: auto; padding: 24px 28px; }
  .band-card__title { margin-top: 10px; }
}

/* ≤1280 : contact 스트립 컴팩트 (세로 쌓임 자체는 행 폭 기준으로 자동 처리됨) */
@media (max-width: 1280px) {
  .contact { padding: 56px 0; }
  .contact-card {
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 48px;
    row-gap: 24px;
    padding: 28px;
  }
}

/* ≤1200 : 5열이 숨 막히기 시작하는 지점 — 3열, 뉴스+후원 세로, 갤러리 2열 */
@media (max-width: 1200px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .news { padding-top: 80px; }
  .news__row { flex-direction: column; gap: 40px; }
  /* 세로 전환 시 flex-start(가로축)로 내용폭이 되는 것을 방지 */
  .news__main { width: 100%; }
  /* 쌓임 구간에서는 카드를 패널로 — 640에 가두면 좌측에 붙어 빈 공간이 생긴다 */
  .volunteer { width: 100%; }
  .gallery { padding: 72px 0 64px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  /* 2열에서는 높이 교차 대신 균일 비율 — '동등함'을 유지 */
  .gallery-card__thumb,
  .gallery-card--tall .gallery-card__thumb { height: auto; aspect-ratio: 4 / 3; }
}

/* 641–1200 : 세로로 쌓인 후원 카드 — 465px 원본 비율이 깨지는 구간.
   텍스트 좌 · 장식 우 2컬럼 그리드로 폭을 채운다 (장식은 설명 하단 우측에 정착) */
@media (max-width: 1200px) and (min-width: 641px) {
  .volunteer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "label   label"
      "title   deco"
      "desc    deco"
      "actions actions";
    column-gap: 24px;
  }
  .volunteer__label { grid-area: label; }
  .volunteer__title { grid-area: title; }
  .volunteer__desc { grid-area: desc; }
  .volunteer__deco {
    grid-area: deco;
    width: auto;
    align-self: end;      /* 원본처럼 버튼 위 우측에 붙인다 */
    justify-self: end;
  }
  .volunteer__actions { grid-area: actions; }
}

/* ≤1024 : GNB → 드로어 / 태블릿 — 사업 2열, 다섯 번째 카드는 가로형으로 행을 닫는다 */
@media (max-width: 1024px) {
  /* 카드가 이미지 원본(1448×1086) 폭 아래로 줄어드는 구간 — 고정 높이 대신 원본 비율 유지(크롭 없음) */
  .hero__card { height: auto; min-height: 0; aspect-ratio: 1448 / 1086; }
  .header { height: 72px; }
  .header__logo img { width: min(280px, 52vw); height: auto; }
  .header__toggle { display: flex; }
  .header__gnb {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    gap: 0;
    padding: 4px 24px 12px;
    background: var(--main-white);
    border-top: 1px solid var(--main-line);
    box-shadow: 0 24px 32px rgba(23, 46, 36, .10);
    animation: gnb-in .22s ease-out;
    /* 헤더 고정(sticky)에 맞춰 드로어도 항상 닿게 — 넘치면 내부 스크롤 */
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .header__gnb.is-open { display: flex; }
  /* 드로어 — 새 gnb-item/gnb-sub 구조 */
  .header__gnb .gnb-item { border-bottom: 1px solid var(--main-line); }
  .header__gnb > .gnb-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px; /* 터치 타깃 54px 확보 */
    font-size: 19px;
  }
  .gnb-item__link::after {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--main-muted);
    border-bottom: 2px solid var(--main-muted);
    transform: rotate(45deg);
    transition: transform .2s ease;
  }
  .gnb-item.is-open > .gnb-item__link::after { transform: rotate(-135deg); }
  .header__gnb .gnb-sub {
    display: none;
    position: static;
    transform: none;
    margin: 0;
    padding: 0 0 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .header__gnb .gnb-sub::before { display: none; } /* 드로어에서는 호버 갭 브리지 불필요 */
  /* 전역 :focus-within 드롭다운 규칙이 탭 직후 포커스에 적용되어 접기를 막는다 —
     :not(.is-open)으로 명시도를 높여 닫힘 상태를 우선시한다 (키보드는 Enter로 열림) */
  .header__gnb .gnb-item:not(.is-open) > .gnb-sub { display: none; }
  .header__gnb .gnb-item.is-open > .gnb-sub { display: block; }
  .header__gnb .gnb-sub a { padding: 11px 14px; font-size: 16px; color: var(--main-muted); border-bottom: 0; }
  .header__gnb .gnb-item:last-child { border-bottom: 0; }

  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid li:last-child { grid-column: 1 / -1; }
  .services__grid li:last-child .service-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 20px;
    min-height: 0;
    padding: 20px 24px;
  }
  /* 가로형 카드: 디스크 | 제목 | 설명 ···············→ 화살표는 우단 */
  .services__grid li:last-child .service-card__body {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
  .services__grid li:last-child .service-card__arrow { margin-left: auto; }
}

@keyframes gnb-in {
  from { opacity: 0; transform: translateY(-8px); }
}

/* ≤768 : 모바일 — 히어로는 오버레이 구성을 유지하며 재작도(再作圖)
   타이포는 4.8vw 기반 단일 clamp 스케일 — 640/480 경계와 무관하게
   넓어지면 커지고 좁아지면 작아지는 단조(monotonic) 곡선 하나로 통일 */
@media (max-width: 768px) {
  .btn { height: 48px; padding: 12px 16px; }
  .btn img { width: 16px; height: 16px; }
  .hero__card { height: auto; min-height: 0; aspect-ratio: 1448 / 1086; }
  .hero__copy { top: 8.5%; left: 5%; }
  .hero__label { margin-bottom: 2.5%; }
  .hero__label span { font-size: clamp(9px, 1.5vw, 11px); }
  .hero__title { font-size: clamp(23px, 4.8vw, 30px); line-height: 1.3; margin-bottom: clamp(10px, 2.2vw, 22px); }
  .hero__desc { font-size: clamp(13px, 2.6vw, 17px); line-height: 1.6; margin-bottom: clamp(14px, 4vw, 28px); }

  .news { padding-top: 64px; }
  .news__cards { gap: 16px; }

  .gallery { padding: 56px 0 48px; }
  .gallery__head { flex-direction: column; gap: 20px; }
  .gallery__more { margin-top: 0; width: 100%; }
  .gallery__grid { gap: 16px; margin-top: 28px; }
  .gallery-card p { font-size: 14px; line-height: 22px; }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    border-radius: 16px;
  }
  .band-card { border-radius: 16px; }

  .footer { padding: 32px 0 max(32px, env(safe-area-inset-bottom)); }
  .footer__info { padding: 0 20px; }
  .footer__name { font-size: 17px; line-height: 26px; }
  .footer__addr { margin-top: 10px; }
  .footer__contact { margin-top: 6px; }
  .footer__addr, .footer__contact { font-size: 14px; line-height: 22px; }
  .footer__copy { margin-top: 28px; padding: 0 20px; font-size: 12px; }
}

/* ≤640 : 모바일 — 사업 카드 세로 스택 (리뉴얼 마크업 기준) */
@media (max-width: 640px) {
  .contact__row { display: flex; flex-direction: column; }  /* 폰에서는 자연 높이 */
  .contact-card { flex: 0 0 auto; }  /* 세로 flex에서 flex-basis 640px가 높이로 적용되는 것 방지 */
  .services { padding: 20px 0 36px; }
  .service-card {
    display: grid;
    grid-template-columns: 56px 1fr 22px;
    grid-template-areas: "icon title arrow" "icon desc arrow";
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    row-gap: 3px;
    padding: 14px;
    text-align: left;
  }
  .service-card__icon { grid-area: icon; width: 56px; height: 56px; }
  .service-card__title { grid-area: title; font-size: 16px; line-height: 22px; word-break: keep-all; }
  .service-card__desc { grid-area: desc; font-size: 12px; line-height: 17px; word-break: keep-all; }
  .service-card__arrow { grid-area: arrow; align-self: center; }

  /* 리스트 행의 터치 면적 확대 + 날짜는 계층을 한 단계 내려 calm하게
     (미디어쿼리 여는 줄이 유실돼 전 폭에 적용되던 조각 — ≤640으로 복귀) */
  .news-card li { padding: 8px 0; margin-bottom: 0; }
  .news-card li a { flex: 1; padding: 4px 0; font-size: 16px; line-height: 24px; }
  .news-card li time { font-size: 13px; line-height: 24px; color: var(--main-muted); }
  .volunteer__actions { width: 100%; }
  .volunteer__actions .btn { flex: 1 1 0; min-width: 0; padding: 12px 8px; }
  .contact-phone__number { font-size: clamp(28px, 7.5vw, 36px); }
}

/* ≤480 : 저해상도 모바일 마무리 */
@media (max-width: 480px) {
  .header__logo img { width: min(230px, 58vw); }
  .hero { padding-top: 12px; }
  /* 전화 아이콘 원 + 번호 폭이 320까지 수납되도록 축소 */
  .contact-phone { gap: 14px; }
  .contact-phone__icon { width: 56px; height: 56px; }
  .contact-phone__icon img { width: 28px; height: 28px; }
  .contact-phone__number { font-size: clamp(22px, 6.8vw, 30px); line-height: 40px; }
}

/* 터치 기기 — hover 의존 제거, 눌림 피드백으로 대체 */
@media (hover: none) {
  .service-card:hover { box-shadow: none; transform: none; }
  .service-card:active { transform: scale(.985); }
  .btn:active { transform: scale(.97); }
  .band-card:active { transform: scale(.985); }
}

/* ==========================================================
   리뉴얼 블록 반응형 (2026-10-14)
   ========================================================== */
@media (max-width: 1200px) {
  .services__grid { flex-wrap: wrap; }
  .services__grid li { flex: 1 1 calc(33.33% - 16px); min-width: 240px; }
  .service-card { width: auto; }
  .quick-links { flex-wrap: wrap; }
  .quick-links li { flex: 1 1 calc(50% - 9px); }
  .quick-links li a { width: 100%; }
  .volunteer-strip { flex-wrap: wrap; }
  .volunteer-strip__btn { width: 100%; }
  .banner-strip { padding: 28px 0; }
}
@media (max-width: 1024px) {
  .services__grid li { flex: 1 1 calc(50% - 16px); min-width: 0; }
  .gallery__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gallery__more { width: 100%; }
}
@media (max-width: 640px) {
  /* 히어로 타이포는 ≤768 단일 clamp 스케일이 담당 — 여기선 배치 폭만 */
  .hero__grid { min-width: 0; }
  .hero__copy { max-width: 80%; }
  .services__grid li { flex: 1 1 100%; min-width: 0; }
  .service-card { height: auto; padding: 24px 20px; }
  .service-card__title { word-break: keep-all; }
  .service-card__desc {
    word-break: keep-all;
    max-width: 200px;
  }
  .banner-strip { padding: 24px 0; }
  .banner-strip__set { gap: 32px; padding-right: 32px; }
  .banner-strip__set img { height: 64px; }
  .notice-panel { min-height: 0; padding: 18px; }
  .notice-panel__body { flex: 0 0 auto; display: block; }
  .notice-panel__tab { flex: 1 1 auto; width: auto; }
  .notice-panel__more { display: none; }  /* ≤640 — 플러스(더보기) 아이콘 제거 */
  .volunteer-strip__title { font-size: 20px; line-height: 30px; }
}

/* ≤480 : 초소형 모바일 — 영문 라벨 필은 좁은 카드에서 전 폭을 잠식해 답답한 원인.
   제거하고 타이틀·설명·버튼만 여유 있는 간격으로 배치한다 */
@media (max-width: 480px) {
  .header__logo img { width: min(230px, 58vw); }
  .hero { padding-top: 12px; }
  .hero__label { display: none; }
  .hero__title { margin-bottom: 12px; }
  .hero__desc { margin-bottom: 16px; }
  /* 갤러리 폴라로이드는 2열로 좁히면 썸네일(216px 고정 높이)이 세로로 눌린 형태가 된다 — 1열 전환 */
  .gallery__grid { grid-template-columns: 1fr; }
}

/* ≤280 : 초협폭 비상 티어 — 메인 고정폭 요소(전화 원·탭·버튼) 수납 */
@media (max-width: 280px) {
  .contact-phone { flex-direction: column; align-items: flex-start; gap: 10px; }
  .contact-phone__icon { width: 48px; height: 48px; }
  .contact-phone__icon img { width: 24px; height: 24px; }
  .contact-phone__number { font-size: 15px; line-height: 24px; }
  .notice-panel__tab { padding: 10px 2px; font-size: 12px; flex: 1 1 0; min-width: 0; }
  .hero__copy { max-width: 100%; }
  .hero__copy .btn { padding: 10px 6px; font-size: 13px; gap: 6px; }
  .hero__copy .btn img { width: 14px; height: 14px; }
  .service-card { grid-template-columns: 40px 1fr 12px; column-gap: 10px; }
  .service-card__icon { width: 40px; height: 40px; }
  .news-card__title, .gcard__title, .quick-links span { overflow-wrap: anywhere; }
  .hero__title, .hero__desc { overflow-wrap: anywhere; }
  .notice-panel__post { min-width: 0; }
  .notice-panel__post-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
}

/* ≤280 2차 — keep-all 합성어 줄바꿈 허용 + 스텝 카드 단일 열 */
@media (max-width: 280px) {
  .footer__name, .footer__addr, .footer__contact, .footer__copy { overflow-wrap: anywhere; }
  .sec-title, .sec-desc { overflow-wrap: anywhere; }
  .service-card__title, .service-card__desc { overflow-wrap: anywhere; }
  .step { grid-template-columns: 1fr; row-gap: 10px; padding: 16px; }
}

/* ≤280 3차 — 탭·버튼·연락처 행 잔여 수납 */
@media (max-width: 280px) {
  .notice-panel__tab { height: auto; min-height: 40px; line-height: 1.3; overflow-wrap: anywhere; }
  .notice-panel__tab.is-active { height: auto; }
  .hero__copy .btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .contact-item__value { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
  .contact-item__label { font-size: 13px; line-height: 18px; }
}

/* ≤280 4차 — 갤러리 카드 그리드 minmax(0,1fr)로 수축 허용 */
@media (max-width: 280px) {
  .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery-card__title { font-size: 13px; overflow-wrap: anywhere; }
  .gcard__title { overflow-wrap: anywhere; }
}

/* ≤280 5차 — 갤러리 헤더 세로 쌓임 (카메라 일러스트가 제목 폭을 잠식하는 것 방지) */
@media (max-width: 280px) {
  .gallery__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .gallery__head img, .gallery__head .sec-illust { width: 48px; height: 48px; }
}
