/* ==========================================================================
   layout.css — 전역 팔레트 · 공통 레이아웃 · 공통 부품
   --------------------------------------------------------------------------
   메인은 먹색 다크, 서브(게시판)는 밝은 바탕.
     · 이 파일의 밝은 기본값은 서브 페이지(게시판·회원)용입니다.
     · 메인 페이지의 먹색 셸은 modify.css 가 #content:not(.sub) 에 덮어씁니다.
     · 포인트는 주칠 주홍(#c94f3d) 한 가지.
     · 폭은 .w_inner(--inner-size) 한 가지만 씁니다.
   ========================================================================== */
:root {
  /* ── 색 : (서브 페이지) 흰 바탕 + 주홍 포인트 ───────────── */
  --primary-color: #c94f3d; /* 브랜드 주홍 (버튼 · 블록 · 강조) */
  --secondary-color: #f9f7f4; /* 옅은 회색 면 */
  --point-color: #a83a2b; /* 진한 주홍 (호버 · 보조 포인트) */
  --lightgray-color: #f7f6f4;
  --white-color: #ffffff;
  --footerbg-color: #101113; /* 푸터 : 먹색 (메인·서브 공통) */
  --background-color: #faf9f7;

  --line-color: #e5e2dd; /* 기본 실선 */
  --line-strong: #222222; /* 강조 실선 (라벨 밑줄) */
  --text-color: #2b2b2b;
  --text-color-sub: #6f6c67; /* 본문 보조 글자 */
  --text-color-mute: #9b9892; /* 라벨 · 날짜 */

  /* ── 폭 ─────────────────────────────────────────────────── */
  --inner-size: 1440px;

  /* ── 섹션 세로 여백 ─────────────────────────────────────── */
  --sec-pad: 14rem;
}

html {
  font-size: 62.5%;
}

@media (max-width: 1280px) {
  html {
    font-size: clamp(9px, 0.78125vw, 10px);
  } /* ~9-10px */
}
@media (max-width: 1024px) {
  html {
    font-size: clamp(9px, 0.9765625vw, 10px);
  } /* ~9-10px */
}
@media (max-width: 768px) {
  html {
    font-size: clamp(8px, 1.3020833vw, 10px);
  } /* ensure min 8px */
}
@media (max-width: 480px) {
  html {
    font-size: clamp(8px, 2.0833333vw, 10px);
  }
}

@media (min-width: 480px) {
  a[href^="tel"] {
    pointer-events: none; /* 클릭 차단 */
    cursor: default; /* 클릭 불가 표시 */
  }
}

body {
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--text-color);
  background: var(--white-color);
  word-break: keep-all;
  hyphens: auto;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   폭 컨테이너
   ========================================================================== */
.inner {
  max-width: var(--inner-size);
  margin: 0 auto;
  padding: 0 2.4rem;
}

@media (max-width: 768px) {
  .inner {
    padding: 0 1.6rem;
  }
}

.w_inner {
  max-width: var(--inner-size);
  margin: 0 auto;
  padding: 0 2.4rem;
}

@media (max-width: 768px) {
  .w_inner {
    padding: 0 1.6rem;
  }
}

.w_inner_r {
  max-width: calc((100% - var(--inner-size)) / 2 + var(--inner-size));
  margin: 0 0 0 auto;
  padding: 0 0 0 2.4rem;
}

@media (max-width: 768px) {
  .w_inner_r {
    padding: 0 1.6rem;
  }
}

/* ==========================================================================
   섹션
   ========================================================================== */
.default {
  position: relative;
  padding: var(--sec-pad) 0;
}

.default.bg {
  background: var(--secondary-color);
}

@media (max-width: 1024px) {
  :root {
    --sec-pad: 10rem;
  }
}

@media (max-width: 768px) {
  :root {
    --sec-pad: 7.2rem;
  }
}

