/* ===== Header ===== */
:root{
  /* 기본(스크롤 전) */
  --header-h: 90px;
  --logo-h: 76px;

  --icon-btn: 43px;
  --icon-svg: 25px;

  --gnb-pad-y: 14px;

  /* (추가) 레이아웃 흔들림 방지용: 기본(레이아웃) 치수는 고정 */
  --logo-h-base: var(--logo-h);
  --icon-btn-base: var(--icon-btn);
  --icon-svg-base: var(--icon-svg);

  /* 컨테이너 */
  --container: 1200px;

  /* 스크롤 후(축소) */
  --header-h-shrink: 60px;
  --logo-h-shrink: 67px;
  --icon-btn-shrink: 38px;
  --icon-svg-shrink: 24px;
  --gnb-pad-y-shrink: 10px;
}

/* 스크롤하면 body에 header-shrink 클래스가 붙습니다 */
body.header-shrink{
  --header-h: var(--header-h-shrink);
  --gnb-pad-y: var(--gnb-pad-y-shrink);
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  height: var(--header-h);

  
  /* (추가) 스크롤 축소 시, 아래 scale 값은 JS가 .site-header에 설정합니다 */
  --logo-scale: 1;
  --icon-btn-scale: 1;
  --icon-inner-scale: 1;
/* 헤더 배경 검정 */
  background: rgb(0, 0, 0)!important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid rgba(255,255,255,.12);

  transition: height .18s ease, background .18s ease;
}
/* hover/포커스 시 더 선명한 검정 */
.site-header:hover,
.site-header:focus-within{ background: rgb(0, 0, 0); }

.header-bar{
  width: 100%;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* 로고 */
.brand{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 110px;
}
.site-header .logo-img{
  height: var(--logo-h-base);
  width: auto;
  display: block;
  transform: scale(var(--logo-scale));
  transform-origin: left center;
  transition: transform .18s ease;
}

/* ===== GNB ===== */
.gnb{ flex: 1; display: flex; justify-content: center; }
.gnb-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 70px;
  align-items: center;
}
.gnb-item{ position: relative; }
.gnb-link{
  display: inline-block;
  padding: var(--gnb-pad-y) 6px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .3px;
  color: #fff;
  transition: padding .18s ease;
}

/* 노란 밑줄(유지) */
.gnb-item:hover .gnb-link{ position: relative; }
.gnb-item:hover .gnb-link::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6px;
  width: 78px;
  height: 3px;
  background: #FFD400;
  border-radius: 999px;
}

