@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800;900&family=Noto+Serif+JP:wght@400;500;600;700;800;900&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css");

/* AUTO SHOP KOIZUMI - TreeCMS shared styles */

:root {
  --red: #ed0b18;
  --red-deep: #d70714;
  --blue: #064397;
  --blue-bright: #075bbd;
  --navy: #092b68;
  --ink: #142c55;
  --muted: #5d6f8f;
  --sky: #eaf5ff;
  --pale: #f7fbff;
  --line: #e3eaf3;
  --white: #ffffff;
  --wide: min(1336px, calc(100% - 64px));
  --content: min(1160px, calc(100% - 40px));
  --shadow: 0 7px 22px rgba(17, 54, 111, .10);
  --font-gothic: "Noto Sans JP", sans-serif;
  --font-mincho: "Noto Serif JP", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-gothic);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

.mobile-menu-overlay { display: none; }

.font-serif { font-family: var(--font-mincho); }

.layout-wide { width: var(--wide); margin-inline: auto; }

.content-wrap { width: var(--content); margin-inline: auto; }

.site-header {
  height: 84px;
  display: grid;
  grid-template-columns: 350px minmax(690px, 1fr) 342px;
  align-items: stretch;
  position: relative;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(9, 43, 104, .08);
}

.site-logo {
  display: flex;
  align-items: center;
  padding-left: 38px;
}

.site-logo img { width: 310px; height: 66px; object-fit: contain; }

.global-nav {
  max-width: 836px;
  width: 100%;
  justify-self: center;
  display: flex;
  align-items: stretch;
}

.global-nav a,
.global-nav__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  color: #17233a;
}

.global-nav a small,
.global-nav__item small {
  font-family: var(--font-gothic);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
}

.global-nav a::after {
  content: "";
  position: absolute;
  left: 21%;
  right: 79%;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transition: left .2s ease, right .2s ease;
}

.global-nav a:hover::after,
.global-nav a.is-active::after { left: 12%; right: 12%; }

.global-nav a.is-active span,
.global-nav a.is-active small { color: var(--red); }

.header-phone {
  min-width: 0;
  padding: 0 28px 0 51px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(112deg, var(--red) 0 86%, #f32b34 100%);
  clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%);
}

.header-phone > i { width: 31px; flex: none; font-size: 29px; text-align: center; }

.header-phone span { display: flex; flex-direction: column; line-height: 1.25; }

.header-phone strong {
  font-family: var(--font-gothic);
  font-size: 23px;
  letter-spacing: .08em;
  font-weight: 700;
}

.header-phone small { margin-top: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }

.menu-button, .mobile-menu { display: none; }

.site-footer { padding: 36px 0; background: var(--white); border-top: 1px solid var(--line); }

.site-footer__inner { display: flex; align-items: center; justify-content: space-between; }

.site-footer img { width: 250px; }

.site-footer p { color: var(--muted); font-family: var(--font-gothic); font-size: 12px; }

/* Shared footer */
.lower-footer { padding: 0; }
.lower-footer__inner { padding-block: 48px; display: grid; grid-template-columns: 300px 1fr; gap: 70px; }
.lower-footer__brand img { width: 280px; }
.lower-footer__brand p { margin: 18px 0 8px; color: var(--muted); font-size: 13px; }
.lower-footer__phone { color: var(--red); font-size: 20px; font-weight: 900; }
.lower-footer__phone i { margin-right: 8px; }
.lower-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0 26px; }
.lower-footer__nav a,
.lower-footer__nav-item { padding: 10px 4px; border-bottom: 1px solid var(--page-border, var(--line)); color: var(--navy); font-size: 14px; font-weight: 700; }
.lower-footer__nav i { margin-right: 9px; color: var(--red); font-size: 10px; }
.lower-footer__copyright { padding: 13px 20px; background: var(--navy); text-align: center; }
.lower-footer__copyright p { margin: 0; color: var(--white); font-size: 11px; letter-spacing: .08em; }

.mobile-phone { display: none; }

