/* ============================================
   Callum & Sally — Hugo Site Stylesheet
   カラー: ラベンダー × コーンフラワーブルー
   フォント: Cormorant Garamond / Playfair Display / Lato / BIZ UDPGothic / Source Serif 4
   ============================================ */

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

/* --- Variables --- */
:root {
  --bg-main: #f0ecf6;
  --bg-nav: #dfd9ee;
  --bg-card: #ffffff;
  --bg-post-header: #f5f2fa;
  --text-heading: #33305a;
  --text-body: rgba(26, 1, 1, 0.9);
  --text-accent: #7b74b0;
  --text-muted: #6a6490;
  --border-light: #e0dae8;
  --overlay-dark: rgba(51, 48, 90, 0.7);
  --card-placeholder: linear-gradient(135deg, #8b7dbd, #6a8ccc);
}

/* --- Base Typography --- */
body {
  font-family: 'Lato', 'BIZ UDPGothic', sans-serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-body);
  background: var(--bg-main);
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Source Serif 4', serif;
  color: var(--text-heading);
  font-weight: 400;
  line-height: 1.4;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-heading);
}

/* ============================================
   HEADER — ロゴ中央 + ナビ下配置
   ============================================ */
.site-header {
  text-align: center;
  padding: 1.5rem 0 0;
  background: var(--bg-main);
}

.header-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.site-logo img {
  max-height: 180px;
  width: auto;
}

/* ナビゲーション */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.8rem;
  padding: 0.8rem 1.5rem;
  background: var(--bg-nav);
  font-family: 'Playfair Display', serif;
  font-size: 1.06rem;
}

.site-nav > a,
.nav-dropdown-toggle {
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.2s;
  font-family: 'Playfair Display', serif;
  font-size: 1.06rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ドロップダウン */
.nav-dropdown {
  position: relative;
}

.nav-arrow {
  font-size: 0.7em;
  margin-left: 2px;
  opacity: 0.6;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(51, 48, 90, 0.12);
  padding: 0.8rem 0 0.5rem;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.2rem;
  color: var(--text-heading);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-post-header);
  color: var(--text-accent);
}

.site-nav > a:hover,
.site-nav > a.active,
.nav-dropdown-toggle:hover {
  color: var(--text-accent);
}

/* 言語切り替え */
.language-switcher {
  display: inline;
}

.lang-switch-btn {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-heading);
}

/* ============================================
   CAROUSEL — 最新記事スライダー
   ============================================ */
.carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem 1rem;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  gap: 12px;
}

.carousel-card {
  display: block;
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
}

.carousel-card-large {
  flex: 3;
  height: 420px;
}

.carousel-card-small {
  flex: 2;
  height: 420px;
}

.carousel-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.8rem;
  background: linear-gradient(to bottom, transparent 0%, var(--overlay-dark) 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 0.3s;
}

.carousel-card:hover .carousel-card-overlay {
  background: linear-gradient(to bottom, transparent 0%, rgba(51, 48, 90, 0.85) 100%);
}

.carousel-card .post-card-title {
  font-size: 1.5rem;
}

.carousel-card-small .post-card-title {
  font-size: 1.2rem;
}

/* 矢印ボタン */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-heading);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(51, 48, 90, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(51, 48, 90, 0.25);
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem;
}

/* ドットインジケーター */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1rem 0 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.carousel-dot.active {
  background: var(--text-accent);
  transform: scale(1.3);
}

.carousel-dot:hover {
  background: var(--text-muted);
}

/* ============================================
   HOME — カードグリッド（2列・不揃い）
   ============================================ */
.post-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2.5rem 2rem;
  column-count: 2;
  column-gap: 12px;
}

.post-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}

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

.post-card-image {
  position: relative;
  background-size: cover;
  background-position: center;
}

/* 不揃いな高さ — 4つのパターンで繰り返し */
.post-card:nth-child(4n+1) .post-card-image { height: 310px; }
.post-card:nth-child(4n+2) .post-card-image { height: 230px; }
.post-card:nth-child(4n+3) .post-card-image { height: 270px; }
.post-card:nth-child(4n+4) .post-card-image { height: 340px; }

.post-card-no-image {
  background: var(--card-placeholder);
}

.post-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to bottom, transparent 0%, var(--overlay-dark) 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 0.3s;
}

.post-card:hover .post-card-overlay {
  background: linear-gradient(to bottom, transparent 0%, rgba(51, 48, 90, 0.85) 100%);
}

.post-card-category {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.post-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.4;
}

.post-card-title a {
  color: #ffffff;
  text-decoration: none;
}

