﻿/* ========================================
   全体
======================================== */

.event-wrap {
  display: grid;

  /*
   1カードにつき最低280pxを確保。
   2枚並べられる幅があれば2列、
   足りなければ自動的に1列に切り替える。
  */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  gap: 20px;
  width: 100%;
  margin: 20px 0;
  box-sizing: border-box;
}


/* ========================================
   カード
======================================== */

.event-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}


/* 施設見学会 */

.event-card.tour {
  border-top: 6px solid #1677A8;
}


/* コース体験会 */

.event-card.trial {
  border-top: 6px solid #F47A3B;
}


/* ========================================
   カード内の文字
======================================== */

.event-card h3 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  font-weight: bold;
}

.event-time {
  margin-bottom: 10px;
  color: #153B5B;
  font-weight: bold;
}

.event-badge {
  display: inline-block;
  margin-bottom: 15px;
  padding: 6px 14px;
  color: #fff;
  font-weight: bold;
  border-radius: 999px;
}

.event-badge.free {
  background: #DA2628;
}

.event-badge.reserve {
  background: #F47A3B;
}

.event-lead {
  margin-bottom: 15px;
  font-weight: bold;
}

.event-card ul {
  margin: 0 0 15px;
  padding-left: 20px;
}

.event-card li {
  margin-bottom: 6px;
}

.event-note {
  color: #666;
  font-size: 0.9rem;
}


/* ========================================
   ボタン
======================================== */

.event-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.event-btn {
  display: inline-block;
  box-sizing: border-box;
  padding: 10px 18px;
  color: #fff !important;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
  text-decoration: none !important;
  background: #153B5B;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

.event-btn:hover,
.event-btn:focus {
  color: #fff !important;
  text-decoration: none !important;
  opacity: 0.85;
}


/* 予約するボタン */

.reservation-btn {
  background: #F47A3B;
}


/* ========================================
   幅が狭い場合
======================================== */

@media screen and (max-width: 600px) {
  .event-card {
    padding: 20px;
  }

  .event-buttons {
    flex-direction: column;
  }

  .event-btn {
    width: 100%;
  }
}

/* ========================================
   サイト共通の背景色切替対応
   黒背景: #wrap.bg_black
   青背景: #wrap.bg_blue
   共通JavaScript・共通CSSは変更しない。
======================================== */

/* 黒背景モード */
#wrap.bg_black .event-wrap .event-card {
  color: #ffffff !important;
  background: #101b21 !important;
  border-right-color: #8fa8b4 !important;
  border-bottom-color: #8fa8b4 !important;
  border-left-color: #8fa8b4 !important;
  box-shadow: 0 3px 12px rgba(255, 255, 255, 0.14) !important;
}

/* 青背景モード */
#wrap.bg_blue .event-wrap .event-card {
  color: #ffffff !important;
  background: #0b3550 !important;
  border-right-color: #9fc4d8 !important;
  border-bottom-color: #9fc4d8 !important;
  border-left-color: #9fc4d8 !important;
  box-shadow: 0 3px 12px rgba(255, 255, 255, 0.14) !important;
}

/* カード内の見出し・本文・一覧を明示的に高コントラスト化 */
#wrap.bg_black .event-wrap .event-card h3,
#wrap.bg_black .event-wrap .event-card .event-time,
#wrap.bg_black .event-wrap .event-card .event-lead,
#wrap.bg_black .event-wrap .event-card ul,
#wrap.bg_black .event-wrap .event-card li,
#wrap.bg_blue .event-wrap .event-card h3,
#wrap.bg_blue .event-wrap .event-card .event-time,
#wrap.bg_blue .event-wrap .event-card .event-lead,
#wrap.bg_blue .event-wrap .event-card ul,
#wrap.bg_blue .event-wrap .event-card li {
  color: #ffffff !important;
}

/* 補足文が追加された場合も読みやすさを確保 */
#wrap.bg_black .event-wrap .event-note {
  color: #d9e6ec !important;
}
#wrap.bg_blue .event-wrap .event-note {
  color: #e0edf4 !important;
}

/* 種別を示す上辺とバッジの色は維持し、文字を白に固定 */
#wrap.bg_black .event-wrap .event-card.tour,
#wrap.bg_blue .event-wrap .event-card.tour {
  border-top-color: #56c7ff !important;
}
#wrap.bg_black .event-wrap .event-card.trial,
#wrap.bg_blue .event-wrap .event-card.trial {
  border-top-color: #ff9a5c !important;
}
#wrap.bg_black .event-wrap .event-badge,
#wrap.bg_blue .event-wrap .event-badge {
  color: #ffffff !important;
}

/* ボタンは共通CSSによる色変更を受けないように固定 */
#wrap.bg_black .event-wrap .event-btn,
#wrap.bg_black .event-wrap .event-btn:hover,
#wrap.bg_black .event-wrap .event-btn:focus,
#wrap.bg_blue .event-wrap .event-btn,
#wrap.bg_blue .event-wrap .event-btn:hover,
#wrap.bg_blue .event-wrap .event-btn:focus {
  color: #ffffff !important;
  background: #153b5b !important;
  text-decoration: none !important;
}
#wrap.bg_black .event-wrap .reservation-btn,
#wrap.bg_black .event-wrap .reservation-btn:hover,
#wrap.bg_black .event-wrap .reservation-btn:focus,
#wrap.bg_blue .event-wrap .reservation-btn,
#wrap.bg_blue .event-wrap .reservation-btn:hover,
#wrap.bg_blue .event-wrap .reservation-btn:focus {
  color: #071015 !important;
  background: #ff9a5c !important;
}

