/* ============================================================
   초록코끼리(Green Elephant) — 공통 스타일
   색·폰트·간격을 :root 변수로 정리해 두었습니다.
   디자인 수정은 대부분 아래 변수만 바꾸면 됩니다.
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  /* 색상 */
  --green-900: #14342b;   /* 가장 진한 숲 */
  --green-700: #1f5c45;
  --green-600: #2e7d5b;
  --green-500: #3a9b6e;
  --lime:      #9fd84f;   /* 강조(라임) */
  --bg:        #fafaf7;   /* 따뜻한 오프화이트 */
  --surface:   #ffffff;
  --ink:       #1a1a1a;
  --muted:     #6b7280;
  --line:      #e7e7e1;

  /* 타이포 */
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* 레이아웃 */
  --maxw: 1180px;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 52, 43, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* 섹션 공통 */
.section { padding: 96px 0; }
.eyebrow {
  display: inline-block; font-size: .82rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green-600); font-weight: 700;
  margin-bottom: 14px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.25;
  font-weight: 800; color: var(--green-900); letter-spacing: -.02em;
}
.section .lead { color: var(--muted); margin-top: 16px; max-width: 640px; }

/* ── 헤더 ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--green-900); }
.nav .logo .mark { font-size: 1.4rem; }
.nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav ul a { font-weight: 600; font-size: .95rem; color: var(--ink); transition: color .15s; }
.nav ul a:hover { color: var(--green-600); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }

/* ── 버튼 ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s;
}
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-ghost { background: transparent; color: var(--green-900); border-color: var(--green-900); }
.btn-ghost:hover { background: var(--green-900); color: #fff; }

/* ── 히어로 ─────────────────────────────────────────── */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; color: #fff; text-align: center; }
.hero video, .hero .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero .hero-fallback { background: linear-gradient(135deg, var(--green-900), var(--green-600)); }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(15, 35, 28, .55); z-index: -1; }
.hero .badge {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
  font-size: .85rem; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
.hero p { margin: 22px 0 34px; font-size: clamp(1rem, 2vw, 1.2rem); opacity: .92; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .actions .btn-ghost { color: #fff; border-color: #fff; }
.hero .actions .btn-ghost:hover { background: #fff; color: var(--green-900); }

/* ── 카드 그리드 ────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; color: var(--green-900); margin-bottom: 12px; font-weight: 700; }
.card p { color: var(--muted); font-size: .95rem; }
.card .num { font-size: .8rem; color: var(--lime); font-weight: 800; letter-spacing: .1em; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 12px;
  border-radius: 999px; background: rgba(46, 125, 91, .1); color: var(--green-700);
  margin-bottom: 12px;
}

/* 값(Value) 강조 카드 */
.value-card { border-top: 4px solid var(--lime); }

/* 단계 목록 — 01 카드 안에서 하나의 박스로, 단계당 한 줄 */
.steps-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.steps-list[hidden] { display: none; }
.steps-list .step-row { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.steps-list .step-row:last-child { border-bottom: 0; }
.steps-list .step-row b { color: var(--green-700); white-space: nowrap; }
.steps-list .step-row span { color: var(--muted); }

/* 토글(단계 펼치기) */
.toggle-btn { margin-top: 16px; background: none; border: 1.5px solid var(--green-600); color: var(--green-700); padding: 8px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: .85rem; transition: all .15s; }
.toggle-btn:hover { background: var(--green-600); color: #fff; }
.toggle-btn .chev { font-size: .75rem; }

/* 카드 내 사진 갤러리 (프로젝트 사진용) — 2열 그리드 (2×2 → 2×3 자동 확장) */
.card-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 4px; }
.card-gallery img, .card-gallery .ph { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }

/* People */
.people { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 36px; }
.person { text-align: center; }
.person .avatar { width: 100%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, var(--green-500), var(--lime)); margin-bottom: 14px; }
.person h4 { color: var(--green-900); }
.person small { color: var(--muted); }

/* Partners */
.partners { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.partner { flex: 1 1 160px; text-align: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.contact-info dl { display: grid; gap: 20px; }
.contact-info dt { font-weight: 700; color: var(--green-900); }
.contact-info dd { color: var(--muted); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: .95rem; background: var(--surface);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--green-500);
}

/* ── 푸터 ───────────────────────────────────────────── */
.site-footer { background: var(--green-900); color: #cfe5da; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h5 { color: #fff; margin-bottom: 16px; font-size: .9rem; letter-spacing: .05em; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--lime); }
.site-footer .brand p { margin-top: 14px; font-size: .9rem; opacity: .8; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; opacity: .75; }

/* 페이지 헤더(하위 페이지) */
.page-hero { background: linear-gradient(135deg, var(--green-900), var(--green-600)); color: #fff; padding: 100px 0 64px; }
.page-hero .eyebrow { color: var(--lime); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; }
.page-hero p { opacity: .9; margin-top: 14px; max-width: 620px; }

/* 상태 메시지 */
.empty, .loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3, .grid-4, .steps, .people, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .nav ul { position: fixed; top: 68px; right: 0; left: 0; background: var(--bg); flex-direction: column; padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--line); display: none; }
  .nav ul.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ============================================================
   Project 페이지 (목록 + 필터 + 상세)
   ============================================================ */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 32px; align-items: start; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card .thumb { aspect-ratio: 4 / 3; background: #eef0ee center / cover no-repeat; }
.project-card .project-card-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px; }
.project-card .project-card-foot h3 { font-size: 1.05rem; color: var(--green-900); font-weight: 700; line-height: 1.4; }
.project-card .project-card-foot .tag { margin: 0; flex: 0 0 auto; }

.filter-bar { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 88px; }
.filter-btn { padding: 12px 18px; border-radius: 999px; border: 0; background: #f1f3f1; color: var(--ink); font-weight: 700; font-family: inherit; cursor: pointer; font-size: .95rem; transition: all .15s; text-align: center; }
.filter-btn:hover { background: #e3e8e3; }
.filter-btn.active { background: var(--green-600); color: #fff; }

/* Project 상세 */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--green-600); font-weight: 700; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: .95rem; margin-bottom: 24px; }
.detail-title { font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--green-900); font-weight: 800; margin-bottom: 20px; }
.detail-body { color: #374151; font-size: 1.02rem; line-height: 1.8; max-width: 760px; }
.detail-body p { margin-bottom: 14px; }
.info-box { background: #f3f7f4; border-radius: 14px; padding: 24px 28px; margin: 28px 0; display: grid; gap: 14px; max-width: 760px; }
.info-box .row { display: flex; gap: 24px; }
.info-box dt { font-weight: 700; color: var(--green-900); min-width: 80px; }
.info-box dd { color: var(--muted); }
.detail-links { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-links a { background: #dff0e6; color: var(--green-700); padding: 12px 20px; border-radius: 10px; font-weight: 700; }
.detail-links a:hover { background: #cbe7d6; }

/* 상세 사진 — 좌우 스크롤 캐러셀 */
.photo-carousel { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; margin: 8px 0 28px; -webkit-overflow-scrolling: touch; }
.photo-carousel img, .photo-carousel .ph { flex: 0 0 auto; width: min(78%, 460px); aspect-ratio: 16 / 10; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); scroll-snap-align: start; }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: row; flex-wrap: wrap; position: static; }
  .filter-btn { flex: 1 1 auto; }
}

/* 히어로 배경 슬라이드 (관리자 업로드 사진) */
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slides.on + .hero-fallback { display: none; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 1s ease; }

/* ============================================================
   Press 페이지 (표 형식 목록 + 상세)
   ============================================================ */
.press-hero { background: var(--bg); color: var(--ink); text-align: center; padding: 80px 0 56px; border-bottom: 1px solid var(--line); }
.press-hero .eyebrow { color: var(--green-600); }
.press-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; color: var(--green-900); letter-spacing: -.02em; }
.press-hero h1 .hl { color: var(--green-600); }

.press-table { display: flex; flex-direction: column; gap: 16px; max-width: 980px; margin: 0 auto; }
.press-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 32px; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.press-row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.press-row-main h3 { font-size: 1.2rem; font-weight: 700; color: var(--green-900); margin-bottom: 8px; }
.press-row-main p { color: var(--muted); font-size: .95rem; }
.press-row-meta { flex: 0 0 auto; color: #9ca3af; font-size: .9rem; white-space: nowrap; display: flex; align-items: center; gap: 12px; }
.press-row-meta .sep { color: var(--line); }

/* 페이지네이션 */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; }
.pager button { min-width: 38px; height: 38px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: .95rem; color: var(--ink); }
.pager button:hover { background: #f1f3f1; }
.pager button.active { background: var(--green-900); color: #fff; font-weight: 700; }
.pager .dots { color: #9ca3af; }

/* Press 상세 */
.press-detail { max-width: 900px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 48px 56px; }
.press-detail .press-date { color: var(--green-600); font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.press-detail h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; color: #111827; margin-bottom: 28px; }
.press-detail .press-body { color: #374151; font-size: 1.02rem; line-height: 1.9; }
.press-detail .press-body p { margin-bottom: 18px; }
.press-detail .press-div { border: 0; border-top: 1px solid var(--line); margin: 32px 0 24px; }
.press-src-btn { display: inline-flex; align-items: center; gap: 6px; background: #dff0e6; color: var(--green-700); padding: 12px 22px; border-radius: 10px; font-weight: 700; }
.press-src-btn:hover { background: #cbe7d6; }

@media (max-width: 600px) {
  .press-row { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; }
  .press-detail { padding: 32px 22px; }
}
