/* ===========================
   基本設定
=========================== */
html {
  font-size: 16px;
  font-family: sans-serif;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ===========================
   投稿リスト（index）用
=========================== */
.event-list { width: 100%; }

/* 投稿1件 */
.event-item {
  padding: 0;
  margin: 2px 0;
  border-bottom: 1px dotted #999;
}

/* PC表示 横一列 */
.pc-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.mobile-row { display: none; }
.pc-row > div { padding: 0 0 3px 0; margin: 0; }

/* PC列幅 + 各列の左右0.5emマージン */
.pc-row .category {
  width: 3ch;
  flex-shrink: 0;
  margin: 0 0.5em;
  text-align: center;
  color: #666;
}
.pc-row .code { width: 4ch; flex-shrink: 0; margin: 0 0.5em; }
.pc-row .opening_date { width: 18ch; flex-shrink: 0; margin: 0 0.5em; }
.pc-row .end_date { width: 8ch; flex-shrink: 0; margin: 0 0.5em 0 0; }
.pc-row .title { flex: 1; margin: 0 0.5em; }
.pc-row .venue { width: 20ch; flex-shrink: 0; margin: 0 0.5em; }

/* 投稿リスト内リンク */
.event-item a {
  color: #0073aa;
  text-decoration: none;
}
.event-item a:hover { text-decoration: underline; }


/* ===========================
   カテゴリーリンク
=========================== */
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.category-links a {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background-color: #f0f0f0;
  color: #0073aa;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}
.category-links a:hover {
  background-color: #0073aa;
  color: #fff;
}



.filter-form label {
  font-weight: normal; /* 任意 */
  margin-right: 0.5em;
}
.filter-form select {
  margin-left: 0.2em;
}

/* ===========================
   シーズン
=========================== */

.filter-form label {
  font-weight: normal; /* 任意 */
  margin-right: 0.5em;
}

/* シーズンセレクトの基本スタイル */
.filter-form select {
  font-size: 1rem; /* PCやタブレットでは16px相当 */
  padding: 0.2em 0.4em;
}

/* スマホでは文字を大きく */
@media screen and (max-width: 600px) {
  .filter-form select {
    font-size: 1.1rem; /* 17.6px相当にアップ */
    padding: 0.3em 0.5em;
  }
}


/* past_eventの背景に色を付ける */
.event-item.past-event {
  background-color: #DDDDDD;
}


/* キャンセルイベント（CXL）もグレー背景に */
.event-item.cxl-event {
  background-color: #DDDDDD;
}


/* CXLイベントのタイトルに取消線 */
.event-item.cxl-event .title a {
  text-decoration: line-through;
  color: #999; /* optional：文字色を薄くする場合 */
}



/* ===========================
   スマホ用 index.php 用
=========================== */
@media screen and (max-width: 600px) {
  /* PC列は非表示 */
  .pc-row { display: none; }
  .mobile-row { display: block; }

  /* イベントごとの上下マージンを広げる */
  .event-item { margin: 4px 0; }

  /* row1: カテゴリ + コード + タイトル 横並び */
  .mobile-row .row1 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 2px;
  }
  .mobile-row .row1 .category {
    width: 3ch;
    flex-shrink: 0;
    text-align: center;
    margin-right: 0.5em;
    color: #666;
  }
  .mobile-row .row1 .code {
    width: 4ch;
    flex-shrink: 0;
    margin-right: 0.5em;
  }
  .mobile-row .row1 .title {
    flex: 1;
    min-width: 0; /* overflow防止 */
  }

  /* row2: 開始日（～最終日） + 会場 横並び */
  .mobile-row .row2 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }
  .mobile-row .row2 .opening_date {
    width: 18ch;
    flex-shrink: 0;
    margin-right: 0.5em;
    white-space: nowrap;
  }
  .mobile-row .row2 .venue { flex: 1; }
}

/* ===========================
   ヘッダーロゴ画像
=========================== */
.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}
@media screen and (max-width: 600px) {
  .site-logo img {
    content: url("http://skiaichi.sub.jp/eventcalendar/wp-content/themes/saa_eventcalendar_theme/backimage_mb.png");
  }
}

/* ===========================
   個別ページ（single.php）用
=========================== */
body.single article h1 {
  font-weight: normal;
  color: #999;
  font-size: 1.15rem;
  text-align: left;
  border-bottom: 1px dotted #333;
  padding-bottom: 0.25rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  position: relative;
}
body.single article h1 a { color: inherit; text-decoration: none; }

/* タイトル前アイコン */
body.single article h1::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url("https://skiaichi.sub.jp/eventcalendar/wp-content/themes/saa_eventcalendar_theme/snowmark.png") no-repeat center center;
  background-size: contain;
  margin-right: 0.5em;
}

/* ---------------------------
   single.php div版表スタイル（PC・スマホ共通）
--------------------------- */
.eventdetail {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1rem;
  }

/* 1行＝ラベル＋値 */
.event-row {
  display: flex;
  flex-wrap: nowrap;
  margin-bottom: 2px;
  padding: 0.4rem 0.2em;
}

/* ラベルは全角5文字分（約5em）固定 */
.event-row .label {
  width: 5em;
  font-weight: normal;
  color: #333333;
  text-align: left;
  margin: 0 0.5em;
  flex-shrink: 0;
}

/* 値は残り全部 */
.event-row .value {
  flex: 1;
  color: #000000;
  text-align: left;
  margin: 0 0.5em;
  word-break: break-word;
}

.event-row .value a {
  color: #0073aa;
  text-decoration: none;
}

.event-row .value a:hover { text-decoration: underline; }

/* eventdetail 内の行を一行おきに背景色 */
.eventdetail .event-row:nth-child(odd) { background-color: #EFEFEF; }
.eventdetail .event-row:nth-child(even) { background-color: #FFFFFF; }

/* ===========================
   フッター コピーライト
=========================== */
.site-footer {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid #ccc;
  background-color: #f9f9f9;
}
.site-footer p { margin: 0; line-height: 1.2; }

/* ===========================
   戻るボタン（single.php）
=========================== */
.back-button-container { margin: 1rem 0; text-align: left; }
.back-button {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}
.back-button:hover { background-color: #005177; }
