/* ===========================================================================
   WIA MACHINE TOOLS — 포털 공통 스타일
   다크 프리미엄 인더스트리얼 + 브론즈골드 액센트
   =========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; }               /* 1rem = 10px */
body {
  font-family: var(--font-kr);
  font-size: 1.6rem; line-height: 1.6;
  color: var(--ink-body);
  background: #fff;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
.en { font-family: var(--font-en); }

.container {
  max-width: var(--inner-w);
  margin: 0 auto;
  padding: 0 var(--inner-pad);
}

/* ---------- 헤더 (다크 + blur) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .35s ease;
}
.site-header.is-scrolled { background: var(--header-bg-scrolled); }
.site-header > .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 3rem;
}
.brand { flex: 0 0 auto; }
.brand img { height: 1.7rem; width: auto; }

.gnb { display: flex; gap: 1rem; }
.gnb > li { position: relative; }
.gnb > li > a {
  display: block; padding: 2.8rem 2.6rem;
  font-size: 1.5rem; font-weight: 500; color: #e6e6e6;
  letter-spacing: .02em;
  transition: color .25s;
}
.gnb > li:hover > a, .gnb > li.on > a { color: var(--color-gold); }

/* GNB 드롭다운 (다크 반투명) */
.gnb-sub {
  position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, 8px);
  min-width: 17rem; padding: 1.8rem 0;
  background: rgba(22, 24, 27, 0.88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  text-align: center;
}
.gnb > li:hover .gnb-sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.gnb-sub a {
  display: block; padding: .8rem 2rem;
  font-size: 1.35rem; color: #c9ccd0;
  transition: color .2s;
}
.gnb-sub a:hover { color: var(--color-gold); }

.header-tools { display: flex; align-items: center; gap: 1.8rem; }
.tool-ico {
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.tool-ico svg { width: 2.8rem; height: 2.8rem; } /* 상담 아이콘 = 햄버거급 크기 */
.btn-lang {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1.1rem;
  border: 0; border-radius: 2rem;
  background: rgba(22, 24, 27, .5); /* 테두리 없는 다크 채움 필 */
  color: #fff; font-family: var(--font-en); font-size: 1.25rem; letter-spacing: .08em;
  transition: color .25s, background .25s;
}
.btn-lang svg { width: 1.7rem; height: 1.7rem; }
.btn-lang:hover { color: var(--color-gold); background: rgba(22, 24, 27, .7); }

/* 햄버거 3줄 — 가운데 줄만 짧고 오른쪽 정렬 */
.hamburger {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  gap: .55rem; width: 3rem; padding: .4rem 0;
}
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; transition: width .3s; }
.hamburger span:nth-child(2) { width: 58%; }
.hamburger:hover span:nth-child(2) { width: 100%; }

/* ---------- 메가메뉴 오버레이 ---------- */
.mega-overlay {
  position: fixed; inset: 0; z-index: 200;
  background:
    linear-gradient(rgba(22,24,27,.78), rgba(22,24,27,.9)),
    url('/resources/wia/assets/hero-01.jpg') center / cover no-repeat;
  opacity: 0; visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
body.mega-on .mega-overlay { opacity: 1; visibility: visible; }
body.mega-on { overflow: hidden; }
.mega-overlay .container { width: 100%; } /* flex-column 안에서 margin:auto가 stretch를 이기는 것 방지 */

.mega-top {
  flex: 0 0 auto; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.mega-top .brand img { height: 1.7rem; }

.mega-cols {
  flex: 1 1 auto;
  display: grid; grid-template-columns: repeat(6, 1fr);
  align-content: center;
  padding: 6rem 0;
}
.mega-col {
  padding: 3rem 1rem 4rem;
  border-left: 1px solid rgba(255,255,255,.18);
  text-align: center;
  transition: background .3s, box-shadow .3s;
}
.mega-col:first-child { border-left: 0; }
.mega-col:hover {
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 0 0 1px rgba(198,154,99,.45);
}
.mega-col > h3 {
  font-size: 1.7rem; font-weight: 700; color: #fff;
  margin-bottom: 2.6rem; letter-spacing: .02em;
}
.mega-col li + li { margin-top: .6rem; }
.mega-col li a {
  display: inline-block; padding: .5rem 1rem;
  font-size: 1.4rem; font-weight: 300; color: #d4d7da;
  transition: color .2s;
}
.mega-col li a:hover { color: var(--color-gold); }

.mega-foot {
  flex: 0 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 5rem;
}
.follow-us { flex: 1 1 auto; max-width: 56rem; }
.follow-us .fu-label { font-family: var(--font-en); font-size: 1.5rem; color: #fff; letter-spacing: .04em; }
.follow-us .fu-line { display: block; margin-top: 1.6rem; border-bottom: 1px solid rgba(255,255,255,.6); }
.mega-x {
  width: 4.6rem; height: 4.6rem; position: relative; flex: 0 0 auto;
  transition: transform .3s;
}
.mega-x::before, .mega-x::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 4.4rem; height: .5rem; background: var(--color-gold);
}
.mega-x::before { transform: translate(-50%,-50%) rotate(45deg); }
.mega-x::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.mega-x:hover { transform: rotate(90deg); }

/* ---------- 2톤 섹션 타이틀 ---------- */
.section-title {
  display: flex; align-items: baseline; gap: 1.2rem;
  font-family: var(--font-en); font-size: 3.4rem; letter-spacing: .02em;
}
.section-title__sub  { font-weight: 400; color: var(--title-sub); }
.section-title__main { font-weight: 700; color: var(--color-gold); }
.on-dark .section-title__sub { color: var(--title-sub-light); }

/* ---------- 히어로 캐러셀 ---------- */
.hero {
  position: relative; height: 100vh; min-height: 64rem;
  background: var(--color-dark); overflow: hidden;
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
}
.hero__slide.on { opacity: 1; }
.hero__bg {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
}
.hero__slide.on .hero__bg { animation: kenburns 6s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
/* 영상 슬라이드 (관리자 배너 youtube 타입) — 16:9 iframe을 화면 cover로 스케일 */
.hero__video {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  pointer-events: none;
}
.hero__video > div, .hero__video iframe { width: 100%; height: 100%; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,24,27,.25) 0%, rgba(22,24,27,0) 35%, rgba(22,24,27,.35) 100%);
}
.hero__copy {
  position: absolute; right: 0; bottom: 22rem; left: 0;
  pointer-events: none;
}
.hero__copy .container { display: flex; justify-content: flex-end; }
.hero__copy-box { text-align: right; }
/* 관리자 배너 카피 3단 (small_style / strong_style=h2 / p_style) */
.hero__copy small {
  display: block; margin-bottom: 1.8rem;
  font-size: 1.5rem; font-weight: 300; letter-spacing: .04em;
  color: rgba(255,255,255,.85);
}
.hero__copy p {
  margin-top: 2.2rem;
  font-size: 1.6rem; font-weight: 300; line-height: 1.7;
  color: rgba(255,255,255,.85);
}
.hero__copy small:empty, .hero__copy p:empty { display: none; }
.hero__copy h2 {
  font-family: var(--font-tech); font-weight: 400;
  font-size: clamp(3.2rem, 3.6vw, 5.2rem);
  line-height: 1.3; letter-spacing: .06em;
  color: #fff; text-align: right; text-transform: uppercase;
}

.hero__pager {
  position: absolute; left: 0; right: 0; bottom: 6rem; z-index: 5;
}
.hero__pager .container { display: flex; gap: 2.4rem; }
.hero__page {
  flex: 1; display: flex; align-items: center; gap: 1.6rem;
  color: rgba(255,255,255,.75);
  font-family: var(--font-en); font-size: 1.3rem; letter-spacing: .08em;
}
.hero__page .bar {
  flex: 1; height: 1px; background: rgba(255,255,255,.35);
  position: relative; overflow: hidden;
}
.hero__page .bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; background: #fff;
}
.hero__page.on { color: #fff; }
.hero__page.on .bar i { animation: barFill 6s linear forwards; }
@keyframes barFill { from { width: 0; } to { width: 100%; } }

/* ---------- 공통 섹션 ---------- */
.section { padding: 10rem 0 9rem; position: relative; }
.section--navy { background: var(--color-navy); }
.section .section-title { margin-bottom: 4.6rem; }

/* 골드 스크롤탑 화살표 */
.to-top {
  position: absolute; right: var(--inner-pad); bottom: 3.4rem;
  width: 4.6rem; height: 3rem; color: var(--color-gold);
}
.to-top svg { width: 100%; height: 100%; display: block; }

/* ---------- NEW PRODUCTS (다크 네이비 + 흰 카드 3×2) ---------- */
.prod-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.prod-card {
  background: #fff; padding: 2.4rem 2.6rem 2rem;
  display: flex; flex-direction: column;
  cursor: pointer;
  border-top: 3px solid transparent; /* hover 시 골드 — 레이아웃 밀림 방지용 투명 보더 */
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.28); border-top-color: var(--color-gold); }
.prod-card__name {
  font-family: var(--font-en); font-size: 1.7rem; font-weight: 700;
  color: var(--color-navy);
}
.prod-card__desc {
  margin-top: .9rem; font-size: 1.25rem; line-height: 1.55;
  color: #7d848a; font-weight: 400;
  min-height: 3.9rem;
}
.prod-card__foot {
  margin-top: 2.2rem;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.6rem;
}
.prod-card__abbr {
  font-family: var(--font-en); font-size: 4.8rem; font-weight: 700;
  line-height: .9; color: var(--color-navy); letter-spacing: -.01em;
}
.prod-card:hover .prod-card__abbr { color: var(--color-gold); transition: color .3s ease; }
.prod-card__img { flex: 0 1 60%; }
.prod-card__img img { width: 100%; max-height: 12rem; object-fit: contain; object-position: right bottom; }

/* ---------- MACHINE LINE-UP (탭 + 패널) ---------- */
.lineup-tabs { display: flex; margin-top: 5.4rem; }
.lineup-tabs button {
  flex: 1; text-align: left;
  padding: 0 1rem 1.8rem 0;
  font-family: var(--font-en); font-size: 1.4rem; line-height: 1.45;
  color: #9aa0a6; font-weight: 400;
  border-bottom: 1px solid #d9dcdf;
  transition: color .25s, border-color .25s;
  white-space: pre-line;
}
.lineup-tabs button:hover { color: var(--color-navy); }
.lineup-tabs button.on {
  color: #111; font-weight: 700;
  border-bottom: 2px solid #111;
}
.lineup-panel {
  margin-top: 7rem;
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 6rem; align-items: center;
}
.lineup-panel__body h3 {
  font-family: var(--font-en); font-size: 4.8rem; font-weight: 700;
  line-height: 1.12; color: #1c2430; letter-spacing: -.01em;
}
.lineup-panel__body p {
  margin-top: 2.6rem; font-size: 1.45rem; line-height: 1.75;
  color: #555; font-weight: 300;
}
.lineup-panel__body p + p { margin-top: 1.8rem; }
.lineup-panel__body .btn-more { margin-top: 4.2rem; }
.lineup-panel__media img { width: 100%; max-width: 64rem; margin-left: auto; }

/* ---------- more 버튼 (pill + 골드 dot) ---------- */
.btn-more {
  display: inline-flex; align-items: center; gap: 1.1rem;
  padding: 1.05rem 2.6rem;
  border: 1px solid var(--line-soft); border-radius: 3rem;
  font-family: var(--font-en); font-size: 1.4rem; font-weight: 500; color: #333;
  transition: background .25s, border-color .25s;
  cursor: pointer;
}
.btn-more__dot {
  width: .9rem; height: .9rem; border-radius: 50%;
  background: var(--color-gold); flex: 0 0 auto;
}
.btn-more:hover { background: #faf6f0; border-color: var(--color-gold); }

/* ---------- PR CENTER ---------- */
.pr-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.pr-card { cursor: pointer; }
.pr-card__label {
  font-family: var(--font-en); font-size: 1.3rem; font-weight: 700;
  color: #111; letter-spacing: .06em; margin-bottom: 1.4rem;
}
.pr-card__thumb {
  border: 1px solid #9aa0a6; background: #fff;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.pr-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pr-card:hover .pr-card__thumb img { transform: scale(1.04); }
.pr-card__caption { margin-top: 1.3rem; font-size: 1.35rem; color: #333; }

/* ---------- 푸터 (sand 밴드) ---------- */
.site-footer {
  background: var(--color-sand);
  padding: 4.2rem 0 3.8rem;
  color: #4a3e31;
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: stretch; gap: 4rem;
}
.footer-info .flogo img { height: 2rem; width: auto; }
.footer-info .addr {
  margin-top: 2rem; font-size: 1.2rem; line-height: 1.9; font-weight: 400;
}
.footer-info .addr b { font-weight: 700; }
.footer-side {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between; flex: 0 0 auto;
}
.footer-policy { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.footer-policy a { font-size: 1.3rem; font-weight: 500; transition: color .2s; }
.footer-policy a:hover { color: #fff; }
.footer-copy { font-family: var(--font-en); font-size: 1.2rem; color: #fff; }

/* ---------- 뉴스 리스트 (LATEST NEWS) ---------- */
.page-body { padding: calc(var(--header-h) + 7rem) 0 0; }
.news-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 3rem;
  flex-wrap: wrap;
}
.news-head__titles .section-title { margin-bottom: 0; }
.news-head__titles p { margin-top: 1.6rem; font-size: 1.5rem; color: #333; }

.news-search { display: flex; gap: .8rem; }
.news-search select {
  height: 4.4rem; min-width: 12rem; padding: 0 3.4rem 0 1.4rem;
  border: 1px solid #c7cbcf; background: #fff;
  font-family: var(--font-kr); font-size: 1.35rem; color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.6rem;
}
.news-search input {
  height: 4.4rem; width: 30rem; padding: 0 1.4rem;
  border: 1px solid #c7cbcf;
  font-family: var(--font-kr); font-size: 1.35rem;
}
.news-search input::placeholder { color: #a5aaaf; }
.news-search .btn-search {
  height: 4.4rem; padding: 0 2.6rem;
  background: var(--color-gold); color: #fff;
  font-size: 1.4rem; font-weight: 500;
  transition: filter .25s;
}
.news-search .btn-search:hover { filter: brightness(1.06); }

.news-grid {
  margin-top: 5.4rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5.2rem 3rem;
}
.news-card { cursor: pointer; }
.news-card__thumb {
  border: 1px solid #c8b193; background: #fff;
  aspect-ratio: 4 / 3; overflow: hidden;
}
.news-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-card__thumb img { transform: scale(1.04); }
.news-card__title { margin-top: 1.8rem; font-size: 1.5rem; font-weight: 500; color: #222; }
.news-card__meta {
  margin-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.news-card__date { font-family: var(--font-en); font-size: 1.3rem; color: #8d949b; }
.news-card__more { font-size: 1.3rem; color: #555; transition: color .2s; }
.news-card__more b { color: var(--color-gold); font-weight: 700; margin-left: .3rem; }
.news-card:hover .news-card__more { color: var(--color-gold); }

/* ---------- 반응형 ---------- */
@media (max-width: 1280px) {
  .gnb > li > a { padding: 2.8rem 1.8rem; }
}
@media (max-width: 1024px) {
  .gnb { display: none; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .lineup-tabs { flex-wrap: wrap; }
  .lineup-tabs button { flex: 1 1 33%; padding-top: 1.4rem; }
  .lineup-panel { grid-template-columns: 1fr; gap: 4rem; }
  .lineup-panel__media { order: -1; }
  .mega-cols { grid-template-columns: repeat(3, 1fr); gap: 3rem 0; padding: 4rem 0; }
  .pr-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { flex-direction: column; }
  .footer-side { align-items: flex-start; }
  .footer-policy { flex-direction: row; align-items: center; gap: 2rem; }
  .footer-copy { margin-top: 2rem; }
}
@media (max-width: 640px) {
  .section-title { font-size: 2.6rem; }
  .prod-grid { grid-template-columns: 1fr; }
  .lineup-panel__body h3 { font-size: 3.4rem; }
  .lineup-tabs button { flex: 1 1 50%; }
  /* 메가메뉴 → 아코디언 리스트 전환 */
  .mega-cols {
    display: block;
    align-content: initial;
    padding: 1rem var(--inner-pad) 3rem; /* .container 좌우 패딩 유지 */
  }
  .mega-col {
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255,255,255,.18);
    text-align: left;
  }
  .mega-col:hover { background: none; box-shadow: none; }
  .mega-col > h3 {
    margin-bottom: 0;
    padding: 1.9rem .2rem;
    position: relative;
    cursor: pointer;
  }
  .mega-col > h3::after {
    content: '';
    position: absolute; right: 1rem; top: 50%;
    width: .9rem; height: .9rem;
    border-right: 2px solid var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .3s;
  }
  .mega-col.is-open > h3 { color: var(--color-gold); }
  .mega-col.is-open > h3::after { transform: translateY(-30%) rotate(-135deg); }
  .mega-col ul {
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    padding: 0 .2rem;
  }
  .mega-col.is-open ul { max-height: 40rem; padding-bottom: 1.8rem; }
  .mega-col li + li { margin-top: .2rem; }
  .mega-col li a { display: block; padding: .55rem 1rem .55rem 1.2rem; }
  .pr-grid, .news-grid { grid-template-columns: 1fr; }
  .news-search { flex-wrap: wrap; }
  .news-search input { width: 100%; }
  .hero__copy { bottom: 16rem; }
}

/* ---------- 문서형 모달 (policy-modal — 정책 페이지·안내도 팝업 공용) ---------- */
.policy-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 2.4rem; background: rgba(0,0,0,.5); }
.policy-modal[hidden] { display: none; }
.policy-modal__box { background: #fff; width: 100%; max-width: 88rem; max-height: 88vh; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.policy-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.6rem; padding: 2.4rem 2.8rem 1.6rem; border-bottom: 1px solid #eee; }
.policy-modal__title { font-size: 2.1rem; font-weight: 700; color: #111; margin: 0; }
.policy-modal__meta { font-size: 1.35rem; color: #888; margin-top: .6rem; }
.policy-modal__close { flex: 0 0 auto; border: 0; background: none; font-size: 2.8rem; line-height: 1; color: #888; cursor: pointer; padding: 0 .4rem; }
.policy-modal__close:hover { color: #111; }
.policy-modal__body { padding: .8rem 2.8rem 2.8rem; overflow-y: auto; line-height: 1.9; color: var(--ink-body); font-size: 1.6rem; }
.policy-modal__body h2 { display: none; }
.policy-modal__body h3 { font-size: 1.9rem; font-weight: 700; color: #111; margin: 2.8rem 0 1.2rem; }
.policy-modal__body h4 { font-size: 1.6rem; font-weight: 700; color: #222; margin: 1.8rem 0 .8rem; }
.policy-modal__body p, .policy-modal__body li { font-size: 1.6rem; }
.policy-modal__body p { margin: 1.2rem 0; }
.policy-modal__body ul { padding-left: 2.4rem; margin: 1.2rem 0 1.6rem; list-style: disc; }
.policy-modal__body ol { padding-left: 2.4rem; margin: 1.2rem 0 1.6rem; list-style: decimal; }
.policy-modal__body ul li { list-style: disc; }
.policy-modal__body ol li { list-style: decimal; }
.policy-modal__body table { width: 100%; border-collapse: collapse; margin: 1.6rem 0 2rem; font-size: 1.4rem; }
.policy-modal__body th, .policy-modal__body td { border: 1px solid #ccc; padding: 1rem 1.2rem; text-align: left; vertical-align: top; }
.policy-modal__body th { background: #f3f4f6; font-weight: 700; }
.policy-modal__body blockquote { border-left: 4px solid var(--color-gold); background: #faf6f0; padding: 1.4rem 2rem; margin: 1.6rem 0; }
body.policy-modal-open { overflow: hidden; }
