@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

:root {
  --header-height: 150px;
  --header-top-height: 90px;
  --header-nav-height: 60px;
  --header-blue: #1b577e;
  --header-dday-red: #e74c3c;
  --header-today-teal: #2bbbad;
}

/* ===== Header Top ===== */
.header-top {
  width: 100%;
  background: #fff;
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  height: var(--header-top-height);
  margin: 0 auto;
  padding: 0 20px;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.logo-text {
  font-size: 48px;
  font-weight: 700;
  color: var(--header-blue);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* D-Day Badge */
.dday-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 20px;
  background: #fff;
  white-space: nowrap;
}

.dday-badge__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--header-dday-red);
  font-size: 14px;
  font-weight: 600;
}

.dday-badge__bell {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.dday-badge__d em {
  font-style: normal;
  font-weight: 700;
}

.dday-badge__today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.dday-badge__label {
  color: #333;
}

.dday-badge__date {
  color: var(--header-today-teal);
}

/* Utils (Clock + Login) */
.header-utils {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  height: 52px;
  padding: 4px 16px;
  border: 1px solid #c5d4e0;
  border-radius: 10px;
  background: #eef4f8;
}

.header-clock__tz {
  font-size: 11px;
  font-weight: 500;
  color: var(--header-blue);
  line-height: 1.2;
}

.header-clock__time {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #1a2a3a;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.header-login {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.header-login:hover {
  color: var(--header-blue);
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  margin: 0 !important;
}

.header-user img {
  width: 24px;
  height: 24px;
}

/* ===== Header Nav ===== */
.header-nav {
  width: 100%;
  background: #fff;
  border-top: 1px dotted #7aa0b8;
}

.header-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--container-max-width);
  height: var(--header-nav-height);
  margin: 0 auto;
  padding: 0 20px;
}

nav.menu-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item.has-dropdown {
  position: relative;
}

.nav-item.has-dropdown .dropdown-arrow {
  font-size: 12px;
  margin-left: 4px;
  transition: transform 0.3s ease;
  opacity: 0.5;
}

.nav-item.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-item.has-dropdown.user-info-btn > a {
  padding: 0;
  margin: 0;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #ffffff;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.submenu.right {
  left: auto;
  right: 0;
  transform: translateY(-10px);
}

.nav-item.has-dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-item.has-dropdown.user-info-btn:hover .submenu {
  transform: translateY(0);
}

.submenu-item > p {
  padding: 15px 20px 5px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
}

.submenu-item {
  position: relative;
}

.submenu-item > a {
  display: block;
  padding: 12px 20px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
}

.submenu-item > a:hover {
  background: #f5f7fa;
  color: var(--header-blue);
}

.menu-area .nav-item > a {
  font-size: 18px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.menu-area .nav-item > a:hover {
  color: var(--header-blue);
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  outline: none;
}

.hamburger div {
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active div:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 8px 0;
  border-top: 1px solid rgba(27, 87, 126, 0.1);
  position: fixed;
  top: var(--header-top-height);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - var(--header-top-height));
  overflow-y: auto;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-item {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  border-bottom: 1px solid #e6e6e6;
}

.mobile-menu .nav-item:last-child {
  border-bottom: none;
}

.mobile-menu .nav-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  margin: 0;
  border: none;
  border-radius: 0;
  font-weight: 600;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  gap: 10px;
}

.mobile-menu .nav-item > a i {
  color: var(--header-blue);
  flex-shrink: 0;
}

.mobile-menu .nav-item > a.pink {
  color: var(--header-blue);
}

.mobile-menu .nav-item > a .dropdown-arrow,
.mobile-menu .nav-item > a i:last-child {
  margin-left: auto;
  margin-right: 0;
  font-size: 20px;
  flex-shrink: 0;
}

.mobile-menu .nav-item > a .user-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.mobile-menu .nav-item > a .user-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-dropdown .dropdown-arrow {
  transition: transform 0.3s ease;
  font-size: 18px;
}

.mobile-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f8f9fa;
}

.mobile-dropdown.active .mobile-submenu {
  max-height: 400px;
}

.mobile-submenu-item {
  border-top: 1px solid #e6e6e6;
}

.mobile-submenu-item > a {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px 12px 32px;
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.mobile-submenu-item > a:hover {
  background: #eef1f4;
}

/* ===== Responsive ===== */
@media (max-width: 1320px) {
  .logo-text {
    font-size: 40px;
  }

  .menu-area .nav-item > a {
    font-size: 16px;
    padding: 0 12px;
  }
}

@media (max-width: 1100px) {
  .logo-text {
    font-size: 36px;
  }

  .menu-area .nav-item > a {
    font-size: 15px;
    padding: 0 10px;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
    --header-top-height: 70px;
  }

  .header-nav {
    display: none;
  }

  .header-clock,
  .header-login,
  .nav-item.has-dropdown.user-info-btn {
    display: none;
  }

  .logo-text {
    display: block;
    font-size: 28px;
  }

  .dday-badge {
    display: flex;
  }

  .header-brand {
    gap: 12px;
  }

  .hamburger {
    display: flex;
  }

  .header-top-inner {
    height: var(--header-top-height);
  }

  header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 750px) {
  .logo-text {
    font-size: 22px;
  }

  .dday-badge {
    height: 32px;
    padding: 0 10px;
    gap: 6px;
  }

  .dday-badge__count,
  .dday-badge__today {
    font-size: 12px;
  }
}
