/* =========================================================
   HCG shared site header / footer component
   Reusable across HCG training-report pages.
   Include this file + components.js, and add:
     <div id="siteHeader"></div>  (top of body)
     <div id="siteFooter" data-report-of="株式会社〇〇様"></div>  (end of body)
   ========================================================= */

:root {
  --hcg-navy: #0b2341;
  --hcg-navy-deep: #153987;
  --hcg-border: rgba(11, 35, 65, 0.12);
  --hcg-bg-light: #f9f9f9;
  --hcg-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --hcg-max-width: 1140px;
}

/* ---------- Header ---------- */
.shg {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hcg-border);
  font-family: var(--hcg-font);
}

.shg-inner {
  max-width: var(--hcg-max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shg-logo {
  flex: none;
  display: block;
  line-height: 0;
}

.shg-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.shg-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.shg-nav a {
  font-size: 13.5px;
  color: var(--hcg-navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.shg-nav a:hover {
  color: var(--hcg-navy-deep);
  border-color: var(--hcg-navy-deep);
}

.shg-nav a.shg-cta {
  color: #fff;
  background: var(--hcg-navy);
  padding: 8px 18px;
  border-radius: 999px;
  border-bottom: none;
}

.shg-nav a.shg-cta:hover {
  background: var(--hcg-navy-deep);
}

.shg-toggle {
  display: none;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hcg-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.shg-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--hcg-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.shg-toggle[aria-expanded="true"] .shg-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.shg-toggle[aria-expanded="true"] .shg-toggle-bar:nth-child(2) {
  opacity: 0;
}
.shg-toggle[aria-expanded="true"] .shg-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Header: mobile accordion ---------- */
@media (max-width: 860px) {
  .shg-toggle { display: flex; }

  .shg-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--hcg-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .shg-nav.is-open {
    max-height: 400px;
  }

  .shg-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 16px;
  }

  .shg-nav li {
    border-bottom: 1px solid var(--hcg-border);
  }

  .shg-nav li:last-child {
    border-bottom: none;
    padding-top: 10px;
  }

  .shg-nav a {
    display: block;
    padding: 14px 4px;
    border-bottom: none;
  }

  .shg-nav a.shg-cta {
    display: inline-block;
    margin-top: 2px;
  }
}

/* ---------- Footer ---------- */
.sfg {
  background: var(--hcg-navy);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--hcg-font);
  font-size: 13.5px;
  line-height: 1.8;
}

.sfg-inner {
  max-width: var(--hcg-max-width);
  margin: 0 auto;
  padding: 56px 20px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.sfg-brand .sfg-logo {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
  opacity: 0.95;
}

.sfg-brand p {
  margin: 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.6);
}

.sfg-col h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}

.sfg-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sfg-col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s;
}

.sfg-col a:hover {
  color: #fff;
}

.sfg-bottom {
  max-width: var(--hcg-max-width);
  margin: 0 auto;
  padding: 18px 20px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}

.sfg-top {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.sfg-top:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 860px) {
  .sfg-inner {
    grid-template-columns: 1fr 1fr;
  }
  .sfg-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .sfg-inner {
    grid-template-columns: 1fr;
  }
}
