/* ===============================
   Header 기본
=============================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  z-index: 2000;
}

@media(max-width: 991px) {
  #header {
    height: 70px;
  }
}

/* 스크롤 후 : 흰색 헤더 */
#header.header-scrolled {
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

#header .logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  white-space: nowrap;
}

/* 스크롤 후 */
#header.header-scrolled .logo-text {
  color: #111;
}


@media(max-width: 991px) {
  .header-inner {
    padding: 0 15px;
    height: 70px;
  }
}

/* 로고 */
.logo {
  height: 100%;
}

.logo a {
  font-size: 48px;
  font-weight: 700;
  color: #000000;
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  display: none;
  width: auto;
  max-height: 50px;
  max-width: 200px;
}

@media (max-width: 991px) {
  .logo img {
    max-width: 150px;
    max-height: 36px;
  }

  #header .logo-text {
    font-size: 18px;
  }
}

/* 기본 = 투명 헤더 상태 */
#header:not(.header-scrolled) .logo-transparent {
  display: block;
}

/* 흰 배경 상태 */
#header.header-scrolled .logo-scrolled {
  display: block;
}

/* PC / Mobile 분기 */
.pc-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 991px) {
  .pc-only {
    display: none;
  }

  .mobile-only {
    display: flex;
  }
}

/* ===============================
   GNB
=============================== */
.gnb {
  flex: 1;
  text-align: center;
}

.main-menu {
  display: inline-flex;
  gap: 40px;
}

.main-menu>li {
  position: relative;
}

.main-menu>li>a {
  height: 100px;
  line-height: 100px;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  display: block;
}

/* 밑줄 */
.gnb .main-menu>li>a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: #c1985d;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
}

/* hover 시 */
.gnb .main-menu>li>a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

#header.header-scrolled .main-menu>li>a {
  color: #000000;
}

/* ===============================
   Sub Menu
=============================== */
.sub-menu {
  position: absolute;
  top: 100%;
  margin-top: 20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  z-index: 10;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.sub-menu li a {
  padding: 10px 0;
  display: block;
  font-size: 15px;
  color: #000000;
  text-align: center;
}

/* ===============================
   배경 영역
=============================== */
.sub-menu-bg {
  position: absolute;
  top: 100px;
  left: 0;
  width: 100%;
  height: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transition: height 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 991px) {
  .sub-menu {
    display: none !important;
  }

  .sub-menu-bg {
    display: none !important;
  }
}

/* ===============================
   활성화 상태
=============================== */
#header.sub-menu-active .sub-menu {
  max-height: 250px;
  opacity: 1;
}

#header.sub-menu-active .sub-menu-bg {
  height: 250px;
  opacity: 1;
}

/* ===============================
   우측 연락처
=============================== */
.contact-info {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-info .text-phrase {
  font-size: 14px;
  color: #ffffff;
  border: 1px solid;
  border-radius: 50px;
  padding: 5px 10px;
}

#header.header-scrolled .contact-info .text-phrase {
  color: #000000;
}

.contact-info .phone-number {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
}

.contact-info .phone-number span {
  font-size: 26px;
}

#header.header-scrolled .contact-info .phone-number {
  color: #000000;
}

@media (max-width: 991px) {
  .contact-info .text-phrase {
    font-size: 12px;
    padding: 5px 8px;
  }

  .contact-info .phone-number {
    font-size: 22px;
  }

  .contact-info .phone-number span {
    display: none;
  }
}

/* ===============================
   모바일 영역
=============================== */

.mobile-right {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.btn-hamburger {
  width: 24px;
  height: 18px;
  position: relative;
  cursor: pointer;
  display: none;
}


@media (max-width: 991px) {
  .btn-hamburger {
    display: block;
  }
}

.btn-hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#header.header-scrolled .btn-hamburger span {
  background: #000000;
}

.btn-hamburger span:nth-child(1) {
  top: 0;
}

.btn-hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.btn-hamburger span:nth-child(3) {
  bottom: 0;
}

#header.mobile-menu-open .btn-hamburger span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

#header.mobile-menu-open .btn-hamburger span:nth-child(2) {
  opacity: 0;
}

#header.mobile-menu-open .btn-hamburger span:nth-child(3) {
  top: 50%;
  bottom: auto;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: #fff;
  transform: translateX(100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 0.3s ease;
  z-index: 1500;
}

#header.mobile-menu-open .mobile-menu {
  transform: translateX(0);
}

/* 최상위 메뉴 ul에만 padding */
.mobile-menu>ul {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 20px;
}

.mobile-menu>ul>li:last-child {
  padding-bottom: 150px;
}

/* 상위 메뉴 a */
.mobile-menu>ul>li>a {
  display: block;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
  border-bottom: 1px solid #000000;
}

/* 하위 메뉴 2열 그리드 */
.mobile-sub {
  margin-top: 10px;
  margin-bottom: 10px;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.mobile-sub li a {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  color: #000000;
}