/* 잇꿈 갤러리 스토리 페이지 (2026-11-13). custom.css의 lv_ 체계(남색 #243F60 | 금색 #CDAA6F/#8A7346 | 옅은 회색 #F4F6F9) 위에 얹는다.
   움직임은 transform, opacity만 쓴다. prefers-reduced-motion이면 정지. */

.yg {--navy: #243F60; --navy-deep: #182B43; --gold: #CDAA6F; --gold-ink: #8A7346; --ivory: #F4F6F9; --ink: #1D1D1B; --sub: #4A4A4A; --line: #E2E6EC;
  --ease: cubic-bezier(.2, .7, .2, 1); color: var(--ink); word-break: keep-all;}
.yg p {word-break: keep-all;}
.yg img {display: block; max-width: 100%;}
.yg .lv_wrap {width: 95%; max-width: 1400px; margin: 0 auto;}

/* ---------- 읽기 진행 막대 (스크롤 연동, 지원 브라우저만) ---------- */
.yg_progress {position: fixed; left: 0; right: 0; top: 0; z-index: 1001; height: 3px; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;}
@supports (animation-timeline: scroll()) {
  .yg_progress {animation: yg-progress linear both; animation-timeline: scroll(root);}
  @keyframes yg-progress {to {transform: scaleX(1);}}
}

/* ---------- 히어로 ---------- */
.sub_visual.yg_hero {position: relative; overflow: hidden; height: calc(100svh - 100px); min-height: 560px; max-height: 860px; background: var(--navy-deep);}
.yg_hero_slides {position: absolute; inset: 0;}
.yg_hero_slides img {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: yg-slide 21s infinite;}
/* 첫 장은 이미 다 떠오른 상태로 시작(빈 화면 없이), 나머지는 7초 간격 */
.yg_hero_slides img:nth-child(1) {object-position: center 55%; animation-delay: -1.5s;}
.yg_hero_slides img:nth-child(2) {object-position: center 45%; animation-delay: 5.5s;}
.yg_hero_slides img:nth-child(3) {object-position: center 40%; animation-delay: 12.5s;}
/* 7초씩 보여 주며 천천히 다가가는 화면(켄 번스). 겹치는 1.5초 동안 서로 녹아든다 */
@keyframes yg-slide {
  0% {opacity: 0; transform: scale(1.1);}
  7% {opacity: 1;}
  33% {opacity: 1;}
  40% {opacity: 0; transform: scale(1);}
  100% {opacity: 0; transform: scale(1);}
}
.yg_hero::after {content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 24, .35) 0%, rgba(8, 14, 24, .45) 55%, rgba(8, 14, 24, .65) 100%);}
.yg_hero .cb {text-shadow: 0 2px 24px rgba(0, 0, 0, .35);}
.yg_hero .inner_container {position: relative; z-index: 1; height: 100%;}
.yg_hero .cb {justify-content: center; align-items: center; text-align: center;}
.yg_hero_tit span {display: inline-block; font: inherit; letter-spacing: inherit;}  /* 줄이 넘칠 때 의미 덩어리 사이에서만 끊긴다. main_header.css가 span을 400으로 덮어써서 굵기, 자간을 제목에서 물려받게 한다 */
.sub_visual .cb h2.yg_hero_tit {margin: 0; padding: 0 16px; font-size: 64px; font-weight: 800; line-height: 1.3; letter-spacing: -0.025em; color: #fff; word-break: keep-all;}  /* 메인 첫 화면(lv_hero_tit)과 같은 크기 */
  transition: background-color .2s ease, transform .15s ease;}
.yg_scroll {position: absolute; z-index: 1; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 14px;}
.yg_scroll::before {content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: yg-wheel 1.8s var(--ease) infinite;}
@keyframes yg-wheel {0% {opacity: 0; transform: translateY(-2px);} 30% {opacity: 1;} 100% {opacity: 0; transform: translateY(12px);}}
/* 스크롤하면 제목이 살짝 떠오르며 옅어진다 */
@supports (animation-timeline: view()) {
  .yg_hero .cb {animation: yg-hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 70%;}
  @keyframes yg-hero-out {to {opacity: 0; transform: translateY(-60px);}}
}

