/* ─── SEA Connection Shared Navigation Styles ─── */

.navbar {
  background: linear-gradient(269deg, #010F89 0%, #01169C 21%, #000F89 100%);
  padding: 26px 160px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}
.nav-logo-img   { height: 50px; width: auto; display: block; }
.nav-logo-fallback {
  color: white; font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px; white-space: nowrap; display: none;
}
.nav-logo-fallback span { color: #FAC51C; }

/* ── 데스크톱 메뉴 ── */
.nav-menu { display: flex; gap: 2px; align-items: center; }
.nav-menu > a {
  color: white; font-size: 15px; font-weight: 600;
  padding: 9px 16px; border-radius: 12px; transition: background .15s;
  white-space: nowrap;
}
.nav-menu > a:hover { background: rgba(255,255,255,.1); }
.nav-menu > a.active {
  background: rgba(255,255,255,.15);
  border-bottom: 2px solid #FAC51C;
  border-radius: 12px 12px 0 0;
}

/* ── 드롭다운 ── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  color: white; font-size: 15px; font-weight: 600;
  padding: 9px 16px; border-radius: 12px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  font-family: inherit; transition: background .15s;
  white-space: nowrap;
}
.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger { background: rgba(255,255,255,.1); }
.nav-dropdown.active .nav-dropdown-trigger {
  background: rgba(255,255,255,.15);
  border-bottom: 2px solid #FAC51C;
  border-radius: 12px 12px 0 0;
}
.nav-dropdown-trigger svg { transition: transform .2s; }
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: white;
  border-radius: 16px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, visibility .18s, transform .18s;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  color: #374151;
  border-radius: 10px;
  transition: background .13s, color .13s;
  white-space: nowrap;
  font-family: 'Pretendard', -apple-system, sans-serif;
}
.nav-dropdown-item:hover { background: #EEF1FF; color: #000F89; }
.nav-dropdown-item.active { color: #000F89; background: #EEF1FF; font-weight: 700; }

/* ── 우측 버튼 ── */
.nav-auth { display: flex; gap: 10px; align-items: center; }
.btn-login {
  color: white; font-size: 14px; font-weight: 700;
  padding: 9px 21px; border-radius: 14px;
  border: 1px solid #D1D5DB; transition: background .15s;
  font-family: inherit;
}
.btn-login:hover { background: rgba(255,255,255,.1); }
.btn-register {
  color: #000F89; font-size: 14px; font-weight: 700;
  padding: 8px 20px; border-radius: 14px; background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.1); transition: opacity .15s;
  font-family: inherit;
}
.btn-register:hover { opacity: .92; }

/* ── 햄버거 ── */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; padding: 8px; border-radius: 8px;
  transition: background .15s; background: none; border: none; cursor: pointer;
}
.hamburger:hover { background: rgba(255,255,255,.1); }
.hamburger span { display: block; width: 22px; height: 2px; background: white; border-radius: 2px; }

/* ── 모바일 메뉴 ── */
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 200; }
.mobile-nav.open { display: block; }
.mobile-nav-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.mobile-nav-panel {
  position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #000F89 0%, #001AAD 100%);
  padding: 20px 24px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  max-height: 90vh; overflow-y: auto;
}
.mobile-nav-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.mobile-nav-close {
  color: white; font-size: 22px; padding: 6px 10px;
  border-radius: 8px; line-height: 1; transition: background .15s;
  background: none; border: none; cursor: pointer;
}
.mobile-nav-close:hover { background: rgba(255,255,255,.1); }
.mobile-nav-links { display: flex; flex-direction: column; }