@media (max-width: 1020px) {
  .lower-footer__inner { grid-template-columns: 240px 1fr; gap: 38px; }
}

@media (max-width: 760px) {
  .lower-footer__inner { grid-template-columns: 1fr; gap: 26px; }
  .lower-footer__nav { grid-template-columns: 1fr; }
}

@media (max-width: 1380px) {
  .site-header { grid-template-columns: 320px 1fr 260px; }
  
    .site-logo { padding-left: 24px; }
  
    .site-logo img { width: 290px; height: auto; }
  
    .global-nav a, .global-nav__item { font-size: 13px; }
  
    .header-phone { padding-left: 37px; padding-right: 15px; }
  
    .header-phone strong { font-size: 20px; }
  
    .header-phone small { font-size: 9px; }
}

@media (max-width: 1200px) {
  .site-header { grid-template-columns: 280px 1fr 250px; }
  .site-logo img { width: 250px; }
  .header-phone { padding-left: 32px; padding-right: 14px; }
}

@media (max-width: 1020px) {
  :root { --wide: min(100% - 36px, 920px); }
  
    .site-header { height: 74px; grid-template-columns: 1fr auto; padding: 0 18px; align-items: center; }
  
    .site-logo {
      padding: 0;
      position: relative;
      z-index: 4;
      min-width: 0;
      width: max-content;
      max-width: 100%;
    }
  
    .site-logo img { width: 250px; max-width: 100%; pointer-events: none; }
  
    .global-nav, .header-phone { display: none; }
  
    .menu-button {
      width: 52px;
      height: 52px;
      padding: 5px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--blue);
      background: var(--white);
      border: 2px solid var(--blue);
      border-radius: 10px;
      position: relative;
      z-index: 3;
    }
  
    .menu-button i { width: 25px; font-size: 24px; text-align: center; }
  
    .menu-button span { font-family: var(--font-gothic); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
  
    .mobile-menu {
      position: absolute;
      z-index: 2;
      top: 74px;
      left: 0;
      right: 0;
      max-height: calc(100dvh - 74px);
      overflow-y: auto;
      overscroll-behavior: contain;
      padding: 20px;
      grid-template-columns: repeat(2, 1fr);
      gap: 9px;
      background: var(--white);
      box-shadow: 0 15px 30px rgba(17, 54, 111, .14);
    }
  
    .mobile-menu:not([hidden]) { display: grid; }

    .mobile-menu-overlay:not([hidden]) {
      position: fixed;
      z-index: 1;
      inset: 74px 0 0;
      display: block;
      padding: 0;
      background: rgba(0, 0, 0, .58);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      border: 0;
      cursor: default;
    }

    body.menu-open { overflow: hidden; }

    body.menu-open .site-header { z-index: 200; }
  
    .mobile-menu a { padding: 12px 14px; color: var(--blue); background: var(--pale); border-radius: 8px; font-weight: 800; }
  
    .mobile-menu__phone { grid-column: 1 / -1; color: var(--white) !important; background: var(--red) !important; text-align: center; }
}

@media (max-width: 680px) {
  :root { --wide: min(100% - 24px, 560px); --content: min(100% - 30px, 560px); }
  
    body { padding-bottom: 70px; }
  
    .site-header { height: 68px; padding-inline: 12px; }
  
    .site-logo img { width: 225px; }
  
    .menu-button { width: 46px; height: 46px; }
  
    .mobile-menu { top: 68px; max-height: calc(100dvh - 68px); }

    .mobile-menu-overlay:not([hidden]) { inset: 68px 0 0; }
  
    .site-footer__inner:not(.lower-footer__inner) { flex-direction: column; align-items: flex-start; gap: 20px; }
  
    .mobile-phone {
      position: fixed;
      z-index: 150;
      left: 12px;
      right: 12px;
      bottom: 9px;
      height: 55px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: var(--white);
      background: var(--red);
      border-radius: 16px;
      box-shadow: 0 10px 30px rgba(237, 11, 24, .24);
      font-weight: 800;
    }
  
    .mobile-phone i { width: 24px; font-size: 22px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
