/* =========================================================
   イベント一覧
========================================================= */

.eventList {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

.eventList__title {
  margin-bottom: 60px;

  color: var(--text);

  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* -------------------------------------
   月切り替え
-------------------------------------- */

.eventList__monthNav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;

  margin-bottom: 20px;
}

.eventList__monthButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-width: 92px;
  padding: 10px 16px;

  border: 1px solid transparent;
  border-radius: 4px;

  background-color: #e8e9ed;
  color: #333;

  font-size: 0.875rem;
  line-height: 1.2;
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.eventList__monthButton:hover {
  background-color: #dcdde2;
}

.eventList__monthButton:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* -------------------------------------
   年月見出し
-------------------------------------- */

.eventList__monthHeader {
  margin-bottom: 18px;
}

.eventList__month {
  display: flex;
  align-items: baseline;
  gap: 8px;

  margin: 0;

  color: var(--text);

  font-weight: 700;
}

.eventList__year {
  font-size: 1.375rem;
}

.eventList__monthNumber {
  font-size: 2.375rem;
  line-height: 1;
}

.eventList__monthNumber span {
  font-size: 1.5rem;
  margin-left: 2px;
}

.eventList__monthText {
  font-size: 1rem;
}

/* -------------------------------------
   日別一覧
-------------------------------------- */

.eventList__days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eventDay {
  display: grid;
  grid-template-columns: minmax(125px, 9rem) minmax(0, 1fr);

  min-height: 76px;

  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;

  background-color: var(--surface);
  color: var(--text);
}

/* -------------------------------------
   日付
-------------------------------------- */

.eventDay__date {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px 6px;

  background-color: #666;
  color: #fff;
}

.eventDay__date time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: 100%;
  height: 100%;

  text-align: center;
}

.eventDay__number {
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1;
}

.eventDay__dayLabel {
  margin-left: 2px;

  font-size: 0.875rem;
}

