@import url("https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=M+PLUS+Rounded+1c:wght@300;400;500;700&display=swap");

/* =========================================
   1. 変数定義 (Variables)
   ========================================= */
:root {
  --font-body: "BIZ UDPGothic", sans-serif;
  --font-heading: "M PLUS Rounded 1c", sans-serif;
  --font-accent: "M PLUS Rounded 1c", sans-serif;

  --color-blue: #0088cc;
  --color-blue-dark: #6fa1ce;
  --color-red: #e63946;
  --color-orange: #f4a261;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-light: #f7f8fa;
  --color-border: #e0e0e0;

  --bg-blue: rgba(167, 204, 237, 0.3);
  --bg-orange: rgba(253, 250, 245, 0.6);
  --bg-white: rgba(255, 255, 255, 0.5);

  --max-width: 900px;
}

/* =========================================
   2. リセット & ベース (Reset & Base)
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--color-text); text-decoration: none; }
a:hover {opacity: 0.8; text-decoration: underline;}

/* =========================================
   3. 共通レイアウト & コンポーネント
   ========================================= */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 50px 0; }

/* 背景色と文字色のセット */
.bg-blue { background: var(--bg-blue); color: var(--color-text); }
.bg-orange { background: var(--bg-orange); color: var(--color-text); }
.bg-white { background: var(--bg-white); color: var(--color-text); }

/* セクションタイトル */
.section-title {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-text);
}
.section-title::after {
  content: ""; display: block; width: 50px; height: 3px; margin: 10px auto 0;
  background: var(--color-blue); /* デフォルト青 */
}
.bg-orange .section-title::after { background: var(--color-red); }

/* 連続する白セクションの余白調整 */
.section.bg-white { padding-bottom: 12px; }
.section.bg-white + .hero.bg-white { margin-top: 6px; padding-top: 8px; }

/* =========================================
   4. ヘッダー (Header & Hero)
   ========================================= */
.header {
  background: linear-gradient(to bottom, #a7cced 0%, #ffffff 70%, #fdfaf5 100%);
  padding: 20px 0; text-align: center;
}
.header-logo { position: relative; z-index: 0; object-fit: contain; max-width: 800px; width: 100%; }
.hero-header-row {
  position: relative; z-index: 5;
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: center; justify-content: center; gap: 20px;
}
.header-year, .hero-title {
  word-break: keep-all; overflow-wrap: anywhere; line-height: 1.2;
}
.header-year {
  color: var(--color-blue-dark); font-family: var(--font-accent);
  font-weight: 800; font-size: 3rem; letter-spacing: -0.05em; margin: 0 0 8px;
}
.hero-title {
  font-family: var(--font-heading); font-weight: 900;
  font-size: 3rem; color: var(--color-text); margin: 0; text-align: left;
}
.hero-title-symposium { color: var(--color-red); }
.hero-title-screening { color: var(--color-blue); }
.hero-title .hero-title-sep { display: inline-block; margin: 0 8px; color: var(--color-text-light); }

.hero-header-row .hero-date-icon {
  width: 120px; height: 120px; flex: 0 0 120px;
  display: block; object-fit: contain;
}

/* メインビジュアル (Hero Meta) */
.hero-meta .meta-list p {font-weight: 600;}
.hero-meta .meta-list p span {font-weight: 600;}
.meta-strong {font-weight: 700;}
.hero { background: var(--color-bg-light); padding: 40px 0; text-align: center; }
.hero.bg-white { background: #fff; } /* ベースのグレーを純白に上書き */

.hero-meta { max-width: 800px; margin: 0 auto 22px; }
.hero-date { font-family: var(--font-accent); font-size: 1.1rem; color: var(--color-text-light); margin-bottom: 8px; font-weight: 400; }
.hero-info { font-size: 1rem; margin-bottom: 16px; line-height: 1.45; }
.hero-note { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 8px; }

/* バッジ類 */
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 720px; margin: 10px auto 4px; padding: 5px; row-gap: 6px; }
.hero-badges a { text-decoration: none; display: inline-block; flex: 1 1 100%; max-width: 100%; }
.badge { display: inline-block; width: 100%; box-sizing: border-box; background: transparent; border: none; padding: 8px 12px; border-radius: 8px; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.06em; transition: transform 0.2s ease, background-color 0.2s ease; }
.badge-blue { color: var(--color-blue); }
.badge-red { color: var(--color-red); }
.hero-badges a:hover .badge, .hero-badges a:focus-visible .badge { transform: translateY(-2px); }
.hero-badges a:hover .badge-blue { background-color: rgba(0, 136, 204, 0.12); }
.hero-badges a:hover .badge-red { background-color: rgba(230, 57, 70, 0.12); }

.header-badge { display: inline-block; font-size: 0.6em; color: #fff; padding: 4px 10px; border-radius: 4px; vertical-align: middle; margin: 0 0 7px 10px; }
.bg-blue .header-badge { background: var(--color-blue); }
.bg-orange .header-badge { background: var(--color-red); }

/* =========================================
   5. 各セクション詳細 (Sections)
   ========================================= */
.intro-text { max-width: 800px; margin: 0 auto 30px; line-height: 1.8; font-size: 1rem; text-align: left; }
.section-subtitle { max-width: 800px; margin: 0 auto 16px; text-align: left; }

.program-body { padding: 20px; }
.program-title { font-family: var(--font-accent); font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; color: var(--color-text); text-align: center; }
.program-desc { font-size: 1rem; color: var(--color-text-light); line-height: 1.6; text-align: center; }
.section-subheading { font-size: 1.2rem; color: var(--color-red); margin-top: 40px; margin-bottom: 15px; border-bottom: 2px solid var(--color-red); display: inline-block; }

/* ギャラリー */
.gallery-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { border-radius: 8px; overflow: hidden; position: relative; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; transition: transform 180ms ease, box-shadow 180ms ease; }
.gallery-item:hover img { transform: scale(1.04); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16); }
.gallery-item span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.75rem; padding: 6px 8px; }