/* ===== Dropdown ===== */
.dropdown{
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease, visibility .12s ease;
}
.gnb-item:hover .dropdown{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dropdown-box{
  min-width: 220px;
  padding: 12px 12px;
  background: rgba(0, 0, 0, 0.979);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  display: grid;
  gap: 10px;
}
.dropdown-link{
  text-decoration: none;
  color: #fff;
  padding: 10px 10px;
  border-radius: 10px;
  text-align: center;
}
.dropdown-link:hover{ background: #ffd500e3; }

/* ===== Right icons ===== */
.header-icons{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 90px;
}

/* (추가) 헤더 축소 시 좌/우 폭이 변하며 GNB가 '대각선'으로 움직이는 현상 방지:
   - 아이콘/로고는 레이아웃 치수는 고정(베이스)
   - 시각적 크기만 transform scale로 축소 */
.site-header .header-icons .icon-btn{
  width: var(--icon-btn-base);
  height: var(--icon-btn-base);
  transform: scale(var(--icon-btn-scale));
  transform-origin: center;
  transition: transform .18s ease;
}
.site-header .header-icons .icon-btn .icon-img,
.site-header .header-icons .icon-btn img{
  width: var(--icon-svg-base);
  height: var(--icon-svg-base);
  transform: scale(var(--icon-inner-scale));
  transform-origin: center;
}
.site-header .header-icons .icon-btn svg{
  width: var(--icon-svg-base);
  height: var(--icon-svg-base);
  transform: scale(var(--icon-inner-scale));
  transform-origin: center;
  transition: transform .18s ease;
}
.site-header .header-icons .icon-btn .icon-default,
.site-header .header-icons .icon-btn .icon-hover{
  width: var(--icon-svg-base);
  height: var(--icon-svg-base);
  transform: scale(var(--icon-inner-scale));
  transform-origin: center;
}


.icon-btn{
  width: var(--icon-btn);
  height: var(--icon-btn);
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;

  /* 배경(원/사각형) 완전 제거 */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  color: inherit;
  text-decoration: none;
  position: relative;
  padding: 0;

  transition: transform .18s ease, opacity .18s ease;
}
.icon-btn:hover{ background: transparent !important; border-color: transparent !important; }
.icon-btn .icon-img,
.icon-btn img{
  width: var(--icon-svg);
  height: var(--icon-svg);
  display: block;
  object-fit: contain;
}
.icon-btn svg{
  width: var(--icon-svg);
  height: var(--icon-svg);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: width .18s ease, height .18s ease;
}

.icon-btn .icon-default,
.icon-btn .icon-hover{
  width: var(--icon-svg);
  height: var(--icon-svg);
  display: block;
  object-fit: contain;
}
.icon-btn .icon-hover{
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}
.icon-btn:hover .icon-default,
.icon-btn:focus-visible .icon-default{ opacity: 0; }
.icon-btn:hover .icon-hover,
.icon-btn:focus-visible .icon-hover{ opacity: 1; }
.icon-btn svg path[d="M11 10l4 2-4 2z"]{ fill: currentColor; stroke: none; }

/* ===== Mobile menu button ===== */
/* 기본: 데스크탑에서는 숨김, 모바일에서만 노란 3줄 */
.menu-toggle{
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;

  align-items: center;
  justify-content: center;

  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle__bar{
  position: absolute;
  left: 50%;
  width: 30px;
  height: 3px;
  background: #FFD400; 
  border-radius: 999px;
  transform: translateX(-50%);
  transform-origin: 50% 50%;
  transition: transform .22s ease, opacity .18s ease;
  will-change: transform, opacity;
}
.menu-toggle__bar:nth-child(1){ transform: translateX(-50%) translateY(-9px); }
.menu-toggle__bar:nth-child(2){ transform: translateX(-50%) translateY(0); }
.menu-toggle__bar:nth-child(3){ transform: translateX(-50%) translateY(9px); }

.menu-toggle:focus-visible{
  outline: 2px solid #FFD400;
  outline-offset: 4px;
  border-radius: 10px;
}

/* 3줄 → X */
.menu-toggle.is-active .menu-toggle__bar:nth-child(1){ transform: translateX(-50%) rotate(45deg); }
.menu-toggle.is-active .menu-toggle__bar:nth-child(2){ opacity: 0; }
.menu-toggle.is-active .menu-toggle__bar:nth-child(3){ transform: translateX(-50%) rotate(-45deg); }

/* ===== Mobile menu ===== */
/* hidden 속성 대응 */
.mobile-menu[hidden]{ display: none !important; }

/* 모바일에서: '우측 패널 + 남은 영역은 반투명' + 슬라이드 애니메이션 */
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
}

/* 남은 영역(클릭 시 닫힘) */
.mobile-menu__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
  opacity: 0;
  transition: opacity .28s ease;
}

/* 우측 패널 */
.mobile-menu__panel{
  box-sizing: border-box;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 72vw);
  background: rgb(0, 0, 0)!important;
  border-left: 1px solid rgba(255,255,255,0.12);

  padding: calc(var(--header-h, 78px) + env(safe-area-inset-top, 0px)) 18px 18px;

  transform: translateX(100%);
  transition: transform .28s ease;
  will-change: transform;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 열림/닫힘 상태( JS에서 class 토글 ) */
.mobile-menu.is-open .mobile-menu__backdrop{ opacity: 1; }
.mobile-menu.is-open .mobile-menu__panel{ transform: translateX(0); }

.mobile-menu.is-closing .mobile-menu__backdrop{ opacity: 0; }
.mobile-menu.is-closing .mobile-menu__panel{ transform: translateX(100%); }

/* 메뉴 열림 시 스크롤 잠금 */
body.menu-open{ overflow: hidden; }

/* 패널보다 헤더/버튼이 위에 오도록 */
body.menu-open .site-header{ z-index: 10001 !important; }
body.menu-open .menu-toggle{ z-index: 10002 !important; }

/* ===== Mobile accordion ===== */
.m-accordion{ padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.mobile-parent{
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 10px;
  color: #fff;
  font-size: 20px;
  letter-spacing: .2px;
  user-select: none;
  border-radius: 10px;
}
.m-accordion > summary::-webkit-details-marker{ display: none; }
.m-accordion > summary::marker{ content: ""; }
.mobile-parent::after{
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,0.70);
  border-bottom: 2px solid rgba(255,255,255,0.70);
  transform: rotate(45deg);
  transition: transform .15s ease;
  margin-left: 12px;
}
.m-accordion[open] .mobile-parent{ color: #FFD400; }
.m-accordion[open] .mobile-parent::after{
  transform: rotate(-135deg);
  border-right-color:#FFD400;
  border-bottom-color:#FFD400;
}

/* 간단한 펼침/접힘 모션(과도한 max-height로 잘림 방지) */
.mobile-children{
  padding: 0 0 14px 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .24s ease, opacity .18s ease;
}
.m-accordion[open] .mobile-children{
  max-height: 600px;
  opacity: 1;
}

.mobile-child{
  display: block;
  padding: 10px 10px 10px 18px;
  margin: 4px 0;
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  border-radius: 10px;
}
.mobile-parent:hover,
.mobile-parent:focus-visible{
  background: rgba(255,255,255,0.06);
  color: #FFD400;
}
.mobile-child:hover,
.mobile-child:focus-visible{
  background: rgba(255,255,255,0.06);
  color: #FFD400;
}

/* 모션 민감 사용자 배려 */
@media (prefers-reduced-motion: reduce){
  .mobile-menu__backdrop,
  .mobile-menu__panel,
  .mobile-children{ transition: none !important; }
}


/* ===== Footer (사진2 스타일: 센터 정렬 + 검정 배경 + 밝은 텍스트) ===== */
.site-footer{
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.footer-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 46px 16px 46px;
}

.footer-center{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

/* 로고/브랜드 */
.footer-brand{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.footer-logo{
  height: 80px;
  width: auto;
  display: block;
  filter: none;
}


/* Footer Social */
.footer-social{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
  margin-bottom: 8px;
}
.footer-social .icon-btn{
  width: 34px;
  height: 34px;
}

/* 링크 라인 */
.footer-links{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.3;
}
.footer-link{
  text-decoration: none;
  color: rgba(255,255,255,0.82);
  font-weight: 700;
}
.footer-link:hover{ color: #FFD400; }
.footer-sep{
  margin: 0 2px;
  color: rgba(255,255,255,0.35);
}

.footer-info{
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.8;
  word-break: keep-all;
}
.footer-info .bar{
  margin: 0 10px;
  color: rgba(255,255,255,0.26);
}

.footer-copy{
  color: rgba(255,255,255,0.50);
  font-size: 12px;
  letter-spacing: .02em;
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  :root{
    --header-h: 78px;
    --logo-h: 68px;

    --header-h-shrink: 64px;
    --logo-h-shrink: 62px;

    --container: 1100px;
  }

  .gnb{ display: none; }
  .header-icons{ display: none; }

  .menu-toggle{ display: flex; }

  .header-bar{ padding: 0 16px; }
  .brand{ margin-left: 0; }

  .footer-inner{ padding: 46px 16px 34px; }
  .footer-logo{ height: 70px; }
  .footer-links{ font-size: 13px; }
  .footer-info{ font-size: 12px; }

  /* ===== Mobile footer readability fix (번호/라벨 줄바꿈 개선) ===== */
  /* 모바일에서 사업자등록번호/전화 등이 하이픈·콜론에서 끊겨 보이는 현상 방지 */
  .footer-info{
    /* 임의 줄바꿈을 공격적으로 하지 않도록 */
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }
  /* 가능한 경우(HTML에서 각 항목을 span으로 감싼 경우) 항목 단위로 줄바꿈되게 */
  .footer-info span:not(.bar){
    display: inline-block;
    white-space: nowrap;
  }
  /* 구분자 간격을 조금 줄여 모바일에서 더 깔끔하게 */
  .footer-info .bar{ margin: 0 8px; }

}