/* ==========================================================================
   공통 부품 ① — 라벨 + 밑줄 (레퍼런스의 'blank news' 머리 라벨)
   --------------------------------------------------------------------------
   작은 소문자 라벨 아래로 실선이 열 끝까지 이어지는 형태.
   글 묶음 · 카드 · 섹션 머리말 어디에나 쓴다.
   ========================================================================== */
.lb_rule {
  display: block;
  padding-bottom: 1.2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line-strong);

  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--text-color);
}

/* 옅은 변형 : 실선을 회색으로 */
.lb_rule.thin {
  border-bottom-color: var(--line-color);
  color: var(--text-color-mute);
}

/* ==========================================================================
   공통 부품 ② — 섹션 머리말
   ========================================================================== */
.sec_head {
  margin-bottom: 6.4rem;
}

/* 메인 섹션 제목 : 크기는 이 규칙에서만 관리한다 (각 섹션 파일에서 재정의 금지) */
.sec_head h2,
.title h2 {
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.sec_head .desc,
.title .desc {
  max-width: 62rem;
  margin-top: 2rem;

  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--text-color-sub);
}

/* 제목 안 강조 단어 */
.sec_head h2 em,
.title h2 em {
  font-style: normal;
  font-weight: inherit;
}

.title {
  margin-bottom: 5.6rem;
}

@media (max-width: 1024px) {
  .sec_head {
    margin-bottom: 4.8rem;
  }

  .sec_head h2,
  .title h2 {
    font-size: 3.6rem;
  }
}

@media (max-width: 768px) {
  .sec_head h2,
  .title h2 {
    font-size: 2.8rem;
  }

  .sec_head .desc,
  .title .desc {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   공통 부품 ③ — 검정 블록 (레퍼런스의 'about →' 정사각 블록)
   --------------------------------------------------------------------------
   사진 아래·옆에 걸쳐 놓는 검정 정사각형. 라벨 한 줄 + 화살표.
   <a class="blk"><span class="bl_tx">about</span><i class="bl_ar"></i></a>
   ========================================================================== */
.blk {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  width: 12.8rem;
  height: 12.8rem;
  padding: 2rem;

  background: var(--primary-color);
  color: var(--white-color);
  transition: background 0.3s;
}

.blk:hover {
  background: #17191b;
}

.blk .bl_tx {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white-color);
}

/* 화살표는 CSS 로 그린다 (아이콘 라이브러리에 기대지 않는다) */
.blk .bl_ar {
  position: relative;
  display: block;
  width: 2.4rem;
  height: 1px;
  background: var(--white-color);
  transition: transform 0.3s;
}

.blk .bl_ar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;

  width: 0.7rem;
  height: 0.7rem;
  border-top: 1px solid var(--white-color);
  border-right: 1px solid var(--white-color);
  transform: translateY(-50%) rotate(45deg);
}

.blk:hover .bl_ar {
  transform: translateX(0.4rem);
}

@media (max-width: 768px) {
  .blk {
    width: 10.4rem;
    height: 10.4rem;
    padding: 1.6rem;
  }
}

/* ==========================================================================
   공통 부품 ④ — 슬라이드 카운터 + 진행선 (레퍼런스의 '03 / 05 ————')
   ========================================================================== */
.meter {
  display: flex;
  align-items: center;
  gap: 2.4rem;

  font-size: 1.5rem;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--text-color-mute);
}

.meter .cur {
  color: var(--text-color);
}

.meter .bar {
  flex: 1;
  display: block;
  height: 1px;
  background: var(--line-color);
}

.meter .bar i {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--text-color);
  transition: width 0.6s;
}

/* 화살표 버튼 (슬라이드 좌우) */
.sld_nav {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 4.8rem;
  height: 4.8rem;
  padding: 0;

  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s;
}

.sld_nav:hover {
  opacity: 1;
}

.sld_nav::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.sld_nav.prev::before {
  transform: rotate(-135deg);
}

.sld_nav.next::before {
  transform: rotate(45deg);
}

/* ==========================================================================
   버튼
   ========================================================================== */
