/*
 * site-shell-foundation.css
 *
 * goenn霊園マッチングの共通シェル基盤。
 * 各ブロック固有の見た目は header.css / sidebar.css / footer.css が担当し、
 * このファイルはリセット、共通レイアウト、表示切替だけを保持する。
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: #111;
  font-family: "Roboto", "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
  word-break: break-all;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  border: 0;
  outline: 0;
  background: none;
  font-family: inherit;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Header foundation */
#site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(6px);
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-header.scrolled {
  background: #fff;
  backdrop-filter: none;
}

#site-header.scrolled .header-logo-vertical {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#site-header.scrolled .header-logo-mark {
  opacity: 1;
}

.header-sp {
  display: flex;
  min-height: 64px;
  padding-left: 12px;
  align-items: stretch;
  justify-content: space-between;
}

.header-sp-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.header-sp-logo img {
  width: auto;
  height: 32px;
  object-fit: contain;
}

.header-sp-btns {
  display: flex;
  align-self: stretch;
  gap: 2px;
}

.header-sp-tile {
  display: flex;
  width: 80px;
  align-self: stretch;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: #29648d;
  color: #fff;
  font-family: "Roboto", "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-sp-tile-white {
  width: 64px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: #fff;
  color: #1e3a4d;
  font-size: 10px;
  font-weight: 500;
}

.hamburger-line {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #1e3a4d;
}

.header-sp-menu-label {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.header-pc {
  display: none;
  height: 165px;
  padding-right: 1rem;
  align-items: stretch;
  justify-content: space-between;
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo-wrap {
  position: relative;
  display: flex;
  width: 165px;
  min-width: 165px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.header-logo-vertical {
  width: 90px;
  height: auto;
  object-fit: contain;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: auto;
  opacity: 0;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-right,
.header-btn-group {
  display: flex;
  align-items: center;
}

.header-right {
  gap: 0;
}

.header-btn-group {
  gap: 3px;
}

.header-btn-group .header-btn {
  color: #fff !important;
  pointer-events: inherit !important;
}

.header-btn {
  display: flex;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  height: 70px;
  padding: 0 1.1rem 0 1.2rem;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #8e457b;
  color: #fff;
  font-family: "Roboto", "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-btn-olive {
  background: #667d32;
}

.header-date {
  display: flex;
  margin-left: 15px;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.header-date-row {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  line-height: 1;
}

.header-date-year,
.header-date-md {
  color: #29648d;
  font-size: 27px;
  line-height: 1;
}

.header-date-year {
  font-weight: 100;
  letter-spacing: 0.02em;
}

.header-date-md {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.header-rokuyou {
  width: 100%;
  min-width: 7rem;
  height: 30px;
  margin-top: -6px;
  padding-left: 0.5em;
  border-radius: 0;
  background: #29648d;
  color: #fff;
  font-size: 21px;
  font-weight: 100;
  line-height: 30px;
  letter-spacing: 0.5em;
  text-align: center;
}

/* Sidebar and page foundation */
#sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: none;
  width: 165px;
  height: 100vh;
  flex-shrink: 0;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden auto;
  background: #fff;
  scrollbar-width: none;
}

#sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 0%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.sidebar-bottom {
  display: flex;
  width: 100%;
  margin-top: auto;
  flex-direction: column;
}

.sidebar-hamburger {
  display: flex;
  width: 100%;
  padding: 1.25rem 1rem;
  align-items: center;
  justify-content: center;
}

.sidebar-hamburger button {
  display: flex;
  padding: 0.5rem;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: #2c2c2c;
}

.sidebar-menu-label {
  color: #2c2c2c;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.03em;
}

.sidebar-bar {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: #2c2c2c;
}

#page-body {
  position: relative;
  z-index: 0;
  display: block;
  padding: 72px 0 0;
}

#main-content {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: clamp(0px, calc(100vh - 200px), 100vh);
}

/* Footer and expanded menu foundation */
#taguru-footer {
  background: #21445b;
  color: #fff;
  font-family: "Roboto", "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
}

.footer-inner {
  padding: 64px 80px 48px;
}

.footer-top {
  display: flex;
  margin-bottom: 56px;
  align-items: flex-start;
  gap: 48px;
}

.footer-logo {
  width: auto;
  height: 160px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-tagline-sub {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.footer-tagline-sub .big {
  font-size: 18.2px;
  font-weight: 400;
}

.footer-tagline-sub .sm {
  font-size: 14px;
  font-weight: 300;
}

.footer-tagline-h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.footer-tagline-desc {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.footer-links {
  display: grid;
  margin-bottom: 64px;
  padding-top: 20px;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.04em;
  opacity: 0.9;
  overflow-wrap: break-word;
  text-decoration: none;
  white-space: normal;
  word-break: keep-all;
  transition: opacity 0.2s;
}

.footer-link-dash {
  margin-top: 2px;
  flex-shrink: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 300;
}

.footer-link-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  padding-top: 32px;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.footer-copy {
  color: #fff;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
}

#mobile-menu {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #21445b;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mm-pc {
  position: relative;
  display: none;
  width: 100%;
  min-height: 100vh;
  flex: 1 1 0%;
}

.mm-pc-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 160px;
  padding: 40px 32px 48px;
  flex-direction: column;
  justify-content: space-between;
}

.mm-pc-logo {
  display: block;
  width: auto;
  height: 200px;
  margin-top: -50px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.mm-close-btn {
  display: flex;
  padding: 8px;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  opacity: 1;
  transition: opacity 0.2s;
}

.mm-pc-main {
  position: absolute;
  inset: 0 0 0 160px;
  display: flex;
  padding: 56px 80px 96px 40px;
  flex-direction: column;
  gap: 25px;
}

.mm-sp {
  position: relative;
  display: flex;
  padding: 28px 20px 40px;
  flex: 1 1 0%;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.mm-sp-title {
  display: inline-block;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.tg-toast {
  position: fixed;
  z-index: 10000;
  bottom: 32px;
  left: 50%;
  display: flex;
  min-width: 280px;
  padding: 14px 28px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 0;
  background: #21445b;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.tg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 768px) {
  .header-sp,
  .mm-sp {
    display: none;
  }

  .header-pc,
  #sidebar,
  .mm-pc {
    display: flex;
  }
}

@media print, screen and (min-width: 769px) {
  #page-body {
    padding-top: 165px;
    padding-left: 165px;
  }
}

@media (max-width: 767px) {
  .mm-pc {
    display: none !important;
  }

  .mm-sp {
    display: flex;
  }

  .header-sp {
    min-height: 72px;
  }

  .header-sp-tile {
    width: 104px;
    padding: 0 10px 0 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: #8e457b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
  }

  .header-sp-tile-white {
    width: 64px;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: #fff;
    color: #1e3a4d;
    font-size: 10px;
    font-weight: 500;
  }

  .header-sp-tile-olive {
    background: #667d32;
  }

  .footer-inner {
    padding: 40px 20px 32px;
  }

  .footer-top {
    margin-bottom: 32px;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
  }

  .footer-logo {
    height: 100px;
  }

  .footer-links {
    margin-bottom: 40px;
    padding-top: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-link-col {
    padding: 8px 0;
  }

  .footer-link {
    padding: 6px 0;
    font-size: 14px;
  }

  .footer-bottom {
    justify-content: center;
  }

  #taguru-footer {
    padding-bottom: 72px;
  }
}
