/*
Theme Name: PCHM Club Theme Media
Theme URI: https://pchple.jp/
Author: Masaki Takaoka
Description: Porsche Club公式寄せレイアウト + Report/News/Blog/Schedule用クラブメディアテーマ
Version: 1.4
Text Domain: pchm-club-theme
*/

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #222;
  background-color: #ffffff;
}

:root {
  --pchm-red: #c1272d;
  --pchm-border: #e5e5e5;
  --pchm-text-muted: #777777;
}

/* ===============================
   Layout base
   =============================== */

.pcos-main {
  padding-bottom: 60px;
}

.pchm-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ===============================
   Header (PCJ official style)
   =============================== */

.pcos-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.pcos-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px 10px;
}

.pcos-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.pcos-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.pcos-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.pcos-logo-main {
  display: block;
  height: 52px;
  width: auto;
}

.pcos-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pcos-utility-nav {
  display: flex;
  align-items: center;
}

.pcos-utility-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
}

.pcos-utility-menu li {
  display: flex;
  align-items: center;
}

.pcos-utility-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 400;
}

.pcos-utility-menu a:hover {
  color: #000;
}
/* 右側：ユーティリティ + サブロゴを横並び */
.pcos-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* サブロゴ（右側） */
.pcos-sublogo img {
  display: block;
  height: 64px;   /* 好きなサイズに調整OK */
  width: auto;
}
@media (max-width: 768px) {
  .pcos-sublogo img {
    height: 44px;
  }
}

/* 下段グローバルナビ */

.pcos-header-bottom {
  margin-top: 10px;
  padding-bottom: 8px;
}

.pcos-global-nav {
  display: flex;
  justify-content: center;
}

.pcos-global-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
  font-size: 0.9rem;
}

.pcos-global-menu li {
  position: relative;
}

.pcos-global-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 400;
  letter-spacing: 0.06em;
  padding-bottom: 4px;
}

/* メニュー：現在ページは赤ライン */

.pcos-global-menu a:hover,
.pcos-global-menu .current-menu-item > a,
.pcos-global-menu .current_page_item > a {
  color: #000;
  border-bottom: 2px solid var(--pchm-red);
}

@media (max-width: 768px) {

  /* ロゴエリアの下に赤ライン＋中央寄せ */
  .pcos-header-bottom {
    border-top: 2px solid var(--pchm-red);
    padding-top: 6px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* ハンバーガーボタンを中央に表示 */
  .pcos-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0 6px;
  }

  .pcos-menu-toggle-bar {
    width: 30px;
    height: 3px;
    background-color: var(--pchm-red);
    margin: 4px 0;
    transition: 0.25s ease;
    border-radius: 2px;
  }

  /* 開いたときの「×」変形 */
  .pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }


  /* ナビ全体 */
  .pcos-global-nav {
    width: 100%;
  }

  /* メニュー本体：デフォルト非表示（開いたら縦並び） */
  .pcos-global-menu {
    display: none;              /* PCの横並び設定をここで上書き */
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 6px;
    padding: 0;
    list-style: none;
    text-align: center;
  }

  .pcos-global-menu li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .pcos-global-menu li:last-child {
    border-bottom: none;
  }

  .pcos-global-menu a {
    display: block;
    padding: 6px 0;
    font-size: 0.95rem;
    color: #333;
    text-decoration: none;
    border-bottom: none;
  }

  /* ハンバーガー開いた時に .is-open を付けて表示 */
  .pcos-global-menu.is-open {
    display: flex;
  }

  /* 現在ページの装飾（赤強調） */
  .pcos-global-menu li.current-menu-item a,
  .pcos-global-menu li.current_page_item a {
    color: var(--pchm-red);
    font-weight: 600;
  }
}


/* ===============================
   ハンバーガーメニュー（共通）
   =============================== */
.pcos-menu-toggle {
  background: none;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
}

/* ← ここを赤に統一（すでにある var(--pchm-red) を使う） */
.pcos-menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: var(--pchm-red);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 開いたとき「×」に変形 */
.pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(2) {
  opacity: 0;
}
.pcos-menu-toggle.is-open .pcos-menu-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* PCではハンバーガーは非表示（スマホだけ表示） */
@media (min-width: 769px) {
  .pcos-menu-toggle {
    display: none;
  }
}

/* ===============================
   Hero：PCJ公式寄せカルーセル（全幅＋角丸）
   =============================== */

