/*
Theme Name: ごめしのひとり飯手帖
Theme URI: https://standup1987.com
Author: ごめし
Description: ひとりでも、ふらっと入れる飲食店を記録するブログ
Version: 1.0.2
License: GNU General Public License v2 or later
Text Domain: gomeishi
*/

/* ===========================
   Google Fonts
=========================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500&display=swap');

/* ===========================
   Base
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  line-height: 1.8;
  color: #1a1a1a;
  background: #f7f7f5;
}

a {
  color: #1a1a1a;
  text-decoration: none;
}

a:hover {
  opacity: 0.6;
}

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

/* ===========================
   Header
=========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e6;
  width: 100%;
}

.site-title-area {
  padding: 20px 24px 4px;
}

.site-name a {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.site-catch-area {
  padding: 4px 24px 14px;
  border-bottom: 1px solid #e8e8e6;
}

.site-description {
  font-size: 12px;
  color: #999;
}

.site-nav {
  padding: 10px 24px;
  background: #1a1a1a;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.header-menu-list {
  list-style: none;
  display: flex;
  gap: 20px;
}

.header-menu-list a {
  font-size: 13px;
  color: #ccc;
}

.header-menu-list a:hover {
  color: #fff;
  opacity: 1;
}

/* ===========================
   Main
=========================== */
.site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ===========================
   Footer
=========================== */
.site-footer {
  background: #fff;
  border-top: 1px solid #e8e8e6;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}

.footer-menu-list {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-menu-list a {
  font-size: 12px;
  color: #999;
}

.copyright {
  font-size: 12px;
  color: #bbb;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 768px) {

  .site-title-area {
    padding: 16px 16px 4px;
  }

  .site-catch-area {
    padding: 4px 16px 12px;
  }

  .site-nav {
    padding: 10px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-main {
    padding: 24px 16px;
  }

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

/* ===========================
   固定ページ（page.php）
=========================== */
.page-container {
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e6;
}

.page-title {
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
}

.page-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.page-body h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e8e6;
}

.page-body h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.page-body p {
  margin-bottom: 20px;
}

.page-body a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-body ul,
.page-body ol {
  margin: 0 0 20px 20px;
}

.page-body li {
  margin-bottom: 6px;
}

/* ===========================
   記事ページ（single.php）
=========================== */
.single-container {
  max-width: 760px;
  margin: 0 auto;
}

.single-article {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
}

/* メタ情報 */
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.post-cat {
  font-size: 11px;
  padding: 2px 10px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 2px;
}

.post-area {
  font-size: 12px;
  color: #999;
}

.post-date {
  font-size: 12px;
  color: #bbb;
  margin-left: auto;
}

/* 記事タイトル */
.post-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  color: #1a1a1a;
  margin-bottom: 24px;
}

/* 本文エリア */
.post-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.post-body h2 {
  font-size: 18px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e6;
}

.post-body h3 {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 28px 0 12px;
  padding-left: 10px;
  border-left: 2px solid #1a1a1a;
}

.post-body p {
  margin-bottom: 20px;
}

/* 画像：横ver（700×394） */
.post-body figure,
.post-body img {
  display: block;
  margin: 0 auto 20px;
  border-radius: 6px;
}

.post-body .img-landscape {
  max-width: 700px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

/* 画像：縦ver（500×auto） */
.post-body .img-portrait {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

/* Gutenbergのfigureに対応 */
.post-body .wp-block-image {
  margin: 0 auto 20px;
}

.post-body .wp-block-image.size-landscape {
  max-width: 700px;
}

.post-body .wp-block-image.size-portrait {
  max-width: 500px;
}

.post-body .wp-block-image img {
  border-radius: 6px;
}

/* お店情報 */
.shop-info {
  background: #f7f7f5;
  border-radius: 8px;
  padding: 20px;
  margin-top: 32px;
}

.shop-info-title {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.shop-info-table {
  width: 100%;
  border-collapse: collapse;
}

.shop-info-table tr {
  border-bottom: 1px solid #e8e8e6;
}

.shop-info-table tr:last-child {
  border-bottom: none;
}

.shop-info-table th {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  padding: 8px 0;
  width: 90px;
  vertical-align: top;
  text-align: left;
  white-space: nowrap;
}

.shop-info-table td {
  font-size: 13px;
  color: #1a1a1a;
  padding: 8px 0;
  line-height: 1.7;
}

/* タグ */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.post-tag {
  font-size: 12px;
  color: #666;
  padding: 4px 12px;
  border: 1px solid #e8e8e6;
  border-radius: 2px;
}

.post-tag:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  opacity: 1;
}

/* 前後ナビ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.post-nav-prev,
.post-nav-next {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-nav-next {
  text-align: right;
}

.post-nav-label {
  font-size: 11px;
  color: #999;
}

.post-nav-title {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.5;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .single-article {
    padding: 20px 16px;
  }

  .post-title {
    font-size: 18px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    text-align: left;
  }
}

/* ===========================
   アーカイブ・カードグリッド共通
=========================== */

/* アーカイブヘッダー */
.archive-header {
  margin-bottom: 24px;
}

.archive-title {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
}

.archive-desc {
  font-size: 13px;
  color: #999;
  margin-top: 6px;
}

/* カードグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

/* カード */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e6;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  opacity: 0.75;
}

/* サムネイル */
.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e8e6;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e8e6;
}

/* カテゴリタグ */
.card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 8px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 2px;
}

/* カード本文 */
.card-body {
  padding: 12px 14px;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.5;
  margin-bottom: 8px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-area {
  font-size: 11px;
  color: #999;
}

.card-date {
  font-size: 11px;
  color: #bbb;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.pagination ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

.pagination ul li a,
.pagination ul li span {
  display: block;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid #e8e8e6;
  border-radius: 4px;
  color: #666;
  background: #fff;
}

.pagination ul li .current {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* 記事なし */
.no-posts {
  font-size: 14px;
  color: #999;
  text-align: center;
  padding: 40px 0;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===========================
   ジャンル・都道府県リンク
=========================== */
.index-links {
  margin-bottom: 28px;
}

.index-links-label {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.index-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.index-links-list a {
  font-size: 12px;
  color: #666;
  padding: 4px 12px;
  border: 1px solid #e8e8e6;
  border-radius: 2px;
  background: #fff;
}

.index-links-list a:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  opacity: 1;
}

/* ===========================
   ブロックパターン用
=========================== */

/* ごちそうさまでした */
.gochisou-text {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  text-align: left !important;
  margin-bottom: 16px;
}

/* 画像サイズクラス（Gutenbergブロック用） */
.wp-block-image.size-landscape {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-image.size-landscape img {
  width: 100%;
  height: auto;
}

.wp-block-image.size-portrait {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-image.size-portrait img {
  width: 100%;
  height: auto;
}

/* ===========================
   地域グループ
=========================== */
.index-links-group {
  margin-bottom: 28px;
}

.area-group {
  margin-bottom: 16px;
}

.area-group-name {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 8px;
}

/* ===========================
   アイキャッチなしプレースホルダー
=========================== */
.card-no-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}

/* ===========================
   ページネーション：スマホは省略表示
=========================== */
@media (max-width: 768px) {
  .pagination ul li.page-item-dots ~ li:not(:last-child),
  .pagination ul li a[aria-label] {
    display: none;
  }
}