.eventDay__weekday {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

/* 土曜日 */

.eventDay.is-saturday .eventDay__date {
  background-color: #119fe8;
}

/* 日曜日 */

/* 日曜日・祝日 */
.eventDay.is-sunday .eventDay__date,
.eventDay.is-holiday .eventDay__date {
  background-color: #df002f;
}

/* -------------------------------------
   イベント内容
-------------------------------------- */

.eventDay__content {
  display: flex;
  align-items: stretch;

  min-width: 0;

  background-color: var(--surface);
}

.eventDay__events {
  width: 100%;
  margin: 0;
  padding: 0 18px;

  list-style: none;
}

.eventDay__event {
  border-bottom: 1px solid var(--border);
}

.eventDay__event:last-child {
  border-bottom: 0;
}

.eventDay__link {
  position: relative;

  display: grid;
  grid-template-columns: 120px 100px minmax(0, 1fr);
  align-items: center;
  gap: 8px;

  min-height: 74px;
  padding: 10px;

  color: var(--link);
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.eventDay__link:hover {
  background-color: var(--bg);
}

.eventDay__link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -4px;
}

.eventDay__time {
  grid-column: 1;

  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.eventDay__category {
  grid-column: 2;
  justify-self: start;
  display: block;
  width: 100%;
  text-align: center;

  padding: 0.3em 0.8em;

  background-color: #00a089;
  color: #fff;

  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.eventDay__eventTitle {
  grid-column: 3;
  min-width: 0;

  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}

/* =========================================================
   閲覧支援
========================================================= */

html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventList__monthButton {
  border-color: var(--border);

  background-color: var(--surface);
  color: var(--text);
}

html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventList__monthButton:hover,
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventList__monthButton:focus-visible {
  background-color: var(--text);
  color: var(--surface);
}

/* 土日・祝日を含め、日付部分を閲覧支援配色へ統一 */

html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventDay__date,
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay.is-saturday
  .eventDay__date,
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay.is-sunday
  .eventDay__date,
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay.is-holiday
  .eventDay__date {
  background-color: var(--text);
  color: var(--surface);
}
/* イベントリンク */

html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay__link:hover,
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay__link:focus-visible {
  background-color: var(--text);
  color: var(--surface);
}

html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDay__link::before {
  border-left-color: currentColor;
}
html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventDay__category {
  border: 1px solid var(--border);
  background-color: var(--text);
  color: var(--surface);
}
/* =========================================================
   SP
========================================================= */

@media (max-width: 750px) {
  .eventList {
    padding: 30px 24px 80px;
  }
  .eventDay__category {
    padding: 0.25em 0.6em;

    font-size: 0.6875rem;
    line-height: 1.4;
  }
  .eventList__title {
    margin-bottom: 45px;

    font-size: 1.625rem;
  }

  /* -------------------------------------
     月切り替え
  -------------------------------------- */

  .eventList__monthNav {
    justify-content: center;
    gap: 18px;

    margin-bottom: 30px;
  }

  .eventList__monthButton {
    min-width: 0;
    padding: 10px 14px;

    font-size: 0.8125rem;
  }

  /* -------------------------------------
     年月
  -------------------------------------- */

  .eventList__monthHeader {
    margin-bottom: 14px;
  }

  .eventList__month {
    justify-content: center;
    gap: 5px;
  }

  .eventList__year {
    font-size: 1.25rem;
  }

  .eventList__monthNumber {
    font-size: 2rem;
  }

  .eventList__monthNumber span {
    font-size: 1.3125rem;
  }

  .eventList__monthText {
    font-size: 0.875rem;
  }

  /* -------------------------------------
     日別
  -------------------------------------- */

  .eventList__days {
    gap: 8px;
  }

  .eventDay {
    display: block;

    min-height: 0;

    border-radius: 4px;
  }

  /* -------------------------------------
     日付
  -------------------------------------- */

  .eventDay__date {
    min-height: 42px;
    padding: 6px 10px;
  }

  .eventDay__date time {
    flex-direction: row;
    gap: 5px;
  }

  .eventDay__number {
    font-size: 1.625rem;
  }

  .eventDay__dayLabel {
    font-size: 0.8125rem;
  }

  .eventDay__weekday {
    font-size: 0.75rem;
    align-self: flex-end;
    padding-bottom: 2px;
  }

  /* -------------------------------------
     内容
  -------------------------------------- */

  .eventDay__content {
    min-height: 30px;
  }

  .eventDay__events {
    padding: 0 14px;
  }

  .eventDay__link {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "time category"
      "title title";
    align-items: start;
    justify-content: start;
    column-gap: 10px;
    row-gap: 5px;

    min-height: 0;
    padding: 4px;
  }

  .eventDay__link::before {
    top: 20px;
  }

  .eventDay__time {
    grid-area: time;

    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: nowrap;
  }

  .eventDay__category {
    grid-area: category;
    justify-self: start;
    width: auto;

    padding: 0.25em 0.6em;

    font-size: 0.6875rem;
    line-height: 1.4;
  }

  .eventDay__eventTitle {
    grid-area: title;

    min-width: 0;

    font-size: 0.875rem;
    line-height: 1.6;
  }
}
/* -------------------------------------
   年月・月切り替え
-------------------------------------- */

.eventList__monthControl {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;

  margin-bottom: 18px;
}

.eventList__monthHeader {
  margin-bottom: 0;
}

.eventList__monthNav {
  flex-shrink: 0;
  margin-bottom: 0;
}
@media (max-width: 750px) {
  .eventList__monthControl {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;

    margin-bottom: 14px;
  }

  .eventList__monthNav {
    order: 1;
    justify-content: center;
    margin-bottom: 0;
  }

  .eventList__monthHeader {
    order: 2;
    margin-bottom: 0;
  }
}

/* =========================================
   Event Detail
========================================= */

.eventDetail {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 30px 100px;
}
@media (max-width: 750px) {
  .eventDetail {
    padding: 50px 20px 80px;
  }
}

/* =========================================
   Event Detail Header
========================================= */

.eventDetail__header {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 50px;
}

/* タイトル
----------------------------------------- */

.eventDetail__title {
  position: relative;

  margin: 0;
  padding-bottom: 20px;

  border-bottom: 1px solid #ccc;

  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

/* 長いグレー線に重なる短い緑線 */
.eventDetail__title::after {
  content: "";

  position: absolute;
  bottom: -2px;
  left: 0;

  width: 50px;
  height: 4px;

  background-color: #00a88f;
}

/* カテゴリ・開催日・時間
----------------------------------------- */

.eventDetail__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 25px;

  margin: 0;
  padding-top: 25px;
}

.eventDetail__category,
.eventDetail__date,
.eventDetail__time {
  margin: 0;
}

/* カテゴリ */

.eventDetail__category {
  display: inline-block;

  padding: 0.35em 1em;

  background-color: #00a089;
  color: #fff;

  font-size: 0.875rem;
  line-height: 1.4;
}

/* 開催日・時間 */

.eventDetail__date,
.eventDetail__time {
  display: flex;
  align-items: center;
  gap: 0.5em;

  color: var(--text);

  font-size: 1rem;
  line-height: 1.7;
}

/* Font Awesome */

.eventDetail__metaIcon {
  flex-shrink: 0;

  color: #00a88f;
}

/* =========================================
   閲覧支援
========================================= */

/* 装飾用の緑ラインは非表示 */
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDetail__title::after {
  display: none;
}

/* 長い下線は残す */
html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventDetail__title {
  border-bottom-color: var(--border);
}

/* カテゴリ */
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDetail__category {
  border: 1px solid var(--border);
  background-color: var(--text);
  color: var(--surface);
}

/* 日付・時間のアイコン */
html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDetail__metaIcon {
  color: var(--text);
}

/* =========================================
   SP
========================================= */

@media (max-width: 750px) {
  .eventDetail__header {
    margin-bottom: 35px;
  }

  .eventDetail__title {
    padding-bottom: 15px;
    font-size: 1.75rem;
  }

  .eventDetail__title::after {
    width: 40px;
  }

  .eventDetail__meta {
    gap: 10px 20px;
    padding-top: 20px;
  }
}
/* =========================================
   Event Detail Images
========================================= */

.eventDetail__images {
  display: flex;
  flex-direction: column;
  gap: 40px;

  width: 100%;
  max-width: 850px;
  margin: 50px auto;
}

.eventDetail__image {
  width: 100%;
  margin: 0;
  text-align: center;
}

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

/* SP
----------------------------------------- */

@media (max-width: 750px) {
  .eventDetail__images {
    gap: 25px;
    margin: 35px auto;
  }
}
/* =========================================
   Event Detail Body
========================================= */

.eventDetail__body {
  width: 100%;
  max-width: 850px;
  margin: 50px auto;

  color: var(--text);

  font-size: 1rem;
  line-height: 2;
}
@media (max-width: 750px) {
  .eventDetail__body {
    margin: 35px auto;
    line-height: 1.8;
  }
}
/* =========================================
   Event Detail Documents
========================================= */

.eventDetail__documents {
  width: 100%;
  max-width: 850px;
  margin: 50px auto;
}

.eventDetail__subTitle {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
}

.eventDetail__documentList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eventDetail__document {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 16px 20px;

  border: 1px solid var(--border);

  background-color: var(--surface);
  color: var(--link);

  line-height: 1.6;
  text-decoration: none;
}

.eventDetail__document:hover {
  text-decoration: underline;
}

.eventDetail__document:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.eventDetail__pdf {
  flex-shrink: 0;

  padding: 0.2em 0.55em;
  border-radius: 0.4em;

  background-color: #000;
  color: #fff;

  font-size: 0.75rem;
  line-height: 1.2;
}

.eventDetail__documentName {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 閲覧支援
----------------------------------------- */

html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventDetail__pdf {
  border: 1px solid var(--text);
  background-color: var(--text);
  color: var(--surface);
}

/* SP
----------------------------------------- */

@media (max-width: 750px) {
  .eventDetail__documents {
    margin: 35px auto;
  }

  .eventDetail__document {
    padding: 14px 15px;
  }
}
/* =========================================
   Event Detail External Link
========================================= */

.eventDetail__links {
  width: 100%;
  max-width: 850px;
  margin: 50px auto;
}

.eventDetail__externalLink {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 16px 20px;

  border: 1px solid var(--border);

  background-color: var(--surface);
  color: var(--link);

  line-height: 1.6;
  text-decoration: none;
}

.eventDetail__externalLink:hover {
  text-decoration: underline;
}

.eventDetail__externalLink:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.eventDetail__externalIcon {
  flex-shrink: 0;
  margin-left: auto;
}

/* 閲覧支援
----------------------------------------- */

html:is(.contrast-black, .contrast-yellow, .contrast-blue)
  .eventDetail__externalIcon {
  display: none;
}

/* SP
----------------------------------------- */

@media (max-width: 750px) {
  .eventDetail__links {
    margin: 35px auto;
  }

  .eventDetail__externalLink {
    padding: 14px 15px;
  }
}


/* イベント一覧：画像付きカード（PC4列・スマートフォン2列） */
.eventList { max-width: 1280px; }
.eventList__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; }
.eventListCard { min-width: 0; }
.eventListCard__link { display: block; height: 100%; color: var(--text); text-decoration: none; }
.eventListCard__image { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg); }
.eventListCard__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eventListCard__category { position: absolute; top: 0; left: 0; padding: .35em .75em; background: #00a089; color: #fff; font-size: .875rem; }
.eventListCard__body { padding: 12px 0 18px; }
.eventListCard__meta { margin: 0 0 12px; color: #006b80; font-size: .875rem; }
.eventListCard__title { margin: 0; font-size: 1rem; font-weight: 400; line-height: 1.65; overflow-wrap: anywhere; }
.eventListCard__link:hover .eventListCard__title { text-decoration: underline; }
.eventListCard__link:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.eventList__empty { grid-column: 1 / -1; }
@media (min-width: 751px) and (max-width: 1000px) { .eventList__cards { gap: 22px 14px; } }
@media (max-width: 750px) {
  .eventList { padding-inline: 15px; }
  .eventList__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .eventListCard__body { padding: 10px 0 12px; }
  .eventListCard__meta { font-size: .8125rem; margin-bottom: 10px; }
  .eventListCard__title { font-size: .9375rem; }
  .eventListCard__category { font-size: .75rem; }
}
html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventListCard__category { background: var(--text); color: var(--surface); }
html:is(.contrast-black, .contrast-yellow, .contrast-blue) .eventListCard__meta { color: var(--text); }
