/*
 * Header Styles - Modern Premium Design
 * くるま買取ケイヴィレッジ
 * ヘッダー・ナビゲーション
 */

/* ========================================
   ヘッダー全体
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 247, 245, 1) 50%,
    rgba(240, 248, 255, 1) 100%
  );
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
  padding: 16px 0;
}

/* スクロール時のヘッダー変化 */
.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.header.scrolled {
  padding: 12px 0;
}

/* ========================================
   ロゴ
   ======================================== */

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.header__logo:hover {
  opacity: 0.85;
}

.header__logo-image {
  height: 50px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.header__logo:hover .header__logo-image {
  transform: scale(1.02);
}

/* ========================================
   ナビゲーション（PC）
   ======================================== */

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.header__nav-item {
  position: relative;
}

.header__nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-base);
  position: relative;
}

.header__nav-link i {
  font-size: 16px;
  color: var(--primary-color);
  transition: transform var(--transition-base);
}

.header__nav-link:hover {
  background: rgba(255, 107, 53, 0.08);
  color: var(--primary-color);
}

.header__nav-link:hover i {
  transform: scale(1.1);
}

.header__nav-link.is-current {
  background: linear-gradient(135deg,
    rgba(255, 107, 53, 0.1) 0%,
    rgba(232, 90, 43, 0.1) 100%
  );
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
}

.header__nav-link.is-current::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), #E85A2B);
  border-radius: 3px 3px 0 0;
}

/* ========================================
   CTA（PC）
   ======================================== */

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header__cta-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg,
    rgba(0, 78, 137, 0.08) 0%,
    rgba(0, 78, 137, 0.12) 100%
  );
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.header__cta-phone:hover {
  border-color: var(--secondary-color);
  background: linear-gradient(135deg,
    rgba(0, 78, 137, 0.12) 0%,
    rgba(0, 78, 137, 0.16) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 78, 137, 0.2);
}

.header__cta-phone-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-color), #003D6B);
  color: var(--text-white);
  border-radius: var(--border-radius-full);
  font-size: 18px;
  animation: pulse-slow 3s infinite;
}

@keyframes pulse-slow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 78, 137, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 78, 137, 0);
  }
}

.header__cta-phone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__cta-phone-label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

.header__cta-phone-number {
  font-size: var(--font-size-lg);
  color: var(--secondary-color);
  font-weight: var(--font-weight-black);
  letter-spacing: 0.02em;
}

/* ========================================
   ハンバーガーメニュー（SP）
   ======================================== */

.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-base);
}

.header__hamburger:hover {
  background: rgba(255, 107, 53, 0.1);
}

.header__hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: all var(--transition-base);
}

.header__hamburger.is-active .header__hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__hamburger.is-active .header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-active .header__hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   モバイルメニュー（SP）
   ======================================== */

.header__mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transition: right var(--transition-base);
  z-index: 9999;
  padding-top: 80px;
}

.header__mobile-menu.is-open {
  right: 0;
}

.header__mobile-nav-list {
  list-style: none;
  padding: var(--spacing-lg);
}

.header__mobile-nav-item {
  border-bottom: 1px solid var(--border-color);
}

.header__mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
}

.header__mobile-nav-link:hover {
  background: rgba(255, 107, 53, 0.05);
  color: var(--primary-color);
}

.header__mobile-nav-link.is-current {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
}

.header__mobile-cta {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  border-top: 2px solid var(--border-color);
  margin-top: var(--spacing-lg);
}

/* モバイルメニューオーバーレイ */
.header__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 9998;
}

.header__mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   レスポンシブ
   ======================================== */

@media (max-width: 1024px) {
  .header__nav {
    display: none;
  }

  .header__cta {
    display: none;
  }

  .header__hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header__logo-image {
    height: 40px;
    max-width: 200px;
  }

  .header {
    padding: 12px 0;
  }
}