/* ---------- 들어가며 ---------- */
.yg_intro {padding: 150px 0 130px;}
.yg_statement {max-width: 1080px; margin: 0 auto; text-align: center; text-wrap: balance; font-size: clamp(26px, 3vw, 42px); font-weight: 700; line-height: 1.5; letter-spacing: -0.025em;}
.yg_statement em {font-style: normal; color: var(--navy); background: linear-gradient(transparent 62%, rgba(205, 170, 111, .38) 62%);}
.yg_intro_body {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; max-width: 1080px; margin: 72px auto 0;}
.yg_intro_body p {font-size: 18px; line-height: 1.85; color: var(--sub);}
.yg_index {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 96px;}
.yg_index a {position: relative; display: block; overflow: hidden; border-radius: 22px; aspect-ratio: 4 / 5; color: #fff; isolation: isolate;}
.yg_index a img {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease);}
.yg_index a::after {content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 20, 33, 0) 40%, rgba(12, 20, 33, .82) 100%);}
.yg_index a:hover img {transform: scale(1.05);}
.yg_index .t {position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 26px;}
.yg_index .no {font-size: 14px; font-weight: 700; letter-spacing: .14em; color: var(--gold);}
.yg_index h3 {margin-top: 10px; font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.02em;}
.yg_index .t p {margin-top: 8px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .82);}

/* ---------- 챕터 공통 ---------- */
.yg_ch {position: relative; padding: 140px 0;}
.yg_ch.ivory {background: var(--ivory);}
.yg_ch_grid {display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start;}
.yg_ch_text {position: sticky; top: 140px;}
.yg_ch_no {display: block; font-size: 120px; font-weight: 800; line-height: .9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.5px rgba(36, 63, 96, .28);}
.yg_ch_no + .lv_h2 {margin-top: 24px;}
.yg_ch_text .lv_h2 {font-size: 38px;}
.yg_ch p.body {margin-top: 22px; font-size: 18px; line-height: 1.85; color: var(--sub);}
.yg_ch_text p.body:first-of-type {margin-top: 30px;}
.yg_film_head p.body:first-child {margin-top: 0;}