.mobile-nav-link {
  color: white; font-size: 16px; font-weight: 600;
  padding: 15px 4px; border-bottom: 1px solid rgba(255,255,255,.08);
  display: block; transition: opacity .15s;
  font-family: 'Pretendard', -apple-system, sans-serif;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { opacity: .75; }
.mobile-nav-link.active { color: #FAC51C; }

/* 아코디언 섹션 */
.mobile-nav-section { border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-nav-section-btn {
  width: 100%; text-align: left;
  color: white; font-size: 16px; font-weight: 600;
  padding: 15px 4px;
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer;
  font-family: 'Pretendard', -apple-system, sans-serif;
  transition: opacity .15s;
}
.mobile-nav-section-btn:hover { opacity: .75; }
.mobile-nav-section-btn.active { color: #FAC51C; }
.mobile-nav-section-btn svg { transition: transform .2s; flex-shrink: 0; }
.mobile-nav-section.open .mobile-nav-section-btn svg { transform: rotate(180deg); }

.mobile-nav-subitems {
  display: none;
  flex-direction: column;
  padding: 4px 0 12px 16px;
  gap: 2px;
}
.mobile-nav-section.open .mobile-nav-subitems { display: flex; }
.mobile-nav-sublink {
  color: rgba(255,255,255,.75); font-size: 14px; font-weight: 600;
  padding: 10px 8px; border-radius: 8px;
  display: block; transition: background .13s, color .13s;
  font-family: 'Pretendard', -apple-system, sans-serif;
}
.mobile-nav-sublink:hover { background: rgba(255,255,255,.08); color: white; }
.mobile-nav-sublink.active { color: #FAC51C; }

.mobile-nav-auth {
  display: flex; gap: 10px; margin-top: 20px;
}
.mobile-nav-auth .btn-login,
.mobile-nav-auth .btn-register { flex: 1; text-align: center; display: block; cursor: pointer; }

/* ── MY PAGE 버튼 (비로그인) ── */
.nav-menu > button.nav-menu-link {
  color: white; font-size: 15px; font-weight: 700;
  padding: 9px 16px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  cursor: pointer; font-family: inherit; transition: background .15s;
  white-space: nowrap;
}
.nav-menu > button.nav-menu-link:hover { background: rgba(255,255,255,.2); }

/* ── 로그인 유저 표시 ── */
.nav-user-wrap { display: flex; align-items: center; gap: 12px; }
.nav-username  { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-logout {
  color: white; font-size: 14px; font-weight: 700;
  padding: 9px 21px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.35); background: none; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.1); }

/* ── 로그인 모달 ── */
.sea-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 300;
  align-items: center; justify-content: center;
}
.sea-modal-overlay.open { display: flex; }
.sea-modal-card {
  background: #fff; border-radius: 24px; padding: 40px;
  width: 100%; max-width: 420px; margin: 16px;
  position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.sea-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: #9CA3AF; padding: 4px 8px; border-radius: 8px; line-height: 1;
  transition: background .13s, color .13s;
}
.sea-modal-close:hover { background: #F3F4F6; color: #374151; }
.sea-modal-brand {
  font-size: 14px; font-weight: 800; color: #000F89;
  margin-bottom: 20px; letter-spacing: -0.03em;
}
.sea-modal-brand span { color: #FAC51C; }
.sea-modal-title {
  font-size: 24px; font-weight: 700; color: #0C0C0C;
  margin-bottom: 8px; letter-spacing: -0.03em;
}
.sea-modal-error {
  font-size: 13px; color: #DC2626; min-height: 20px; margin-bottom: 8px;
}
.sea-modal-form { display: flex; flex-direction: column; gap: 12px; }
.sea-modal-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid #E5E7EB; border-radius: 12px;
  font-size: 15px; font-family: 'Pretendard', -apple-system, sans-serif;
  color: #0C0C0C; outline: none; transition: border-color .15s;
}
.sea-modal-input:focus { border-color: #000F89; }
.sea-modal-submit {
  background: #000F89; color: white; font-size: 15px; font-weight: 700;
  padding: 14px; border-radius: 14px; border: none; cursor: pointer;
  font-family: 'Pretendard', -apple-system, sans-serif;
  transition: opacity .15s; margin-top: 4px;
}
.sea-modal-submit:hover  { opacity: .9; }
.sea-modal-submit:disabled { opacity: .6; cursor: not-allowed; }
.sea-modal-footer {
  text-align: center; font-size: 14px; color: #6B7280; margin-top: 20px;
}
.sea-modal-link { color: #000F89; font-weight: 700; cursor: pointer; }
.sea-modal-link:hover { text-decoration: underline; }

/* ── 반응형 ── */
@media (max-width: 1280px) { .navbar { padding-left: 48px; padding-right: 48px; } }
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .nav-auth  { display: none; }
  .hamburger { display: flex; }
  .navbar { padding-left: 24px; padding-right: 24px; }
}

/* ── 하단 탭 네비게이션 (모바일 전용) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: #fff;
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -2px 12px rgba(0,0,0,.07);
  z-index: 190;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.bottom-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9CA3AF;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Pretendard', -apple-system, sans-serif;
  text-decoration: none;
  transition: color .15s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bottom-nav-tab svg {
  width: 22px; height: 22px;
  transition: transform .15s;
}
.bottom-nav-tab.active { color: #000F89; }
.bottom-nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2.5px;
  background: #000F89;
  border-radius: 0 0 4px 4px;
}
.bottom-nav-tab:active svg { transform: scale(.88); }

@media (max-width: 1024px) {
  .bottom-nav { display: block; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
