/* =====================================================
   SGAC Site Shell v2 - Header & Footer
   Scope: .sgac-site-shell
   ===================================================== */

:root {
  --sgac-navy: #1a2c5b;
  --sgac-navy-dark: #0f1c3d;
  --sgac-navy-light: #243471;
  --sgac-red: #e63328;
  --sgac-red-hover: #c0261d;
  --sgac-white: #ffffff;
  --sgac-gray-light: #f5f6fa;
  --sgac-gray: #6b7280;
  --sgac-border: #e5e7eb;
  --sgac-font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

/* ---- Reset for shell only ---- */
.sgac-site-shell * {
  box-sizing: border-box;
}

/* =====================================================
   HEADER
   ===================================================== */
.sgac-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--sgac-white);
  border-bottom: 1px solid var(--sgac-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-family: var(--sgac-font-ja);
}

.sgac-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.sgac-header__logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sgac-navy);
}
.sgac-header__logo-img {
  height: 36px;
  width: auto;
}
.sgac-header__logo-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sgac-navy);
}
.sgac-header__logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--sgac-gray);
}

/* Nav */
.sgac-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sgac-header__nav-item > a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sgac-navy);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s;
}
.sgac-header__nav-item > a:hover {
  background: var(--sgac-gray-light);
}

/* Language selector */
.sgac-lang-selector {
  position: relative;
}
.sgac-lang-selector__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sgac-navy);
  background: var(--sgac-gray-light);
  border: 1px solid var(--sgac-border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  user-select: none;
}
.sgac-lang-selector__toggle:hover {
  background: #e9ebf0;
}
.sgac-lang-selector__icon {
  font-size: 12px;
  transition: transform 0.2s;
}
.sgac-lang-selector.is-open .sgac-lang-selector__icon {
  transform: rotate(180deg);
}
.sgac-lang-selector__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: var(--sgac-white);
  border: 1px solid var(--sgac-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 100;
}
.sgac-lang-selector.is-open .sgac-lang-selector__dropdown {
  display: block;
}
.sgac-lang-selector__dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--sgac-navy);
  text-decoration: none;
  transition: background 0.15s;
}
.sgac-lang-selector__dropdown a:hover {
  background: var(--sgac-gray-light);
}

/* CTA Button in header */
.sgac-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--sgac-red);
  color: var(--sgac-white);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.sgac-header__cta:hover {
  background: var(--sgac-red-hover);
  color: var(--sgac-white);
  text-decoration: none;
}

/* Hamburger (mobile) */
.sgac-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
}
.sgac-hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sgac-navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.sgac-hamburger.is-open .sgac-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sgac-hamburger.is-open .sgac-hamburger__bar:nth-child(2) {
  opacity: 0;
}
.sgac-hamburger.is-open .sgac-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.sgac-mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sgac-white);
  z-index: 9998;
  overflow-y: auto;
  flex-direction: column;
  padding: 24px;
  font-family: var(--sgac-font-ja);
}
.sgac-mobile-menu.is-open {
  display: flex;
}
.sgac-mobile-menu__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sgac-mobile-menu__nav li + li {
  border-top: 1px solid var(--sgac-border);
}
.sgac-mobile-menu__nav a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--sgac-navy);
  text-decoration: none;
}
.sgac-mobile-menu__cta {
  margin-top: 24px;
  display: block;
  padding: 14px;
  background: var(--sgac-red);
  color: var(--sgac-white);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
}
.sgac-mobile-menu__lang {
  margin-top: 16px;
}
.sgac-mobile-menu__lang a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--sgac-gray-light);
  border: 1px solid var(--sgac-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--sgac-navy);
  text-decoration: none;
}

/* =====================================================
   FOOTER
   ===================================================== */
.sgac-footer {
  background: var(--sgac-navy-dark);
  color: rgba(255,255,255,0.85);
  font-family: var(--sgac-font-ja);
}

.sgac-footer__main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.sgac-footer__brand p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
}
.sgac-footer__logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--sgac-white);
  margin: 0;
}
.sgac-footer__logo-text span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
}

.sgac-footer__col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sgac-white);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sgac-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sgac-footer__links li + li {
  margin-top: 8px;
}
.sgac-footer__links a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.sgac-footer__links a:hover {
  color: var(--sgac-white);
}

.sgac-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
}
.sgac-footer__contact-item a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.sgac-footer__contact-item a:hover {
  color: var(--sgac-white);
}

.sgac-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sgac-footer__bottom p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.sgac-footer__bottom-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.sgac-footer__bottom-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}
.sgac-footer__bottom-links a:hover {
  color: rgba(255,255,255,0.8);
}

/* Cookie consent */
.sgac-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--sgac-navy);
  color: var(--sgac-white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 99999;
  font-family: var(--sgac-font-ja);
  font-size: 13px;
  flex-wrap: wrap;
}
.sgac-cookie-banner a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}
.sgac-cookie-banner__btn {
  padding: 8px 20px;
  background: var(--sgac-red);
  color: var(--sgac-white);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.sgac-cookie-banner__btn:hover {
  background: var(--sgac-red-hover);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .sgac-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .sgac-header__nav,
  .sgac-header__cta,
  .sgac-lang-selector {
    display: none;
  }
  .sgac-hamburger {
    display: flex;
  }
  .sgac-footer__main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 20px 32px;
  }
  .sgac-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }
}

@media (max-width: 390px) {
  .sgac-header__inner {
    padding: 0 16px;
  }
  .sgac-mobile-menu {
    padding: 20px 16px;
  }
}
