/* ============================================================
   header.css - 메가메뉴 방식
   ============================================================ */

/* ── 헤더 ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid #ccc;
  z-index: 1100;
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.1); }

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  max-width: 1260px;
  width: 100%;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

/* ── 로고 ── */
.site-logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.site-logo img { height: 30px; width: auto; display: block; }
@media(max-width:768px){ .site-logo img { height: 22px; } }

/* ── GNB ── */
.gnb { display: flex; align-items: center; height: 100%; margin-left: auto; }
.gnb-item { position: relative; display: flex; align-items: center; height: 100%; }
.gnb-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 500;
  font-family: 'Pretendard', sans-serif;
  color: #111;
  white-space: nowrap;
  transition: color .2s;
  position: relative;
}
/* 하단 라인 (hover/active) */
.gnb-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.gnb-item:hover .gnb-link,
.gnb-item.active .gnb-link,
.gnb-item.mega-active .gnb-link { color: var(--primary); }

.gnb-item:hover .gnb-link::after,
.gnb-item.active .gnb-link::after,
.gnb-item.mega-active .gnb-link::after { transform: scaleX(1); }

/* ── 메가메뉴 ── */
.mega-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: #fff;
  border-top: 0px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  z-index: 1000;
  /* 슬라이드 애니메이션 */
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease;
}
.mega-menu.open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.mega-menu-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
}

/* ── 메가메뉴 컬럼 ── */
.mega-col {
  flex: 1;
  padding: 28px 32px;
  border-right: 1px solid #edf0f5;
  display: none; /* JS로 제어 */
}
.mega-col:last-child { border-right: none; }

/* 단독 컬럼일 때 너비 제한 */
.mega-col[style*="display: block"] {
  max-width: 240px;
}

.mega-col-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  text-align:center;
}
.mega-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #f0f2f7;
  text-decoration: none;
  transition: color .15s, padding-left .15s;
}
.mega-col a::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  transition: background .15s;
}
.mega-col a:hover { color: var(--primary); padding-left: 6px; }
.mega-col a:hover::before { background: var(--primary); }
.mega-col a:last-child { border-bottom: none; }

/* ── 오버레이 ── */
.mega-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0,0,0,.18);
  z-index: 999;
}
.mega-overlay.open { display: block; }

/* ── 헤더 우측 ── */
.header-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-cta {
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  transition: var(--tr);
  white-space: nowrap;
  text-decoration: none;
}
.header-cta:hover { background: var(--primary-h); color: #fff; }

/* ── 햄버거 ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--tr);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 모바일 메뉴 ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  z-index: 999;
}
.mobile-menu.open { display: block; }
.mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
}
.mobile-sub { display: none; background: var(--bg-gray); }
.mobile-sub.open { display: block; }
.mobile-sub a {
  display: block;
  padding: 11px 24px 11px 36px;
  font-size: 13px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-sub a:hover { color: var(--primary); }

/* ── 반응형 ── */
@media(max-width:1024px) {
  .gnb { display: none; }
  .hamburger { display: flex; }
  .mega-menu { display: none !important; }
  .mega-overlay { display: none !important; }
}

/* ── 푸터 ── */
body { padding-top: 0; }
.main-wrap { padding-top: var(--header-h); }

.site-footer {
  background: #1a2237;
  color: rgba(255,255,255,.7);
  padding: 44px 0 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media(max-width:768px){ .footer-inner { flex-direction: column-reverse; gap: 24px; align-items: flex-start; } }

.footer-logo {
  font-family: 'Exo 2', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}
.footer-logo .logo-io  { color: #f05a28; }
.footer-logo .logo-T   { color: #f05a28; }
.footer-logo .logo-ware{ color: rgba(255,255,255,.85); }
.footer-brand p { font-size: 14px; line-height: 1.85; color: rgba(255,255,255,.5); margin-bottom: 0; }
.footer-info { flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; text-align: left; }
.footer-info p { font-size: 14px; color: rgba(255,255,255,.55); line-height: 1.4; margin: 0; }
.footer-info a { font-size: 14px; color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; line-height: 1.4; }
.footer-info a:hover { color: rgba(255,255,255,.9); }
.footer-bottom {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom-copy { font-size: 13px; color: rgba(255,255,255,.28); }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,.32); transition: color .2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ── 퀵문의 플로팅 ── */
.quick-inquiry { position: fixed; right: 20px; bottom: 24px; z-index: 500; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.quick-btn { display: flex; align-items: center; gap: 7px; padding: 11px 18px; background: var(--primary); color: #fff; border-radius: 24px; font-size: 14px; font-weight: 700; box-shadow: 0 3px 12px rgba(0,61,130,.3); transition: var(--tr); white-space: nowrap; text-decoration: none; }
.quick-btn:hover { background: var(--primary-h); color: #fff; transform: translateY(-2px); }
.quick-btn i { font-size: 13px; }

/* ── 서브탭 ── */
.company-subnav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: var(--header-h); z-index: 50; }
.company-subnav-inner { display: flex; overflow:hidden; gap: 0; }
.company-subnav-item { padding: 16px 28px; font-size: 16px; font-weight: 500; color: #888; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.company-subnav-item:hover { color: var(--primary); }
.company-subnav-item.active { color: var(--primary); font-weight: 700; border-bottom: 3px solid var(--primary); }
