/* ==========================================================================
   Meatwin Modern Global Navigation Bar (Modern Header)
   Author: Antigravity
   Description: Responsive, Glassmorphism, Modern SaaS GNB Header
   ========================================================================== */

:root {
  --mw-header-height: 68px;
  --mw-header-mobile-height: 60px;
  --mw-header-bg: rgba(216, 227, 245, 0.92);
  --mw-header-border: rgba(25, 49, 114, 0.12);
  --mw-primary-navy: #193172;
  --mw-primary-blue: #2563eb;
}

/* Header Container */
.mw-modern-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--mw-header-height);
  background-color: var(--mw-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mw-header-border);
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.05);
  z-index: 1000;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

/* 배경 장식: 로고 'M' 모양을 크게 확대해 흐릿하게 비스듬히 배치 (색상 #1E80C3 = 미트윈색)
   - PC: 메뉴 목록(.mw-nav-list) 바로 왼쪽 = 로고와 '시스템소개' 사이
   - 모바일(메뉴 숨김): 로고 바로 다음 */
.mw-modern-header {
  overflow: hidden;
}
.mw-modern-header::before,
.mw-nav-list::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 222px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 50'%3E%3Cg fill='none' stroke='%231E80C3' stroke-width='4.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.5 6.5L9.2 42.3M11.5 6.5L26 37.6L39.6 6.5M39.6 6.5L42.8 42.3'/%3E%3C/g%3E%3Cg fill='%231E80C3'%3E%3Ccircle cx='11.5' cy='6.5' r='5.4'/%3E%3Ccircle cx='39.6' cy='6.5' r='5.4'/%3E%3Ccircle cx='8.9' cy='42.4' r='5'/%3E%3Ccircle cx='43' cy='42.3' r='5.1'/%3E%3Ccircle cx='26' cy='37.6' r='5.3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-18deg);
  opacity: 0.14;
  filter: blur(1.5px);
  pointer-events: none;
}
.mw-modern-header::before {
  display: none;
  top: -30px;
  left: 140px;
  z-index: 0;
}
.mw-nav-list {
  position: relative;
}
.mw-nav-list::before {
  top: calc(50% - 64px);
  right: calc(100% - 40px);
  z-index: -1;
}

.mw-header-container {
  max-width: 1320px;
  position: relative;
  z-index: 1;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Logo */
.mw-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.mw-header-logo:hover {
  opacity: 0.9;
}

.mw-header-logo img {
  height: 38px;
  width: auto;
  display: block;
}

/* Desktop Navigation */
.mw-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0 32px;
}

.mw-nav-list {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mw-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b !important;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.mw-nav-link:hover {
  background-color: rgba(25, 49, 114, 0.08);
  color: var(--mw-primary-navy) !important;
}

.mw-nav-link.active {
  color: var(--mw-primary-blue) !important;
  background-color: rgba(37, 99, 235, 0.08);
  font-weight: 700;
}

.mw-nav-link::after,
.mw-nav-link::before,
.mw-nav-link.active::after,
.mw-nav-link.active::before,
.mw-drawer-nav li a::after,
.mw-drawer-nav li a::before {
  display: none !important;
  content: none !important;
}

/* Header User Actions (Right) */
.mw-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mw-btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #334155 !important;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mw-btn-login:hover {
  background-color: rgba(25, 49, 114, 0.08);
  color: var(--mw-primary-navy) !important;
}

.mw-btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32);
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.mw-btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.42);
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

/* Hamburger Button (Mobile Toggle) */
.mw-hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s ease;
}

.mw-hamburger-btn:hover {
  background-color: rgba(25, 49, 114, 0.08);
}

.mw-hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #1e293b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==========================================================================
   Mobile Sidebar Drawer & Dim Overlay
   ========================================================================== */
.mw-mobile-dim {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mw-mobile-dim.is-open {
  opacity: 1;
  visibility: visible;
}

.mw-mobile-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background-color: #ffffff;
  z-index: 2000;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-sizing: border-box;
}

.mw-mobile-drawer.is-open {
  right: 0;
}

/* Drawer Header */
.mw-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.mw-drawer-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.mw-drawer-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mw-drawer-close:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Drawer Slogan */
.mw-drawer-slogan {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(25, 49, 114, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-bottom: 1px solid #eef2f6;
}

.mw-drawer-slogan strong {
  font-size: 15px;
  color: var(--mw-primary-navy);
  display: block;
  margin-bottom: 4px;
}

.mw-drawer-slogan p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Drawer Navigation List */
.mw-drawer-nav {
  flex: 1;
  padding: 12px 10px;
}

.mw-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mw-drawer-nav li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mw-drawer-nav li a svg {
  width: 18px;
  height: 18px;
  stroke: #94a3b8;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.mw-drawer-nav li a:hover {
  background-color: #f1f5f9;
  color: var(--mw-primary-navy);
}

.mw-drawer-nav li a:hover svg {
  stroke: var(--mw-primary-navy);
  transform: translateX(3px);
}

/* Drawer Footer Actions */
.mw-drawer-footer {
  padding: 18px 20px;
  border-top: 1px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  gap: 10px;
}

.mw-drawer-btn-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: #334155 !important;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mw-drawer-btn-login:hover {
  background-color: #f1f5f9;
  color: #0f172a !important;
}

.mw-drawer-btn-signup {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.mw-drawer-btn-signup:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

/* ==========================================================================
   Responsive Breakpoints for Header
   ========================================================================== */
/* 좁은 PC(801~1100px): 메뉴·버튼 간격을 줄여 로그인/회원가입이 잘리지 않게 */
@media (min-width: 801px) and (max-width: 1100px) {
  .mw-header-container { padding: 0 16px; }
  .mw-header-logo img { height: 32px; }
  .mw-header-nav { margin: 0 12px; }
  .mw-nav-list { gap: 2px; }
  .mw-nav-link { padding: 8px 10px; font-size: 15px; }
  .mw-header-actions { gap: 6px; }
  .mw-btn-login { padding: 8px 10px; font-size: 14px; }
  .mw-btn-signup { padding: 8px 14px; font-size: 14px; }
}

@media (max-width: 800px) {
  .mw-modern-header {
    height: var(--mw-header-mobile-height);
  }
  .mw-header-container {
    padding: 0 16px;
  }
  .mw-header-logo img {
    height: 32px;
  }
  .mw-header-nav {
    display: none; /* Hide desktop nav */
  }
  .mw-modern-header::before {
    display: block; /* 모바일: 배경 M을 로고 다음에 표시 */
  }
  .mw-btn-login,
  .mw-btn-signup {
    display: none; /* Hide desktop action buttons */
  }
  .mw-hamburger-btn {
    display: flex; /* Show hamburger button */
  }
}
