@charset "UTF-8";

/* =================================================================
   header.css - ヘッダー＆ナビゲーション
   ================================================================= */

/* ----- Header ----- */
.header {
  background-color: var(--color-bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header__logo {
  display: block;
  flex-shrink: 0;
}

.header__logo img {
  height: 50px;
  width: auto;
}

.header__right {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.header__contact {
  text-align: right;
}

.header__address {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.header__tel {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header__tel a {
  text-decoration: none;
  color: inherit;
}

.header__cta,
.header__cta-sub {
  white-space: nowrap;
}

/* ----- Hamburger Button ----- */
.header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 200;
  border-radius: var(--radius-sm);
}

.header__hamburger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.header__hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Hamburger open state */
.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Navigation ----- */
.nav {
  background-color: var(--color-primary);
}

/* Overlay (mobile only) */
.nav__overlay {
  display: none;
}

.nav__list {
  display: flex;
  justify-content: center;
}

.nav__item {
  flex: 1;
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--space-sm);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--transition-fast);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.nav__item:first-child .nav__link {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.nav__link:hover,
.nav__link:focus-visible {
  background-color: var(--color-primary-dark);
  color: #fff;
}

.nav__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.nav__link--cta {
  background-color: var(--color-accent);
}

.nav__link--cta:hover {
  background-color: var(--color-accent-hover);
}

/* =================================================================
   Responsive: Tablet+ (768px)
   ================================================================= */
@media (min-width: 768px) {
  .nav__item--mobile-only {
    display: none;
  }

  .header__inner {
    height: 90px;
  }

  .header__logo img {
    height: 60px;
  }

  .header__right {
    display: flex;
  }

  .header__hamburger {
    display: none;
  }

  .nav__list {
    max-width: var(--width-container);
    margin: 0 auto;
  }
}

/* =================================================================
   Mobile drawer (max-width: 767px)
   ================================================================= */
@media (max-width: 767px) {
  .header__inner {
    height: 60px;
  }

  /* Navigation becomes drawer on mobile */
  .nav {
    background: none;
  }

  /* Overlay */
  .nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity var(--transition-base);
  }

  /* Drawer panel */
  .nav__drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-bg-white);
    z-index: 160;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
    padding-top: 70px;
  }

  .nav__list {
    flex-direction: column;
  }

  .nav__drawer .nav__link {
    color: var(--color-text);
    height: auto;
    padding: var(--space-md) var(--space-lg);
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--text-base);
  }

  .nav__drawer .nav__link:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
  }

  .nav__drawer .nav__link--highlight {
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    background-color: transparent;
    margin: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    justify-content: center;
  }

  .nav__drawer .nav__link--highlight:hover {
    background-color: var(--color-primary);
    color: #fff;
  }

  .nav__drawer .nav__link--cta {
    background-color: var(--color-accent);
    color: #fff;
    margin: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    justify-content: center;
    border-bottom: none;
  }

  .nav__drawer .nav__link--cta:hover {
    background-color: var(--color-accent-hover);
    color: #fff;
  }

  /* Open state (toggled by JS) */
  .nav.is-open .nav__overlay {
    display: block;
    opacity: 1;
  }

  .nav.is-open .nav__drawer {
    transform: translateX(0);
  }
}