/* 사진 모자이크 (오른쪽 칸) */
.yg_mosaic {display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px;}
.yg_mosaic figure {position: relative; margin: 0; overflow: hidden; border-radius: 18px; background: #e9e5dc;}
.yg_mosaic figure.w6 {grid-column: span 6;}
.yg_mosaic figure.w4 {grid-column: span 4;}
.yg_mosaic figure.w3 {grid-column: span 3;}
.yg_mosaic figure.w2 {grid-column: span 2;}
.yg_mosaic img {width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .9s var(--ease);}
.yg_mosaic figure.tall img {aspect-ratio: 3 / 4;}
.yg_mosaic figure.wide img {aspect-ratio: 16 / 9;}
.yg_mosaic figure.fill img {aspect-ratio: auto; height: 100%;}
.yg_mosaic button {display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;}
.yg_mosaic button:hover img {transform: scale(1.04);}

/* 현장 영상(짧은 반복) */
.yg_live {position: relative; margin: 0; overflow: hidden; border-radius: 18px; background: #0d1520;}
.yg_live video {display: block; width: 100%; height: 100%; object-fit: cover;}

/* ---------- 인용 ---------- */
.yg_quote_band {padding: 150px 0; background: var(--navy); color: #fff; text-align: center; overflow: hidden;}
.yg_quote_band blockquote {position: relative; max-width: 1100px; margin: 0 auto; padding-top: 70px; font-size: clamp(26px, 3.2vw, 46px); font-weight: 700; line-height: 1.45; letter-spacing: -0.025em;}
.yg_quote_band blockquote::before {content: "\201C"; position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 160px; line-height: 1; font-family: Georgia, serif; color: var(--gold);}
.yg_quote_band .cite {margin-top: 30px; font-size: 16px; letter-spacing: .04em; color: rgba(255, 255, 255, .7);}
.yg_quote_band .after {max-width: 820px; margin: 56px auto 0; font-size: 18px; line-height: 1.85; color: rgba(255, 255, 255, .82);}
.yg_quote_band .after + .after {margin-top: 18px;}

/* ---------- 가로로 넘기는 사진 띠 ---------- */
/* 옆으로 끝없이 흐르는 사진 띠: 같은 묶음 두 개를 이어 놓고 트랙을 정확히 절반(-50%)만큼 옮기면 이음매 없이 반복된다.
   transform만 움직여 합성 단계에서 처리된다. 마우스를 올리거나 키보드로 들어오면 멈춘다. */
.yg_marquee {margin-top: 90px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);}
.yg_marquee_track {display: flex; width: max-content; animation: yg-marquee var(--dur, 60s) linear infinite;}
.yg_marquee_set {display: flex; gap: 18px; padding-right: 18px;}
.yg_marquee:hover .yg_marquee_track, .yg_marquee:focus-within .yg_marquee_track {animation-play-state: paused;}
@keyframes yg-marquee {to {transform: translateX(-50%);}}
.yg_marquee figure {flex: 0 0 auto; width: clamp(260px, 26vw, 400px); margin: 0;}
.yg_marquee figure button {display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; border-radius: 18px;}
.yg_marquee img {width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; transition: transform .9s var(--ease);}
.yg_marquee figure button:hover img {transform: scale(1.04);}

/* ---------- 몽골 영상 ---------- */
.yg_ch.navy {background: var(--navy-deep); color: #fff;}
.yg_ch.navy .yg_ch_no {-webkit-text-stroke-color: rgba(255, 255, 255, .25);}
.yg_ch.navy .lv_lead, .yg_ch.navy p.body {color: rgba(255, 255, 255, .8);}
.yg_film_head {display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: end;}
.yg_film {position: relative; margin: 64px 0 0; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);}
.yg_film video {display: block; width: 100%; aspect-ratio: 16 / 9; background: #000;}

/* ---------- ESG 가치 ---------- */
/* 현장에서 배운 것: 사진을 깐 세로 패널. 위에 큰 영문(외곽선), 아래에 번호, 분야, 제목, 설명 */
.yg_values_head {display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 72px; align-items: end; margin-bottom: 56px;}
.yg_values_head .lv_h2, .yg_values_head .lv_lead {margin-top: 0;}
.yg_values {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;}
.yg_value {position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4;
  padding: 34px 32px 36px; border-radius: 24px; background: var(--navy-deep); color: #fff;}
.yg_value img {position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease);}
.yg_value::before {content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 20, 33, .1) 0%, rgba(12, 20, 33, .1) 38%, rgba(12, 20, 33, .9) 100%);}
.yg_value:hover img {transform: scale(1.05);}
#yg-gallery .lv_h2, #gallery .lv_h2, .yg .lv_cta.big h2 {margin-top: 0;}
.yg_value .k {display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: .04em; color: var(--gold);}
.yg_value .k b {font-weight: 700; color: rgba(255, 255, 255, .6);}
.yg_value h3 {margin-top: 14px; font-size: 26px; font-weight: 800; line-height: 1.35; letter-spacing: -0.02em;}
.yg_value p.d {margin-top: 12px; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .82);}
.yg_outcome {max-width: 980px; margin: 88px auto 0; text-align: center; font-size: clamp(20px, 2vw, 27px); font-weight: 600; line-height: 1.7; letter-spacing: -0.015em; color: var(--navy);}

