/* ============================================================
   共通CSS（inc/header.php・inc/footer.php 用）
   読み込み順：common.css → style.css
   ============================================================ */

/* ----- Variables（ヘッダー・フッターで使うもの） ----- */
:root {
  --green-dark: #2d6a2d;
  --green: #3d8b3d;
  --green-light: #e8f5e9;
  --amber: #e8a020;
  --amber-dark: #c47a10;
  --text-sub: #556b57;
  --border: #d4e5d4;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
  --transition: 0.3s ease;
  --mega-header-height: 32px;
  --header-height: 68px;
}

/* ----- Base（ヘッダー・フッター内だけに適用） -----
   :where() で詳細度を0にしているため、
   style.css の要素セレクタ（a / img / ul）と同じ強さで、下の個別指定を邪魔しない */
:where(.mega-header, .site-header, .site-footer, .scroll-top),
:where(.mega-header, .site-header, .site-footer, .scroll-top) *,
:where(.mega-header, .site-header, .site-footer, .scroll-top) *::before,
:where(.mega-header, .site-header, .site-footer, .scroll-top) *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:where(.mega-header, .site-header, .site-footer) {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
}

:where(.mega-header, .site-header, .site-footer) img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

:where(.mega-header, .site-header, .site-footer) a,
:where(.scroll-top) {
  display: block;
  color: inherit;
  text-decoration: none;
}

:where(.mega-header, .site-header, .site-footer) ul {
  list-style: none;
}

/* ----- Container ----- */
.container {
  max-width: 1200px;
  width: 95%;
  margin: 0 auto;
  padding: 0;
}

@media screen and (max-width: 374px){
  .container{
    padding: 0 10px;
  }
}

/* ============================================================
   メガソフトHEADER
   ============================================================ */
.mega-header {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  height: 32px;
}

.mega-logo{
  display: block;
  width: 116px;
  margin-left: 1rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: absolute;
  z-index: 1000;
  top: 32px;
  left: 0;
  width: 100%;
  height: 68px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), top .15s ease;
}

.site-header.js-fixed{
  position: fixed;
  top: 0;
}

#parts .site-header{
  position: relative;
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.header-logo {
  max-width: clamp(172px, calc(300 / 1920 * 100vw), 300px);
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 4px 10px;
}

.header-nav ul li a {
  padding: 7px clamp(8px, calc(10 / 1600 * 100vw), 10px);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: 8px;
  transition: all var(--transition);
}

.header-nav ul li a:hover {
  color: var(--green-dark);
  background: var(--green-light);
}

.btn-nav {
  background: var(--amber) !important;
  color: #fff !important;
  border-radius: 100px !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
}

.btn-nav:hover {
  background: var(--amber-dark) !important;
  color: #fff !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1a2b1a;
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.footer-logo {
  max-width: clamp(220px, calc(300 / 1600 * 100vw), 300px);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all var(--transition);
}

.footer-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.footer-bottom {
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   SCROLL TOP
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: clamp(48px, calc(56 / 1200 * 100vw), 56px);
  height: clamp(48px, calc(56 / 1200 * 100vw), 56px);
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(45,106,45,0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 6;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .container {
    width: 100%;
    padding: 0 clamp(12px, calc(24 / 1024 * 100vw), 24px);
  }
}

@media (max-width: 900px) {
  /* Header */
  .header-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 32px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .header-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .header-nav ul li {
    width: 100%;
  }

  .header-nav ul li a {
    display: block;
    padding: 12px 16px;
    width: 100%;
    border-radius: 10px;
    text-align: center;
    font-size: 0.82rem;
    padding: 7px 8px;
  }

  .btn-nav{
    max-width: 320px;
    margin: 8px auto 0;
    text-align: center;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { gap: 2px; }
}
