/* ==========================================================================
   Layout - Header, Navigation, Footer, CTA Bar
   kakuyasu-hp Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1024px) {
  .site-header__inner {
    height: var(--header-height-desktop);
  }
}

/* Logo */
.site-header__logo {
  flex-shrink: 0;
  z-index: 1001;
}

.site-header__logo a {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.site-header__logo img {
  height: 36px;
  width: auto;
}

@media (min-width: 1024px) {
  .site-header__logo img {
    height: 42px;
  }
}

.site-header__logo-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.site-header__logo-main {
  font-size: var(--fs-md);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.2;
}

.site-header__logo-sub {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* Header Right */
.site-header__right {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  z-index: 1001;
}

@media (min-width: 1024px) {
  .site-header__right {
    gap: var(--sp-24);
  }
}

/* Phone */
.site-header__phone {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__phone {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    color: var(--color-primary);
    font-family: var(--font-en);
    font-weight: 700;
    font-size: var(--fs-xl);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
  }

  .site-header__phone:hover {
    color: var(--color-accent);
  }

  .site-header__phone svg,
  .site-header__phone-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
    color: var(--color-accent);
  }

  .site-header__phone-number {
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: 0.05em;
  }
}

/* Header Contact group */
.site-header__contact {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__contact {
    display: flex;
    align-items: center;
    gap: var(--sp-24);
  }
}

/* Header CTA Button */
.site-header__cta-btn {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-8);
    padding: var(--sp-12) var(--sp-24);
    background-color: var(--color-accent);
    color: var(--color-white);
    font-size: var(--fs-sm);
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
  }

  .site-header__cta-btn:hover {
    background-color: var(--color-accent-hover);
    color: var(--color-white);
    transform: translateY(-1px);
  }
}

/* --------------------------------------------------------------------------
   Hamburger Menu
   -------------------------------------------------------------------------- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: var(--sp-8);
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

@media (min-width: 1024px) {
  .hamburger {
    display: none;
  }
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger__line:nth-child(1) {
  transform: translateY(-7px);
}

.hamburger__line:nth-child(2) {
  transform: translateY(0);
}

.hamburger__line:nth-child(3) {
  transform: translateY(7px);
}

/* Active state - X animation */
.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Global Navigation
   -------------------------------------------------------------------------- */

/* Mobile: Full-screen overlay */
.global-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-white);
  z-index: 999;
  overflow-y: auto;
  transition: right var(--transition-base);
  padding-top: var(--header-height-mobile);
}

.global-nav.is-open {
  right: 0;
}

.global-nav__list {
  display: flex;
  flex-direction: column;
  padding: var(--sp-24) 20px;
}

.global-nav__item {
  border-bottom: 1px solid var(--color-border);
}

.global-nav__item:last-child {
  border-bottom: none;
}

.global-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-16) 0;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

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

.global-nav__link::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(-45deg);
  transition: border-color var(--transition-fast);
}

.global-nav__link:hover::after {
  border-color: var(--color-accent);
}

/* Mobile nav CTA */
.global-nav__cta {
  padding: var(--sp-32) 20px var(--sp-48);
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

.global-nav__phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-16);
  background-color: var(--color-bg-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-en);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-primary);
}

/* Desktop: Horizontal navigation */
@media (min-width: 1024px) {
  .global-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    overflow: visible;
    padding-top: 0;
    transition: none;
  }

  .global-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-4);
    padding: 0;
  }

  .global-nav__item {
    border-bottom: none;
  }

  .global-nav__link {
    padding: var(--sp-8) var(--sp-12);
    font-size: var(--fs-sm);
    font-weight: 500;
    position: relative;
    white-space: nowrap;
  }

  .global-nav__link::after {
    display: none;
  }

  .global-nav__link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--sp-12);
    right: var(--sp-12);
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-base);
  }

  .global-nav__link:hover::before,
  .global-nav__link.is-current::before {
    transform: scaleX(1);
  }

  .global-nav__cta {
    display: none;
  }
}

/* Body scroll lock when nav is open */
body.nav-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Mobile CTA Bar (Fixed Bottom)
   -------------------------------------------------------------------------- */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  z-index: 999;
  background-color: var(--color-white);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  padding: var(--sp-8);
}

.cta-bar.is-visible {
  display: flex;
  gap: var(--sp-8);
}

@media (min-width: 1024px) {
  .cta-bar {
    display: none !important;
  }
}