/* リスト・開催情報 */
.panelists { background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 20px; margin-top: 20px; }
.cast-list, .org-list { max-width: 800px; margin: 0 auto; font-family: var(--font-body); font-size: 1rem; color: var(--color-text); line-height: 1.6; }
.cast-row, .org-row { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--color-border); padding: 15px 0; flex-wrap: wrap; }
.cast-row:last-child, .org-row:last-child { border-bottom: none; }
.cast-row dt, .org-row .org-label { width: 120px; font-weight: 700; color: var(--color-blue); flex-shrink: 0; }
.cast-row dd, .org-value { flex: 1 1 auto; }
.org-value-group { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.org-value-group .org-item { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
.org-row img { max-width: 120px; width: auto; height: auto; flex: 0 0 auto; object-fit: contain; display: block; margin-left: 20px; }

/* お問い合わせ */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact-card{background:#fff;border:1px solid var(--color-border);border-radius:8px;padding:24px;box-shadow:0 6px 18px rgba(0,0,0,.04);text-align:center;display:inline-block;width:auto;min-width:280px;max-width:100%;height:100%;margin:0 auto}
.contact-card h3{font-family:var(--font-accent);font-size:1.1rem;margin-bottom:8px;color:var(--color-blue);font-weight:700}
.contact-card .org{font-weight:600;margin-bottom:6px}
.contact-card.mx-auto{display:block;max-width:500px;width:100%;margin:0 auto}
.contact-grid{display:grid;grid-template-columns:repeat(2,auto);justify-content:center;gap:20px;max-width:800px;margin:0 auto}

/* スマホ表示 */
@media (max-width: 600px){.contact-grid{grid-template-columns:1fr;padding:0 20px;}}


/* フッター */
.footer { background: #333; color: #fff; padding: 30px 20px; text-align: center; }
.footer-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 16px; font-size: 0.85rem; opacity: 0.7; }
.copyright {font-size: 0.75rem; opacity: 0.5; margin-top: 10px;}

/* =========================================
   6. アプリケーション & モーダル周り
   ========================================= */
.application-ended-box { display: block; background: var(--color-bg-light); border: 2px solid var(--color-border); border-radius: 8px; padding: 1.5rem; margin-top: 1.5rem; width: 100%; }
.application-ended-title, .application-onday-title { color: var(--color-text); font-weight: bold; font-size: 1.1rem; margin-bottom: 0.5rem; }
.application-ended-text, .application-onday-desc { font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.6; }
.application-contact-link { display: inline-block; margin-top: 0.8rem; font-weight: bold; text-decoration: underline; color: var(--color-blue); }
.application-time-note { display: block; margin-top: 0.5rem; font-size: 1rem; color: var(--color-red); font-weight: bold; }
.application-details-flat { background: #fff; border: 1px dashed var(--color-border); border-radius: 4px; padding: 1rem; margin-top: 1.5rem; }
.application-details-title { font-weight: bold; font-size: 0.95rem; margin-bottom: 0.5rem; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); opacity: 0; visibility: hidden; display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 220ms ease, visibility 220ms; pointer-events: none; }
.modal-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-content { position: relative; max-width: 1000px; width: 90%; max-height: 90%; background: #fff; border-radius: 8px; overflow: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); transform: translateY(10px) scale(0.98); opacity: 0; transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms; }
.modal-overlay.open .modal-content { transform: translateY(0) scale(1); opacity: 1; }
.modal-content img { display: block; width: 100%; height: auto; }
.modal-caption { padding: 12px 16px; font-size: 0.95rem; color: var(--color-text); text-align: left; }
.modal-close { position: absolute; top: 8px; right: 8px; background: transparent; border: none; font-size: 28px; line-height: 1; padding: 6px; cursor: pointer; color: #333; }

/* =========================================
   7. ユーティリティ & その他 UI
   ========================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-10 { margin-top: 10px; }
.mx-auto { margin: 0 auto; }
.mb-15 { margin-bottom: 15px; }
.mb-30 { margin-bottom: 30px; }
.text-blue-bold { color: var(--color-blue); font-weight: 700; }
.text-red-bold { color: var(--color-red); font-weight: 700; }
.visually-hidden-iframe { display: none; visibility: hidden; }
.pdf-icon { width: 30px; height: auto; vertical-align: bottom; margin-left: 8px; }

.back-to-top { position: fixed; right: 24px; bottom: 24px; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--color-blue) 50%, var(--color-red) 50%); border: 4px solid rgba(255, 255, 255, 0.95); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0; visibility: hidden; z-index: 1000; transition: transform 0.15s ease, opacity 0.2s ease, visibility 0.2s ease; }
.back-to-top svg { width: 28px; height: 28px; display: block; transform: scale(2); transform-origin: center center; }
.back-to-top.visible { opacity: 0.8; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px) scale(1.05); opacity: 1; }

/* =========================================
   8. メディアクエリ (レスポンシブ - デスクトップファースト)
   ========================================= */
/* タブレット〜小型PC用微調整 */
@media (min-width: 520px) and (max-width: 900px) {
  .hero-badges a { flex: 1 1 calc(50% - 12px); max-width: calc(50% - 12px); }
  .hero-badges .badge { text-align: center; }
}

/* 900px以下（タブレット・小さめPC） */
@media (max-width: 900px) {
  .header-year, .hero-title { font-size: 2.2rem; }
  .hero-header-row { gap: 16px; }
}

/* 800px以下（タブレット縦） */
@media (max-width: 800px) {
  .hero-header-row .hero-date-icon { width: 96px; height: 96px; flex: 0 0 96px; }
}

/* 700px以下 */
@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 600px以下（スマートフォン） */
@media (max-width: 600px) {
  .hero { padding: 30px 0; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.2rem; }
  .section.bg-white { padding-bottom: 10px; }
  .section.bg-white + .hero.bg-white { margin-top: 4px; padding-top: 6px; }

  .header-year, .hero-title { font-size: 1.5rem; }
  .hero-header-row { gap: 10px; }
  .hero-header-row .hero-date-icon { width: 80px; height: 80px; flex: 0 0 80px; }
  .hero-badges .badge { font-size: 1.05rem; }

  .program-body { padding: 15px 10px; }

  .cast-row, .org-row { flex-direction: column; align-items: flex-start; }
  .cast-row dt, .org-row .org-label { width: auto; margin-bottom: 6px; }
  .org-value-group { width: 100%; margin-top: 4px; }
  .org-value-group .org-item { display: block; }
  .org-row img { margin-left: 0; margin-top: 8px; max-width: 90px; }

  .contact-grid { grid-template-columns: 1fr; }

  .back-to-top { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .back-to-top svg { width: 24px; height: 24px; }
}

/* 520px以下（小型スマートフォン） */
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: repeat(1, 1fr); }
}

/* =========================================
   放送のお知らせボックス
   ========================================= */
.broadcast-info-box {
  background: var(--bg-orange);
  border: 2px solid var(--color-orange);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
}
.broadcast-info-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 0.8rem;
  text-align: center;
  gap: 0.4rem;
}
.broadcast-note {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.broadcast-program-info {
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem;
  border-radius: 6px;
}
.broadcast-program-info p {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
.broadcast-program-info p:last-child {
  margin-bottom: 0;
}

/* =========================================
   終了イベント アコーディオン
   ========================================= */
.application-ended-accordion {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--color-border);
}
.application-ended-summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-light);
  background: var(--color-bg-light);
  user-select: none;
  transition: background 0.2s;
  position: relative;
  text-align: left;
}
.application-ended-accordion[open] .application-ended-summary {
  border-bottom: 2px solid var(--color-border);
}
/* デフォルトの矢印を消す */
.application-ended-summary::-webkit-details-marker {
  display: none;
}
/* カスタム矢印（右側） */
.application-ended-summary::after {
  content: "▼";
  font-size: 0.8rem;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s;
}
.application-ended-accordion[open] .application-ended-summary::after {
  transform: translateY(-50%) rotate(180deg);
}
.application-ended-summary:hover {
  background: #ebeef0;
}
/* アコーディオン内の既存boxの余白リセット */
.application-ended-inner.application-ended-box {
  border: none;
  margin-top: 0;
  border-radius: 0;
}
