/* data-cpt="event" 用ページCSS（single / archive 共用） */

/* ============================================================
   single-nkk_event（イベント詳細）
   ============================================================ */
.ev-hero { position: relative; background: #111; }
.ev-hero__img { width: 100%; max-height: 480px; object-fit: cover; opacity: 0.75; display: block; }
.ev-hero__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 40px; }
.ev-hero__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.ev-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 700; margin-bottom: 14px; }
.ev-status--open { background: #43a047; color: #fff; }
.ev-status--few  { background: #fb8c00; color: #fff; }
.ev-status--full { background: #e53935; color: #fff; }
.ev-status--announce { background: #1565c0; color: #fff; }
.ev-status--closed { background: #78909c; color: #fff; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ev-tag { background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; padding: 3px 12px; font-size: 0.78rem; backdrop-filter: blur(4px); }
.ev-hero__title { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 10px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.ev-hero__datetime { font-size: 1rem; color: rgba(255,255,255,0.9); display: flex; align-items: center; gap: 8px; }
.ev-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.ev-summary { background: var(--bg-white); border-radius: var(--radius-lg); box-shadow: 0 2px 16px var(--shadow); overflow: hidden; position: sticky; top: 80px; }
.ev-summary__head { background: var(--primary); color: #fff; padding: 16px 20px; font-weight: 700; font-size: 0.95rem; }
.ev-summary__table { width: 100%; border-collapse: collapse; }
.ev-summary__table th, .ev-summary__table td { padding: 13px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.ev-summary__table tr:last-child th, .ev-summary__table tr:last-child td { border-bottom: none; }
.ev-summary__table th { width: 38%; color: var(--text-light); font-weight: 600; background: rgba(0,0,0,0.02); white-space: nowrap; }
.ev-summary__table td { color: var(--text); line-height: 1.6; }
.ev-summary__cta { padding: 20px; border-top: 1px solid var(--border); background: rgba(44,95,45,0.04); }
.ev-summary__deadline { font-size: 0.8rem; color: #e53935; font-weight: 700; text-align: center; margin-bottom: 12px; }
.ev-content h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); border-left: 4px solid var(--primary); padding-left: 12px; margin: 36px 0 16px; }
.ev-content h2:first-child { margin-top: 0; }
.ev-content p { line-height: 1.85; color: var(--text); margin-bottom: 16px; }
.ev-schedule { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 16px 0; }
.ev-schedule__row { display: flex; align-items: baseline; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.ev-schedule__row:last-child { border-bottom: none; }
.ev-schedule__time { font-size: 0.82rem; font-weight: 700; color: var(--primary); white-space: nowrap; min-width: 80px; }
.ev-schedule__desc { font-size: 0.88rem; color: var(--text); line-height: 1.6; }
.ev-note { border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.ev-note--warn { background: #fff8e1; border: 1px solid #ffe082; }
.ev-note--info { background: rgba(2,128,144,0.06); border: 1px solid rgba(2,128,144,0.2); }
.ev-note__title { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.ev-note--warn .ev-note__title { color: #f57f17; }
.ev-note--info .ev-note__title { color: var(--accent); }
.ev-note p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0; line-height: 1.7; }
.ev-announce { background: #e3f2fd; border: 1px solid #90caf9; border-radius: var(--radius-lg); padding: 32px 40px; text-align: center; margin: 48px 0; }
.ev-announce__title { font-size: 1.1rem; font-weight: 700; color: #1565c0; margin-bottom: 8px; }
.ev-announce__body { font-size: 0.9rem; color: var(--text); margin-bottom: 20px; line-height: 1.7; }
.ev-apply { background: linear-gradient(135deg, var(--primary) 0%, #1a3a1b 100%); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin: 48px 0; }
.ev-apply__label { font-size: 0.82rem; color: rgba(255,255,255,0.9); letter-spacing: 0.06em; margin-bottom: 8px; }
.ev-apply__deadline { font-size: 1rem; color: #ffcc02; font-weight: 800; margin-bottom: 24px; }
.ev-apply__btn { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--primary); font-weight: 800; font-size: 1.1rem; padding: 18px 48px; border-radius: 50px; text-decoration: none; transition: all 0.2s; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.ev-apply__btn:hover { background: #f0faf0; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.ev-apply__contact { margin-top: 20px; font-size: 0.82rem; color: rgba(255,255,255,0.9); line-height: 1.8; }
.ev-apply__contact a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.ev-venue__map iframe { width: 100%; height: 340px; border: none; border-radius: var(--radius-lg); box-shadow: 0 2px 12px var(--shadow); margin-bottom: 24px; }
.ev-venue__info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ev-venue__card { background: var(--bg-white); border-radius: var(--radius-lg); padding: 20px; box-shadow: 0 2px 12px var(--shadow); }
.ev-venue__card-title { font-size: 0.82rem; font-weight: 700; color: var(--text-light); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ev-venue__card p { font-size: 0.875rem; line-height: 1.7; color: var(--text); margin: 0; }
.ev-share { display: flex; align-items: center; gap: 12px; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 48px 0 40px; flex-wrap: wrap; }
.ev-share__label { font-size: 0.85rem; font-weight: 700; color: var(--text-light); }
.ev-share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 6px; font-size: 0.82rem; font-weight: 700; text-decoration: none; transition: opacity 0.2s; }
.ev-share__btn:hover { opacity: 0.85; }
.ev-share__btn--x    { background: #000; color: #fff; }
.ev-share__btn--fb   { background: #1877f2; color: #fff; }
.ev-share__btn--line { background: #06c755; color: #fff; }
.ev-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.ev-related-card { background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 2px 12px var(--shadow); text-decoration: none; color: var(--text); display: block; transition: all 0.3s; }
.ev-related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow-md); }
.ev-related-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.ev-related-card__body { padding: 16px; }
.ev-related-card__tag { font-size: 0.7rem; font-weight: 700; color: var(--primary); background: rgba(44,95,45,0.1); padding: 2px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px; }
.ev-related-card__title { font-size: 0.9rem; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.ev-related-card__date { font-size: 0.78rem; color: var(--text-light); }
@media (max-width: 900px) {
  .ev-layout { grid-template-columns: 1fr; }
  .ev-summary { position: static; }
  /* SP: 開催概要を本文より前に出す。order はグリッド直下の子(aside)に効かせる */
  .ev-layout > aside { order: -1; }
  .ev-hero__title { font-size: 1.5rem; }
}
@media (max-width: 600px) {
  .ev-related__grid { grid-template-columns: 1fr; }
  .ev-venue__info { grid-template-columns: 1fr; }
  .ev-apply { padding: 28px 20px; }
  .ev-apply__btn { font-size: 1rem; padding: 16px 28px; }
}
@media (max-width: 375px) {
  .ev-apply__btn { font-size: 0.875rem; }
}
@media (max-width: 425px) {
  .ev-share {
    display: grid;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 48px 0 40px;
    grid-template-columns: 1fr;
  }
  .ev-share__btn--x { display: flex; justify-content: center; }
  .ev-share__btn--fb { display: flex; justify-content: center; }
  .ev-share__btn--line { display: flex; justify-content: center; }
}
/* SP: ヒーローの高さを画像とテキストの高い方に合わせ、タグ・タイトルのはみ出しを防ぐ */
@media (max-width: 900px) {
  .ev-hero { display: grid; }
  .ev-hero__img { grid-area: 1 / 1; width: 100%; height: 100%; max-height: 480px; object-fit: cover; }
  .ev-hero__overlay { grid-area: 1 / 1; position: relative; inset: auto; padding-top: 24px; padding-bottom: 24px; }
}
/* SP: グリッド項目が中身の最小幅に押し広げられ、横にはみ出すのを防ぐ */
@media (max-width: 900px) {
  .ev-layout > * { min-width: 0; }
  .ev-apply__btn { max-width: 100%; }
  .ev-schedule__time { flex-shrink: 0; }
}

/* single-nkk_event: L12 対応で style="" 属性から移した分（元のモックと見た目は同一） */
.ev-summary__table small { color: var(--text-light); }
.ev-summary__price { color: var(--primary); font-size: 1.1em; }
.ev-summary__table-deadline { color: #e53935; }
.ev-venue__intro { margin-bottom: 16px; }
.ev-venue__intro a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.ev-related { margin-top: 64px; }
.ev-related__title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.ev-related__subtitle { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0; }

/* ------------------------------------------------------------
   events/sample.html だけ意匠が異なる箇所（後方互換のレガシー版）。
   .event-sample でスコープし、他ページの共有クラスに影響させない。
   ------------------------------------------------------------ */
.event-sample .ev-status--closed { background: #78909c; color: #fff; }
.event-sample .ev-hero__title { font-size: 2.2rem; line-height: 1.25; }
.event-sample .ev-hero__datetime svg { opacity: 0.8; }
.event-sample .ev-note { background: #fff8e1; border: 1px solid #ffe082; }
.event-sample .ev-note__title { color: #f57f17; }
@media (max-width: 900px) {
  .event-sample .ev-hero__title { font-size: 1.6rem; }
}
@media (max-width: 600px) {
  .event-sample .ev-apply__btn { font-size: 1rem; padding: 16px 32px; }
}

/* ============================================================
   archive-nkk_event（イベント一覧）
   ============================================================ */
.filter-section { margin-bottom: 32px; }
.filter-section__label { font-size: 0.85rem; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn { padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--bg-white); color: var(--text-light); transition: all var(--transition); }
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.event-card { background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 2px 12px var(--shadow); transition: all var(--transition); text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow-md); }
.event-card__image-wrap { position: relative; }
.event-card__image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.event-card__image--contain { object-fit: contain; background: #f5f5f5; }
.event-card__date-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; border-radius: var(--radius); padding: 8px 12px; text-align: center; line-height: 1; }
.event-card__date-month { font-size: 0.7rem; display: block; margin-bottom: 2px; }
.event-card__date-day { font-size: 1.4rem; font-weight: 800; display: block; }
.event-card__type-tag { position: absolute; top: 12px; right: 12px; padding: 4px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.event-card__type-tag--open { background: #e8f5e9; color: #2e7d32; }
.event-card__type-tag--all { background: #eceff1; color: #455a64; }
.event-card__type-tag--info { background: #e3f2fd; color: #1565c0; }
.event-card__type-tag--event { background: #e8f5e9; color: #2e7d32;}
.event-card__type-tag--project { background: #fff3e0; color: #e65100; }
.event-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.event-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.event-card__category { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; background: rgba(44, 95, 45, 0.1); color: var(--primary); }
.event-card__target { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; background: rgba(2, 128, 144, 0.1); color: var(--accent); }
.event-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.event-card__location { font-size: 0.8rem; color: var(--text-muted); margin-top: auto; }
#eventGrid { scroll-margin-top: calc(var(--header-height) + 24px); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.pagination[hidden] { display: none; }
.pagination__item { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-white); font-size: 0.9rem; font-family: inherit; color: var(--text-light); text-decoration: none; cursor: pointer; transition: all var(--transition); }
.pagination__item:hover, .pagination__item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination__item--disabled { opacity: 0.4; pointer-events: none; }
.pagination__ellipsis { display: flex; align-items: center; justify-content: center; width: 24px; height: 40px; font-size: 0.9rem; color: var(--text-muted); }

/* archive-nkk_event のページヘッダー背景（style属性除去の受け皿） */
.page-header--events {
  background-image: url("../../images/2026/04/events-hero.png");
}

/* ------------------------------------------------------------
   single-nkk_event 本文中の style属性除去の受け皿
   ------------------------------------------------------------ */
.ev-figure { margin: 8px 0 28px; }
.ev-figure__img { width: 100%; height: auto; display: block; }
.ev-figure__img--framed { border-radius: var(--radius-lg); box-shadow: 0 2px 12px var(--shadow); }
.ev-figure__img--md { max-width: 560px; }
.ev-figure__caption { margin-top: 10px; font-size: 0.85rem; color: var(--text-light); }
.ev-venue__intro { margin-bottom: 16px; }
.ev-venue__intro a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.ev-related { margin-top: 64px; }
.ev-related__title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.ev-related__subtitle { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0; }
.ev-summary__muted { color: var(--text-light); }
.ev-summary__accent { color: var(--accent); }
.ev-summary__cta-note { font-size: 0.85rem; color: var(--text-light); text-align: center; margin-bottom: 12px; }
.ev-announce__contact { font-size: 0.88rem; color: var(--text); line-height: 1.9; }

/* 本文中の wysiwyg ブロック（<p> のままだと入れ子が壊れるため <div> にした箇所を
   .ev-content p と同じ見た目に保つ。2.7節） */
.ev-content__note { line-height: 1.85; color: var(--text); margin-bottom: 16px; }

/* single-nkk_event: 地の文に<a>等が混ざり wysiwyg <div> にした際の
   見た目維持（.ev-content p と同一の値）。2.6節参照。 */
.ev-content__block { line-height: 1.85; color: var(--text); margin-bottom: 16px; }

.ev-content__inline-image { width: 100%; max-width: 560px; height: auto; display: block; border-radius: var(--radius-lg); box-shadow: 0 2px 12px var(--shadow); margin: 8px 0 28px; }

/* CPTのsingleテンプレート間でフィールド構成を揃えるための非表示プレースホルダ
   (data-acf-type="image" は <template> 非対応のため、hidden画像で代替) */
.acf-hidden-field { display: none; }

/* 終了したイベント */
.event-card.is-closed .event-card__date-badge::after { content: "終了"; display: block; font-size: 10px; margin-top: 2px; }

/* ------------------------------------------------------------
 * ブロックエディタで作った本文（今の本文の style="…" を、同じ見た目のクラスにしたもの）
 * ------------------------------------------------------------ */
/* 写真（角丸・影付き）。今の本文では img に直接付けていた見た目と余白を、画像ブロック（figure）に付ける */
.wp-block-image.ev-photo { margin: 8px 0 28px; }
.wp-block-image.ev-photo img { width: 100%; max-width: 560px; height: auto; display: block; border-radius: var(--radius-lg); box-shadow: 0 2px 12px var(--shadow); }
.wp-block-image.ev-photo--m28 { margin: 28px 0; }
.wp-block-image.ev-photo--m8-18 { margin: 8px 0 18px; }
.wp-block-image.ev-photo--m28-18 { margin: 28px 0 18px; }
.wp-block-image.ev-photo-plain img { width: 100%; max-width: 300px; height: auto; display: block; }
/* 写真と説明（figure） */
.wp-block-image.ev-figure { margin: 8px 0 28px; }
.wp-block-image.ev-figure figcaption { margin: 10px 0 0; font-size: 0.85rem; color: var(--text-light); }
/* このテーマ（theme.json なし）では、グループブロックの中に箱（__inner-container）が1段入る。
   タイムスケジュールの行（横に並べる作り）では、その箱を無いものとして扱う */
.wp-block-group.ev-schedule__row > .wp-block-group__inner-container { display: contents; }
/* 今の本文では div だった「枠の題」「スケジュールの時間・内容」は、ブロックでは段落（p）になる。
   本文や枠の中の段落の指定（余白・行の高さ・色）がかからないよう、今の div と同じ見た目に戻す */
.ev-note p.ev-note__title { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; line-height: inherit; }
.ev-note--warn p.ev-note__title { color: #f57f17; }
.ev-note--info p.ev-note__title { color: var(--accent); }
.ev-schedule__row p.ev-schedule__time,
.ev-schedule__row p.ev-schedule__desc { margin: 0; }
.ev-schedule__row p.ev-schedule__time { line-height: inherit; color: var(--primary); }
.ev-schedule__row p.ev-schedule__desc { line-height: 1.6; color: var(--text); }
