/* =========================================================
   0) CSSカスタムプロパティ
   ========================================================= */
:root {
  --header-h: 0px;
  --adminbar-h: 0px;
}

/* =========================================================
   1) Header 共通
   ========================================================= */
.site-header {
  position: fixed;
  width: 100%;
  z-index: 100;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-4, 1rem);
  padding: 1.2rem 2.4rem;
  position: relative;
}

.site-branding {
  grid-column: 1;
}

.site-logo {
    inline-size: auto;
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* 右側アクションエリア（未使用でも保持） */
.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--sp-4, 1rem);
}

/* =========================================================
   2) Navigation 共通
   ========================================================= */
.main-navigation {
  grid-column: 2;
  justify-self: center;
  position: static;
  transform: none;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--c-ink);
}

.nav-menu li {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.8rem;
  transition: background-color 0.2s ease;
}

.nav-menu a {
  color: var(--c-ink);
  font-family: 'Zen Kurenaido', sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-menu li:hover {
  background-color: var(--c-ink);
}

.nav-menu li:hover a {
  color: #fff;
}

/* CTA */
li.nav-contact {
  background: var(--c-ink);
}

li.nav-contact:hover {
  background: #ec6c00;
}

a.nav-contact__button {
  color: #fff;
  font-weight: 600;
  padding: 0.4rem;
}

/* =========================================================
   3) ドロップダウン
   ========================================================= */
.menu-item-has-children {
  position: relative;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 200px;
  padding: 0;
  background: #1a474c;
  z-index: 999;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.sub-menu li:hover {
  color: #1a474c;
  background: #fff;
}

.sub-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  white-space: nowrap;
}

.sub-menu li a:hover {
  color: #1a474c;
}

.menu-item-has-children:hover .sub-menu {
  display: block;
}

/* =========================================================
   4) 固定ヘッダー制御 / FV高さ補正
   ========================================================= */
body:not(.fixed-header) .site-header {
  position: fixed;
  top: var(--adminbar-h, 0px);
  left: 0;
  right: 0;
  z-index: 1000;
}

body.fixed-header header.site-header {
  position: fixed !important;
  top: var(--adminbar-h, 0px) !important;
  left: 0;
  right: 0;
  z-index: 1000;
}

body.has-fv .hero,
body.has-fv .fv,
body.has-fv .fv-service,
body.has-fv .top-hero,
body.has-fv .hero-section {
  min-height: calc(100svh - var(--header-h, 0px) - var(--adminbar-h, 0px));
  min-height: calc(100vh - var(--header-h, 0px) - var(--adminbar-h, 0px));
  display: flex;
  align-items: center;
}

/* =========================================================
   6) トップページ専用（page-id-9）
   ========================================================= */
html,
body {
  height: 100%;
}

body.page-id-9 {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-id-9 .site-header {
  flex: 0 0 auto;
}

body.page-id-9 .site-main {
  flex: 1 0 auto;
}

body.page-id-9 #wrapper-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

body.page-id-9 #wrapper-footer,
body.page-id-9 .container-fluid {
  overflow: visible;
}

/* =========================================================
   7) Tablet / Common Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .header-inner {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu a {
    font-size: 1rem;
  }

  .footer-copy {
    margin-bottom: 1.2rem;
  }

  .footer-menu li,
  .legal-links li {
    margin: 0;
  }

  .main-navigation .nav-menu {
    margin-top: 5rem;
  }

  .nav-menu li:focus-visible {
    outline: none;
  }
}

/* =========================================================
   8) PC明示
   ========================================================= */
@media (min-width: 769px) {
  .nav-toggle,
  .site-overlay {
    display: none;
  }
}

/* =========================================================
   9) SP ドロワーナビ
   ========================================================= */
@media (max-width: 768px) {
  .site-header,
  .site-header .header-inner {
    overflow: visible;
  }

  .site-header .header-inner {
    height: auto !important;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
	gap: 0;
  }
	
	.site-branding {
		display: flex;
		justify-content: center;
	}

  .site-branding a {
    display: inline-flex;
    align-items: center;
    text-indent: 0 !important;
  }

  .site-branding .site-logo {
    display: block;
    width: auto;
    opacity: 1 !important;
    visibility: visible !important;
  }

  button.nav-toggle {
    border: none;
  }

  .nav-toggle {
    position: relative;
    z-index: 1002;
  }

  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    content: "";
    position: absolute;
    width: 1.6rem;
    height: 2px;
    left: 50%;
    background: #338998;
    transform: translateX(-50%);
  }

  .nav-toggle-bar {
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .nav-toggle-bar::before {
    top: -8px;
  }

  .nav-toggle-bar::after {
    top: 8px;
  }

  .nav-open .nav-toggle-bar {
    background: transparent;
  }

  .nav-open .nav-toggle-bar::before {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-open .nav-toggle-bar::after {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .main-navigation {
    position: fixed;
    inset: var(--adminbar-h, 0) 0 0 auto;
    width: 86vw;
    max-width: 420px;
    height: calc(100dvh - var(--adminbar-h, 0));
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 1001;
    background: #fff;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
  }

  .nav-open .main-navigation {
    transform: translateX(0);
  }

  .main-navigation .nav-menu {
    display: block;
    list-style: none;
    margin: 0;
    margin-top: 5rem;
    padding: 0.5rem 0;
    border: none;
  }

  .main-navigation .nav-menu > li > a {
    display: block;
    padding: 0.9rem 0;
  }

  .site-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .nav-open .site-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
  }

  .menu-item-has-children.open > .sub-menu {
    display: block;
  }
}


/* ========================================
   Footer
======================================== */
.site-footer {
    margin-top: auto;
    color: #1a474c;
    border-top: 1px solid #EC6C00;
}

/* 上段 */
.footer-main {
  padding: 3rem 0 2rem;
}

.footer-main__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-column__title {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 700;
  line-height: 1.5;
  color: #1a474c;
}

.footer-column__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(26, 71, 76, 0.9);
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-list li + li {
  margin-top: 0.7rem;
}

.footer-links-list a {
  color: #1a474c;
  text-decoration: none;
  line-height: 1.8;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links-list a:hover,
.footer-links-list a:focus {
  color: #ec6c00;
  opacity: 1;
}

/* CTA */
.footer-cta {
    margin-bottom: 2rem;
}

.footer-cta__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.footer-cta__content {
  flex: 1 1 auto;
}

.footer-cta__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
  color: #1a474c;
}

.footer-cta__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(26, 71, 76, 0.9);
}

.footer-cta__button-wrap {
  flex: 0 0 auto;
}

.footer-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12vw;
    padding: 1.6rem;
    border-radius: 1rem;
    background: #1a474c;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.footer-cta__button:hover,
.footer-cta__button:focus {
  background: #ec6c00;
  transform: translateY(-1px);
}

/* 最下部 */
.footer-bottom {
  padding: 0 1.5rem 1.8rem;
}

.footer-bottom__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.2rem;
}

.footer-copy {
  margin: 0;
  text-align: center;
  color: rgba(26, 71, 76, 0.8);
  font-size: 0.85rem;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
  .footer-main__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2rem;
  }

  .footer-column--about {
    grid-column: 1 / -1;
  }

  .footer-cta__inner {
    padding: 1.75rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .footer-main {
    padding: 3.5rem 1.25rem 2.5rem;
  }

  .footer-main__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-cta {
    padding: 0 1.25rem 3rem;
  }

  .footer-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem;
  }

    .footer-cta__button-wrap {
        width: 100%;
        text-align: center;
    }

.footer-cta__button {
        text-align: center;
        min-width: 50vw;
    }

  .footer-bottom {
    padding: 0 1.25rem 1.5rem;
  }
}

.footer-main,
.footer-cta,
.footer-bottom {
    max-width: 96vw;
    margin: auto;
}