/* 외곽선 버튼 : 검정 테두리 → 호버 시 검정 채움 */
.default_btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 5.2rem;

  padding: 0 3.2rem;
  overflow: hidden;

  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-color);
  background: transparent;
  border: 1px solid var(--text-color);
  border-radius: 0;
  white-space: nowrap;
}

.default_btn:hover {
  color: var(--white-color);
}

.default_btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  z-index: -1;
  width: 100%;
  height: 0;

  background: var(--primary-color);
  transition: 0.4s;
}

.default_btn:hover::before {
  top: auto;
  bottom: 0;
  height: 100%;
}

/* 라운드 변형은 쓰지 않지만(각진 테마) 게시판 스킨 호환을 위해 남겨 둔다 */
.default_btn.round,
.default_btn.round::before {
  border-radius: 0;
}

.default_btn.round {
  height: 5.2rem;
  padding: 0 3.2rem;
  font-size: 1.5rem;
  font-weight: 500;
}

/* 채움 버튼 : 검정 바탕 + 오른쪽 화살표 */
.icon_btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  height: 5.2rem;

  padding: 0 8rem 0 3.2rem;
  overflow: hidden;

  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white-color);
  white-space: nowrap;
}

.icon_btn::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: 100%;
  height: 100%;

  background: var(--primary-color);
}

.icon_btn::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5.2rem;
  height: 100%;

  background: rgba(255, 255, 255, 0.12)
    url(../lib/icon/arrow-right.svg) no-repeat center center;
  filter: invert();
}

/* 게시판 글쓰기 · 취소 버튼 (스킨에서 사용) */
.icon_btn_write,
.icon_btn_cancel {
  position: relative;
  z-index: 1;

  margin-top: 4rem;

  display: inline-flex;
  align-items: center;
  height: 5.2rem;
  border-radius: 0;
  padding: 0 2.4rem 0 7.2rem;
  overflow: hidden;

  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white-color);
  white-space: nowrap;
}

.icon_btn_write::before,
.icon_btn_cancel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: var(--primary-color);
}

.icon_btn_cancel::before {
  background: #6f6f6f;
}

.icon_btn_write::after,
.icon_btn_cancel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5.2rem;
  height: 100%;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12) url(../lib/icon/edit-3.svg) no-repeat
    center center;
  filter: invert();
}

.icon_btn_cancel::after {
  background-image: url(../lib/icon/x.svg);
}

/* ==========================================================================
   유틸리티
   ========================================================================== */
.flx {
  display: flex;
  gap: 3rem;
}

.flx > * {
  flex: 1;
  min-width: 0;
}

hr.hr {
  display: block;
  border: 1px solid transparent;
  margin: 4rem 0;
}

hr.hr_line {
  display: block;
  border: 1px solid transparent;
  border-top: 1px solid var(--line-color);
  margin: 12rem 40%;
}

.table_responsive {
  overflow-x: auto;
}

.iframe_wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.iframe_wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.design {
  margin-top: 1.6rem;
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--text-color-mute);
}

.pg_current {
  display: inline-block;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #fff;
  font-weight: 500;
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  min-width: 30px;
  border-radius: 0;
}

.pg_wrap {
  clear: both;
  float: none;
  display: block;
  margin-top: 4rem;
}

/* ==========================================================================
   게시판 · 회원 스킨의 인라인 아이콘 (Lucide)
   --------------------------------------------------------------------------
   lucide.createIcons() 가 <i class="icon" data-lucide="..."> 를 <svg> 로
   바꾸면서 class 를 그대로 물려주므로, 여기서 글자 크기에 맞춰 준다.
   (라이브러리가 width/height="24" 속성을 붙이므로 CSS 로 덮어써야 한다)
   ========================================================================== */
#content.sub .icon,
#content.sub svg.lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  stroke-width: 1.8;
}

/* 회전 아이콘 (로딩) */
#content.sub .icon.spin {
  animation: dd_spin 1s linear infinite;
}

@keyframes dd_spin {
  to {
    transform: rotate(360deg);
  }
}