.pcos-hero {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.pcos-hero-carousel {
  position: relative;
  width: 100%;
  height: 560px;         /* PC用の高さ */
  border-radius: 10px;
  overflow: hidden;
}

.pcos-hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.pcos-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.pcos-hero-slide.is-active {
  opacity: 1;
}

.pcos-hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px; /* 角丸もここで指定 */
}

/* Hero オーバーレイ */

.pcos-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pcos-hero-title {
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  font-weight: 600;
  text-align: center;
}

/* Hero ドットナビ */

.pcos-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: auto;
}

.pcos-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: rgba(0,0,0,0.25);
  padding: 0;
  cursor: pointer;
}

.pcos-hero-dot.is-active {
  background: #fff;
}

/* スマホ時 Hero */

@media (max-width: 768px) {
  .pcos-hero {
    padding: 16px 16px 0;
  }

  .pcos-hero-carousel {
    height: 260px;
    border-radius: 8px;
  }

  .pcos-hero-title {
    font-size: 1.4rem;
    padding: 0 12px;
  }
}

/* ===============================
   Top: Intro + News
   =============================== */

.pcos-intro {
  margin: 24px 0 32px;
}

.pcos-intro-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.pcos-intro-inner h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 600;
}

.pcos-intro-inner p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
}

.pcos-news {
  margin-bottom: 56px;
}

.pcos-news-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===============================
   Top: Section Heading (News / Report)
   =============================== */

/* 見出し本体 */
.pcos-section-heading {
  position: relative;
  margin: 0 0 20px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* 小さなサブラベル（JPなど） */
.pcos-section-heading span {
  font-size: 0.78rem;
  color: var(--pchm-text-muted);
  margin-left: 8px;
  letter-spacing: 0.18em;
}

/* 下に赤いライン */
.pcos-section-heading::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background-color: var(--pchm-red);
  margin-top: 6px;
}

/* 既存との互換：News / Report の旧クラスに適用しておく */
.pcos-news-title {
  /* 互換用：クラス名はそのままでも、装飾は共通クラスで */
}

.pcos-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pcos-news-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

.pcos-news-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.pcos-news-thumb img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.pcos-news-card-body {
  padding: 12px 14px 14px;
}

.pcos-news-date {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--pchm-text-muted);
}

.pcos-news-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .pcos-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pcos-news-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Archive / Category / Blog / Report / News
   =============================== */

.pchm-archive-header {
  text-align: center;
  margin-bottom: 32px;
}

.pchm-archive-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pchm-archive-line {
  display: inline-block;
  width: 160px;
  height: 2px;
  background-color: var(--pchm-red);
}

.pchm-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pchm-archive-card {
  border: 1px solid var(--pchm-border);
  border-radius: 6px;
  background-color: #fff;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pchm-archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pchm-archive-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.pchm-archive-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.pchm-archive-body {
  padding: 12px 16px 16px;
}

.pchm-archive-date {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--pchm-text-muted);
}

.pchm-archive-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* Archiveレスポンシブ */

@media (max-width: 980px) {
  .pchm-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pchm-archive-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Single
   =============================== */

.pchm-single {
  max-width: 900px;
  margin: 0 auto 64px;
}

.pchm-single-header {
  text-align: center;
  margin-bottom: 24px;
}

.pchm-single-date {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--pchm-text-muted);
}

.pchm-single-title {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pchm-single-title-line {
  display: inline-block;
  width: 120px;
  height: 2px;
  background-color: var(--pchm-red);
}

.pchm-single-content {
  font-size: 0.96rem;
  line-height: 2;
}

.pchm-single-content img {
  max-width: 100%;
  height: auto;
}

.pchm-single-footer {
  margin-top: 32px;
  font-size: 0.9rem;
}

/* ===============================
   Page
   =============================== */

.pchm-page-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.96rem;
  line-height: 2;
}

/* ===============================
   Pagination
   =============================== */

.pchm-pagination {
  margin-top: 32px;
  text-align: center;
}

.pchm-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  text-decoration: none;
  color: #444;
}

.pchm-pagination .page-numbers.current {
  background-color: var(--pchm-red);
  color: #fff;
  border-color: var(--pchm-red);
}

.pchm-pagination .page-numbers:hover:not(.current) {
  border-color: var(--pchm-border);
}

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

.site-footer {
  background-color: #111;
  color: #ddd;
  padding: 18px 24px;
  font-size: 0.8rem;
  width: 100%;
}

.site-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

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

.site-footer-menu {
  font-size: 0.85rem;
}

.site-footer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #ddd;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Footer responsive */

@media (max-width: 768px) {
  .site-footer {
    padding: 16px;
  }
}