.cta-bar__phone,
.cta-bar__contact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-12) var(--sp-8);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

a.cta-bar__phone,
.cta-bar__phone {
  background-color: var(--color-primary);
  color: #ffffff;
}

a.cta-bar__phone:hover,
.cta-bar__phone:hover {
  background-color: var(--color-primary-light);
  color: #ffffff;
}

a.cta-bar__contact,
.cta-bar__contact {
  background-color: var(--color-accent);
  color: #ffffff;
}

a.cta-bar__contact:hover,
.cta-bar__contact:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

.cta-bar__phone svg,
.cta-bar__contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Footer CTA Section
   -------------------------------------------------------------------------- */
.footer-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0f1a2e 100%);
  color: var(--color-white);
  padding: var(--sp-64) 0;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-cta {
    padding: var(--sp-80) 0;
  }
}

.footer-cta__title {
  font-size: var(--fs-xl);
  font-weight: 900;
  margin-bottom: var(--sp-8);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .footer-cta__title {
    font-size: var(--fs-3xl);
  }
}

.footer-cta__subtitle {
  font-size: var(--fs-sm);
  opacity: 0.8;
  margin-bottom: var(--sp-32);
}

.footer-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-16);
}

@media (min-width: 768px) {
  .footer-cta__actions {
    flex-direction: row;
    justify-content: center;
    gap: var(--sp-24);
  }
}

.footer-cta__phone {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-en);
  color: var(--color-white);
  line-height: 1;
}

.footer-cta__phone:hover {
  color: var(--color-accent);
}

.footer-cta__phone svg {
  width: 28px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}

.footer-cta__phone-number {
  font-size: 2rem;
  font-weight: 900;
}

@media (min-width: 768px) {
  .footer-cta__phone-number {
    font-size: 2.5rem;
  }
}

.footer-cta__phone-hours {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  font-family: var(--font-ja);
  font-weight: 400;
  opacity: 0.7;
}

.footer-cta__text {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 32px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
  padding: var(--sp-48) 0 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-32);
  margin-bottom: var(--sp-48);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-32);
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-48);
  }
}

/* Footer Logo */
.site-footer__logo {
  margin-bottom: var(--sp-16);
}

.site-footer__logo-main {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 900;
  color: var(--color-white);
}

.site-footer__logo-sub {
  display: block;
  font-size: var(--fs-xs);
  opacity: 0.6;
}

/* Footer Company Info */
.site-footer__company {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.site-footer__company-name {
  font-size: var(--fs-md);
  font-weight: 700;
}

.site-footer__company-address {
  font-size: var(--fs-sm);
  opacity: 0.7;
  line-height: 1.8;
}

.site-footer__company-tel {
  font-family: var(--font-en);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-white);
}

.site-footer__company-tel:hover {
  color: var(--color-accent);
}

.site-footer__company-mail {
  font-size: var(--fs-sm);
  color: var(--color-white);
  opacity: 0.8;
}

.site-footer__company-mail:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* Footer Navigation Columns */
.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.site-footer__nav-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  margin-bottom: var(--sp-4);
}

.site-footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.site-footer__nav-link,
.site-footer__nav-list a {
  font-size: var(--fs-sm);
  color: var(--color-white);
  opacity: 0.8;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.site-footer__nav-link:hover,
.site-footer__nav-list a:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* Footer address/tel/email */
.site-footer__address {
  font-style: normal;
  font-size: var(--fs-sm);
  opacity: 0.7;
  line-height: 1.8;
}

.site-footer__tel a,
.site-footer__email a {
  color: var(--color-white);
  opacity: 0.8;
}

.site-footer__tel a:hover,
.site-footer__email a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.site-footer__tel {
  font-family: var(--font-en);
  font-size: var(--fs-md);
  font-weight: 700;
}

.site-footer__email {
  font-size: var(--fs-sm);
}

/* Footer Bottom */
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--sp-24) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-12);
}

@media (min-width: 768px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.site-footer__legal {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.site-footer__legal a {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer__legal a:hover {
  color: var(--color-white);
}

.site-footer__copyright {
  font-size: var(--fs-xs);
  opacity: 0.5;
  font-family: var(--font-en);
}

.site-footer__bottom-links {
  display: flex;
  gap: var(--sp-16);
}

.site-footer__bottom-link {
  font-size: var(--fs-xs);
  color: var(--color-white);
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.site-footer__bottom-link:hover {
  opacity: 1;
  color: var(--color-white);
}
