/* =========================
   Common Layout
========================= */

/* _s のデフォルトのを余白打ち消す */
main {
  margin: 0 auto;
  padding: 40px;
  position: relative;
}

/* ④ 768px → 767px に統一 */
@media (max-width: 767px) {
  main {
    padding: 16px;
  }
}

/* オーバーレイ */
.site-main::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 100;
}

body.menu-open .site-main::before {
  opacity: 1;
  visibility: visible;
}

a {
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease;
}

a:visited {
  color: inherit;
}

a:hover {
  transform: translateY(3px);
}

/* =========================
   タイトルフォント
========================= */
h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.p-pageTitle__sub {
  display: block;
  font-size: clamp(0.8rem, 1vw, 1.4rem);
  margin-top: 4px;
  color: #666;
}

/* =========================
   Header
========================= */

.site-header {
  display: flex;
  align-items: center;
  padding: 16px 24px;
}

.site-branding {
  display: flex;
  align-items: baseline;
  gap: 22px;
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
}

.site-title a {
  text-decoration: none;
  color: #000;
}

.site-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #333;
}

.site-description {
  display: none;
}

/* =========================
   header search
========================= */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}

.site-header__search {
  display: flex;
  align-items: center;
  margin: 0 0 0 20px;
}

.site-header__search .search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border-bottom: 1px solid #000;
}

.site-header__search label {
  display: block;
  margin: 0;
}

.site-header__search .search-field {
  width: 160px;
  height: auto;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  font-size: 0.8rem;
  color: #000;
  -webkit-appearance: none;
  appearance: none;
}

.site-header__search .search-field::-webkit-search-decoration,
.site-header__search .search-field::-webkit-search-cancel-button,
.site-header__search .search-field::-webkit-search-results-button,
.site-header__search .search-field::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.site-header__search .search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.site-header__search .search-submit:hover {
  background: transparent;
  color: inherit;
  transform: none;
}

.site-header__search .search-field:focus,
.site-header__search .search-submit:focus {
  outline: none;
  box-shadow: none;
}

@media (max-width: 767px) {
  .site-header__search {
    display: none;
  }
}

.main-navigation .menu-toggle {
  margin-left: 0;
}

/* =========================
   ページネーション
========================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.pagination .current {
  font-weight: bold;
}

/* =========================
   Footer
========================= */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 24px;
}

.footer-widgets ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 20px;
}

.footer-widgets li {
  font-size: 0.8rem;
}

.footer-widgets li a {
  text-decoration: none;
  color: inherit;
}

#secondary {
  display: none;
}

/* =========================
   Navigation
========================= */

.main-navigation {
  width: auto;
}

.main-navigation ul {
  position: fixed;
  top: 0;
  right: -100%;
  width: 220px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #000;
  z-index: 150;
  transition: right 0.3s ease;
  padding: 80px 24px 24px;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
}

.main-navigation.toggled ul {
  right: 0;
}

.main-navigation a {
  display: block;
  padding: 12px 0;
  font-size: 0.85rem;
  text-decoration: none;
  color: #000;
}

.c-smallNavTitle {
  display: block;
  font-size: 0.85em;
  margin-top: 4px;
  color: #666;
}

/* =========================
   Hamburger
========================= */

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid #000;
  cursor: pointer;
  padding: 0;
  position: fixed;
  right: 24px;
  z-index: 9999;
}

.menu-toggle__bar {
  position: relative;
  width: 18px;
  height: 18px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle__bar::before,
.menu-toggle__bar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: #000;
  border-radius: 1px;
}

.menu-toggle__bar::before {
  width: 1.5px;
  height: 100%;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease 0s;
}

.menu-toggle__bar::after {
  width: 100%;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar {
  transform: rotate(360deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before {
  opacity: 0;
  transition: opacity 0.15s ease 0.3s;
}