.post-card-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* ============================================
   SINGLE POST — 記事ページ
   ============================================ */
.post-single {
  max-width: 100%;
}

/* --- 記事ヘッダー: 薄い背景色 + 中央揃え --- */
.post-header {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  background: var(--bg-post-header);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0;
}

.post-category-label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: 0.8rem;
}

.post-header h1 {
  font-size: 2.4rem;
  margin: 0 auto 0.8rem;
  max-width: 720px;
}

.post-date {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.post-categories {
  margin-bottom: 0.8rem;
}

.translation-link {
  margin-top: 1rem;
}

.translation-link a {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--text-accent);
  border: 1px solid var(--border-light);
  padding: 0.3rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.translation-link a:hover {
  background: var(--text-accent);
  color: #ffffff;
}

/* --- アイキャッチ画像 --- */
.post-featured-image {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1rem 0;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* --- 本文 --- */
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-size: 1.05rem;
  line-height: 1.95;
}

.post-content p {
  margin-bottom: 1.6rem;
}

.post-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

.post-content h3 {
  font-size: 1.75rem;
  margin: 2rem 0 0.8rem;
  font-weight: bold;
}

.post-content h4 {
  font-family: 'Cormorant Garamond', 'Source Serif 4', serif;
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--text-heading);
  margin: 2rem 0 0.8rem;
}

.post-content blockquote {
  border-left: 3px solid var(--text-accent);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--bg-post-header);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-muted);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.post-content a {
  color: var(--text-accent);
  text-decoration: underline;
  text-decoration-color: rgba(123, 116, 176, 0.3);
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-color: var(--text-accent);
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content strong {
  font-weight: 700;
  color: var(--text-heading);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-light);
  text-align: left;
}

.post-content th {
  background: var(--bg-post-header);
  font-weight: 600;
  color: var(--text-heading);
}

/* --- 前後の記事ナビ --- */
.post-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
}

.post-nav-prev,
.post-nav-next {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 45%;
}

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

.post-nav-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.post-nav-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text-accent);
  line-height: 1.4;
}

.post-nav-prev:hover .post-nav-title,
.post-nav-next:hover .post-nav-title {
  color: var(--text-heading);
}

/* ============================================
   CATEGORY LIST — カテゴリページ
   ============================================ */
.post-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.post-list h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* ============================================
   PAGES — 固定ページ
   ============================================ */
.page-header {
  text-align: center;
  padding: 2rem 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}
.footer-nav {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-nav a:not(:last-child)::after {
  content: " |";
  color: var(--border-light);
  margin-left: 0.3rem;
}

.footer-nav a:hover {
  color: var(--text-accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .site-logo img {
    max-height: 120px;
  }

  .site-nav {
    gap: 1rem;
    font-size: 0.92rem;
    padding: 0.6rem 1rem;
  }

  /* カルーセル: スマホでは1枚表示 */
  .carousel {
    padding: 1rem 1rem 0.5rem;
  }

  .carousel-slide {
    flex-direction: column;
  }

  .carousel-card-large,
  .carousel-card-small {
    flex: none;
    height: 240px;
  }

  .carousel-card-small {
    display: none;
  }

  .carousel-card .post-card-title {
    font-size: 1.2rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .carousel-prev { left: 0.3rem; }
  .carousel-next { right: 0.3rem; }

  /* グリッド: スマホでは1列 */
  .post-grid {
    column-count: 1;
    padding: 0.5rem 1rem 2rem;
  }

  .post-card:nth-child(n) .post-card-image {
    height: 250px;
  }

  .post-header {
    padding: 2rem 1rem;
  }

  .post-header h1 {
    font-size: 1.7rem;
  }

  .post-content {
    padding: 1.5rem 1rem 2rem;
    font-size: 1rem;
  }

  .post-nav {
    flex-direction: column;
    padding: 1.5rem 1rem 2rem;
  }

  .post-nav-prev,
  .post-nav-next {
    max-width: 100%;
    text-align: left;
  }
}

.post-content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.post-content figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

.post-content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.speech strong {
  color: inherit;
}
.speech {
  margin-bottom: 1.5em;
}

.speech a {
  color: #7b74b0;
}

.speech.own blockquote {
  color: inherit;
}

a.footnote-ref {
  color: #7b74b0;
  text-decoration: none;
}

.footnotes li {
  padding-left: 0.5em;
}

.footnotes li p {
  margin: 0.3em 0;
}

.footnotes {
  font-size: 0.9em;
}

blockquote p:first-child {
  margin-top: 0;
}
blockquote p:last-child {
  margin-bottom: 0;
}