/* 記事ドメイン「サケウル」のヘッダー・フッター・TOP の CSS。#536
 *
 * 読み込むのは .net の全ページ（functions.php の add_custom_scripts()）。
 * ヘッダー・フッター（設計書 4-1）と TOP の3ブロック（設計書 3章）だけを受け持つ。
 * 既存の style.css（買取サイトの見た目）はそのまま残し、ここのクラス名で上書きする。
 * 色はテーマで使っているものに合わせる（#181818・#7c7266・#f7f8f8）。
 */

/* ------------------------------------------------------------------
 * ヘッダー（設計書 4-1）
 * テーマの .header は position: fixed だが、このヘッダーには .header を付けない。
 * 念のため position を明示する（固定ヘッダーのぶんの余白は要らない）。
 * ------------------------------------------------------------------ */
.sakeuru-header {
  background-color: #fff;
  border-bottom: 1px solid #e6e2dc;
  position: relative;
  width: 100%;
  z-index: 10;
}

.sakeuru-header__inner {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 12px;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1100px;
  padding: 12px 20px;
}

.sakeuru-header__logo {
  color: #181818;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: none;
}

.sakeuru-header__cta {
  background-color: #181818;
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 10px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.sakeuru-header__cta:hover {
  opacity: 0.8;
}

/* ------------------------------------------------------------------
 * フッター（設計書 4-1）
 * ------------------------------------------------------------------ */
.sakeuru-footer {
  background-color: #f7f8f8;
  border-top: 1px solid #e6e2dc;
  padding: 24px 20px;
  text-align: center;
  width: 100%;
}

.sakeuru-footer__inner {
  margin: 0 auto;
  max-width: 1100px;
}

.sakeuru-footer__links {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px 24px;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sakeuru-footer__link {
  font-size: 0.8125rem;
}

.sakeuru-footer__link a {
  color: #181818;
  text-decoration: none;
}

.sakeuru-footer__link a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------
 * TOP（設計書 3章）
 * ------------------------------------------------------------------ */
.sakeuru-top {
  background-color: #fff;
  text-align: left;
  width: 100%;
}

.sakeuru-top-hero {
  background-color: #f7f8f8;
  border-bottom: 1px solid #e6e2dc;
  padding: 56px 20px;
}

.sakeuru-top-hero__inner,
.sakeuru-top-list__inner,
.sakeuru-top-about__inner {
  margin: 0 auto;
  max-width: 1100px;
}

.sakeuru-top-hero__title {
  color: #181818;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.sakeuru-top-hero__lead {
  color: #181818;
  font-size: 0.9375rem;
  line-height: 1.9;
  margin-top: 20px;
  max-width: 900px;
}

.sakeuru-top-hero__cta-wrap {
  margin-top: 28px;
}

.sakeuru-top-hero__cta {
  background-color: #181818;
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 14px 28px;
  text-decoration: none;
}

.sakeuru-top-hero__cta:hover {
  opacity: 0.8;
}

/* 新着記事 */
.sakeuru-top-list {
  padding: 48px 20px;
}

.sakeuru-top-list__title,
.sakeuru-top-about__title {
  color: #181818;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.sakeuru-top-list__title::after {
  background-color: #7c7266;
  content: "";
  display: block;
  height: 2px;
  margin: 14px auto 0;
  width: 48px;
}

.sakeuru-cards {
  display: -ms-grid;
  display: grid;
  gap: 24px 20px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.sakeuru-cards__item {
  margin: 0;
}

.sakeuru-cards__link {
  border: 1px solid #e6e2dc;
  border-radius: 8px;
  color: #181818;
  display: block;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
}

.sakeuru-cards__link:hover .sakeuru-cards__title {
  text-decoration: underline;
}

.sakeuru-cards__link img {
  -webkit-box-shadow: none;
  box-shadow: none;
  display: block;
  height: auto;
  width: 100%;
}

.sakeuru-cards .wp-post-image,
.sakeuru-cards__img {
  aspect-ratio: 3 / 2;
  -o-object-fit: cover;
  object-fit: cover;
}

.sakeuru-cards__date {
  color: #7c7266;
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 14px 14px 0;
}

.sakeuru-cards__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  padding: 6px 14px 16px;
}

/* ページ送り（/page/2/ …）。リンクは WordPress の paginate_links の出力。 */
.sakeuru-pagination {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin-top: 40px;
  text-align: center;
}

.sakeuru-pagination .page-numbers {
  border: 1px solid #d9d3c9;
  border-radius: 999px;
  color: #181818;
  display: inline-block;
  font-size: 0.875rem;
  line-height: 38px;
  min-width: 40px;
  padding: 0 10px;
  text-decoration: none;
}

.sakeuru-pagination .page-numbers.current {
  background-color: #181818;
  border-color: #181818;
  color: #fff;
}

.sakeuru-pagination .page-numbers.dots {
  border-color: transparent;
}

/* テーマの style.css には、スライダーの矢印として .next::before / .prev::before がある
 * （content: ""; position: absolute; height: 3.75rem など）。paginate_links の
 * 「次へ」「前へ」も class="next page-numbers" / "prev page-numbers" を付けるため、
 * その矢印がページ送りにも出て、SP 390px で横に 12px はみ出していた（#536 の修正1）。
 * ページ送りでは疑似要素を出さない（矢印の文字は paginate_links のものを使う）。 */
.sakeuru-pagination .next::before,
.sakeuru-pagination .prev::before {
  content: none;
}

/* 運営者情報 */
.sakeuru-top-about {
  background-color: #f7f8f8;
  border-top: 1px solid #e6e2dc;
  padding: 48px 20px;
}

.sakeuru-top-about__text {
  color: #181818;
  font-size: 0.9375rem;
  line-height: 1.9;
  margin-top: 24px;
  text-align: center;
}

.sakeuru-top-about__text a {
  color: #181818;
  text-decoration: underline;
}

/* ------------------------------------------------------------------
 * 幅の広い画面
 * ------------------------------------------------------------------ */
@media screen and (min-width: 600px) {
  .sakeuru-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 960px) {
  .sakeuru-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .sakeuru-top-hero {
    padding: 72px 20px;
  }

  .sakeuru-top-hero__title {
    font-size: 2.5rem;
  }
}

/* ------------------------------------------------------------------
 * 幅の狭い画面（スマートフォン）
 * ------------------------------------------------------------------ */
@media screen and (max-width: 767px) {
  .sakeuru-header__inner {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 10px 16px;
    row-gap: 10px;
  }

  .sakeuru-header__logo {
    font-size: 0.9375rem;
  }

  .sakeuru-header__cta {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .sakeuru-top-hero {
    padding: 36px 16px;
  }

  .sakeuru-top-hero__title {
    font-size: 1.375rem;
  }

  .sakeuru-top-hero__lead {
    font-size: 0.875rem;
    margin-top: 16px;
  }

  .sakeuru-top-hero__cta {
    font-size: 0.875rem;
    padding: 12px 20px;
  }

  .sakeuru-top-list,
  .sakeuru-top-about {
    padding: 36px 16px;
  }

  .sakeuru-top-list__title,
  .sakeuru-top-about__title {
    font-size: 1.125rem;
  }

  .sakeuru-cards {
    margin-top: 28px;
  }

  .sakeuru-footer {
    padding: 20px 16px;
  }

  .sakeuru-footer__links {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 10px;
  }
}