/* ---------- 전체 갤러리 ---------- */
.yg_filters {display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px;}
.yg_filters button {padding: 11px 20px; border-radius: 999px; border: 1px solid #CFC7B6; background: #fff; font-size: 15px; font-weight: 600; color: #3A3A3A; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;}
.yg_filters button small {margin-left: 6px; font-size: 13px; font-weight: 500; color: #8A8A8A;}
.yg_filters button[aria-pressed="true"] {background: var(--navy); border-color: var(--navy); color: #fff;}
.yg_filters button[aria-pressed="true"] small {color: rgba(255, 255, 255, .7);}
.yg_filters button:active {transform: scale(.96);}
.yg_grid {columns: 4 260px; column-gap: 16px;}
.yg_grid figure {break-inside: avoid; margin: 0 0 16px; transition: opacity .35s ease, transform .35s var(--ease);}
.yg_grid figure[hidden] {display: none;}
.yg_grid button {display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #e9e5dc; cursor: zoom-in;}
.yg_grid img {width: 100%; height: auto; transition: transform .9s var(--ease);}
.yg_grid button:hover img {transform: scale(1.04);}
.yg_grid button:focus-visible, .yg_mosaic button:focus-visible, .yg_marquee button:focus-visible {outline: 3px solid var(--gold); outline-offset: 3px;}

/* ---------- 라이트박스 ---------- */
.yg_lb {width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff;}
.yg_lb::backdrop {background: rgba(10, 16, 26, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);}
.yg_lb[open] {display: grid; grid-template-rows: 1fr auto; animation: yg-lb-in .32s var(--ease);}
@keyframes yg-lb-in {from {opacity: 0; transform: scale(.97);}}
.yg_lb_stage {position: relative; display: grid; place-items: center; min-height: 0; padding: 70px 90px 10px; touch-action: pan-y;}
.yg_lb_stage img {max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; transition: opacity .25s ease;}
.yg_lb_stage img.is-loading {opacity: .2;}
.yg_lb_bar {display: flex; justify-content: center; align-items: center; gap: 18px; padding: 16px 20px 26px; font-size: 15px; color: rgba(255, 255, 255, .85);}
.yg_lb_bar .cnt {font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .55);}
.yg_lb button {position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; color: #fff; font-size: 22px; cursor: pointer;
  background: rgba(255, 255, 255, .12); transition: background-color .2s ease, transform .15s ease;}
.yg_lb button:hover {background: rgba(255, 255, 255, .22);}
.yg_lb button:active {transform: scale(.94);}
.yg_lb .close {top: 18px; right: 18px;}
.yg_lb .prev {left: 22px; top: 50%; margin-top: -26px;}
.yg_lb .next {right: 22px; top: 50%; margin-top: -26px;}

/* ---------- 맺음 ---------- */
.yg_closing {padding: 150px 0 130px; text-align: center;}
.yg_closing blockquote {max-width: 1000px; margin: 0 auto; font-size: clamp(24px, 2.8vw, 38px); font-weight: 700; line-height: 1.55; letter-spacing: -0.02em; color: var(--navy);}
.yg_closing p {max-width: 820px; margin: 36px auto 0; font-size: 18px; line-height: 1.85; color: var(--sub);}
.yg_closing .lv_cta {margin-top: 90px;}
/* 이 페이지는 실제 현장 사진만 쓴다: 맺음 상자 배경도 봉사단 단체 사진으로 */
.yg_closing .lv_cta.big {background: linear-gradient(rgba(20, 32, 52, .78), rgba(20, 32, 52, .9)), url(../img/sub/itkkum/gallery/youth-esg/35.jpg) center 55% / cover no-repeat;}

/* ---------- 잇꿈 페이지의 갤러리 소개 칸 ---------- */
.lv_gal_feature {position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: 520px; border-radius: 28px; overflow: hidden; background: var(--navy-deep, #182B43); color: #fff;}
.lv_gal_feature .ph {position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px;}
.lv_gal_feature .ph img {width: 100%; height: 100%; object-fit: cover;}
.lv_gal_feature .ph img:first-child {grid-row: span 2;}
.lv_gal_feature .tx {display: flex; flex-direction: column; justify-content: center; padding: 56px 54px;}
.lv_gal_feature .tx h3 {margin-top: 16px; font-size: 34px; font-weight: 800; line-height: 1.35; letter-spacing: -0.02em;}
.lv_gal_feature .tx p {margin-top: 18px; font-size: 17px; line-height: 1.75; color: rgba(255, 255, 255, .8);}
.lv_gal_feature .tx ul {display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px;}
.lv_gal_feature .tx li {padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-size: 14px; color: rgba(255, 255, 255, .85);}
.lv_gal_feature .tx .lv_btn {align-self: flex-start; margin-top: 34px; padding: 18px 34px; border-radius: 999px; background: #CDAA6F; color: #1D1D1B; font-size: 17px; font-weight: 700; transition: transform .15s ease;}
.lv_gal_feature .tx .lv_btn:active {transform: scale(.97);}

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .yg_ch_grid, .yg_film_head {grid-template-columns: minmax(0, 1fr); gap: 48px;}
  .yg_ch_text {position: static;}
  .yg_values_head {grid-template-columns: minmax(0, 1fr);}
  .yg_values {grid-template-columns: minmax(0, 1fr);}
  .yg_value {aspect-ratio: 4 / 3;}
  .lv_gal_feature {grid-template-columns: minmax(0, 1fr);}
  .lv_gal_feature .ph {height: 360px;}
}
@media (max-width: 900px) {
  .yg_intro {padding: 100px 0 90px;}
  .yg_intro_body {grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 48px;}
  .yg_index {grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 56px;}
  .yg_index a {aspect-ratio: 16 / 10;}
  .yg_ch, .yg_quote_band, .yg_closing {padding: 96px 0;}
  .yg_ch_no {font-size: 84px;}
  .yg_ch_text .lv_h2 {font-size: 30px;}
  .yg_marquee {margin-top: 64px;}
}
@media (max-width: 600px) {
  .sub_visual.yg_hero {min-height: 520px;}
  .sub_visual .cb h2.yg_hero_tit {font-size: 32px;}
    .yg_intro_body p, .yg_ch p.body, .yg_closing p, .yg_quote_band .after {font-size: 16px;}
  .yg_mosaic {gap: 10px;}
  .yg_mosaic figure.w2, .yg_mosaic figure.w3 {grid-column: span 3;}
  .yg_mosaic figure.w4 {grid-column: span 6;}
  .yg_marquee figure {width: 70vw;}
  .yg_grid {columns: 2; column-gap: 10px;}
  .yg_grid figure {margin-bottom: 10px;}
  .yg_value {aspect-ratio: 4 / 5; padding: 28px 24px 30px;}
  .yg_value h3 {font-size: 22px;}
  .yg_lb_stage {padding: 64px 12px 6px;}
  .yg_lb .prev, .yg_lb .next {top: auto; bottom: 14px; margin-top: 0;}
  .yg_lb .prev {left: 14px;} .yg_lb .next {right: 14px;}
  .yg_closing .lv_cta {margin-top: 60px;}
  .lv_gal_feature .ph {height: 260px;}
  .lv_gal_feature .tx {padding: 36px 26px;}
  .lv_gal_feature .tx h3 {font-size: 26px;}
}

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  .yg_hero_slides img {animation: none; transform: none;}
  .yg_hero_slides img:first-child {opacity: 1;}
  .yg_scroll::before {animation: none;}
  .yg_marquee {overflow-x: auto; -webkit-mask-image: none; mask-image: none;}
  .yg_marquee_track {animation: none;}
  .yg_marquee_set[aria-hidden] {display: none;}
  .yg_hero .cb, .yg_progress {animation: none;}
  .yg_progress {display: none;}
  .yg img, .yg_lb[open] {transition: none; animation: none;}
}
