/* ═══════════════════════════════════════════════
   KOI-AI — header.css
   Optimized Header Styles for PC & Mobile
═══════════════════════════════════════════════ */

:root {
  --header-h: 80px;
  --header-bg: rgba(255, 255, 255, 1);
  --primary: #b22323;
  --mint: #42c5b6;
  --navy: #1a2340;
  --dark: #222222;
  --gray-text: #333333;
  --border-light: #f0f0f0;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 10000;
  transition: var(--transition);
}

#header.is-scrolled {
  height: 60px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-bar {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
}

/* ── Logo ── */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.header-logo img {
  height: 34px;
  width: auto;
}

/* ── GNB ── */
.header-gnb {
  display: flex;
  gap: 48px;
  height: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gnb-item {
  position: relative;
  height: 100%;
}

.gnb-item>a {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: var(--transition);
}

.gnb-item:hover>a {
  color: var(--primary);
}

/* Dropdown */
.gnb-drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  min-width: 180px;
  padding: 12px 0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.gnb-item:hover .gnb-drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.gnb-drop a {
  display: block;
  padding: 10px 24px;
  font-size: 0.9rem;
  color: var(--gray-text);
  text-decoration: none;
  transition: var(--transition);
}

.gnb-drop a:hover {
  background: #f8f9fa;
  color: var(--primary);
}
.gnb-drop a.active , .gnb-item>a.active{
  color: var(--primary);
  font-weight: 700;
}

/* .gnb-drop a:hover {
  background: #f8f9fa;
  color: var(--mint);
} */

/* ── Header Utils ── */
.header-utils {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.util-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: var(--transition);
}

.util-link .koi-icon {
  height: 18px;
  width: auto;
}

.util-link i {
  font-size: 0.8rem;
  color: #aaa;
}

.util-link:hover {
  opacity: 0.7;
}

.lang-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.btn-contact {
  background: #222;
  color: #fff;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-contact:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ── Mobile Hamburger ── */
.header-hamburger {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.header-hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

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

.header-hamburger span:nth-child(2) {
  top: 11px;
}

.header-hamburger span:nth-child(3) {
  top: 22px;
}

#header.mob-open .header-hamburger span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

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

#header.mob-open .header-hamburger span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ── Mobile Panel ── */
.header-mobile-panel {
  position: fixed;
  top: 60px;
  right: -100%;
  width: 100%;
  height: calc(100vh - 60px);
  background: #fff;
  z-index: 100;
  transition: 0.4s cubic-bezier(0.7, 0, 0.3, 1);
  padding:40px 20px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  border-top: 2px solid var(--primary)
}

#header.mob-open .header-mobile-panel {
  right: 0;
}

.mob-menu-list {
  list-style: none;
  padding: 0;
}

.mob-menu-list>li {
  margin-bottom: 24px;
}
.mob-menu-list>li>a {
  font-size:1.2rem;
  font-weight: 600;
}

.mob-parent {
  font-size:1.2rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mob-sub-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  list-style: none;
  padding-left: 10px;
}

.mob-menu-list>li.open .mob-sub-list {
  max-height: 500px;
  margin-top: 15px;
}

.mob-sub-list a {
  display: block;
  padding: 10px 0;
  font-size: 1rem;
  color: var(--gray-text);
  text-decoration: none;
}
#header.main_header .header-hamburger span {
  background: #fff;
}
#header.main_header {
  color: #fff;
  background: transparent;
  border-color: rgba(255,255,255,0.1);
}

#header.main_header .gnb-item>a {
  color: #fff;
}

#header.main_header .btn-contact {
  background:#fff;
  color: var(--dark);
}

#header.main_header .header-logo img ,
#header.main_header .util-link .koi-icon{
  filter: brightness(0) invert(1);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .header-bar {
    padding: 0 20px;
  }

  .header-gnb {
    gap: 24px;
    margin-left: 30px;
  }

  .header-utils {
    gap: 16px;
  }
}

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

  .header-hamburger {
    display: block;
  }

  .header-mobile-panel {
    display: flex;
  }

  #header {
    height: 60px;
  }

  .header-logo-text {
    font-size: 1.3rem;
  }
}