/* ============================================================
   Blue Academy - stories.css (Stories 一覧ページ専用)
   ============================================================
   依存: base.css, layout.css, components.css, page.css
   読み込み: is_page_template('page-stories.php') 時のみ
   ============================================================ */

/* ============ Stories Intro ============ */
.stories-intro {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}
.stories-intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
.stories-intro h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.stories-intro h2 .blue { color: var(--blue); }
.stories-intro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}
.stories-intro-list li {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding-left: 24px;
  position: relative;
  line-height: 1.7;
}
.stories-intro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1px;
  background: var(--blue);
}
.stories-intro p {
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 18px;
}
.stories-intro p strong { color: var(--blue); font-weight: 700; }
.stories-intro-side {}
.stories-intro-side p:last-child { margin-bottom: 0; }

/* ============ Stories List (Rows) ============ */
.stories-list { display: flex; flex-direction: column; }
.story-row {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
.story-row-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
}
.story-row:nth-child(even) .story-row-inner {
  grid-template-columns: 1fr 380px;
}
.story-row:nth-child(even) .story-photo-side { order: 2; }
.story-row:nth-child(even) .story-info-side  { order: 1; }

.story-photo-side { position: sticky; top: 100px; }
.story-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--soft-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
}
.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background:
    repeating-linear-gradient(135deg, transparent 0, transparent 14px, rgba(0,102,255,0.06) 14px, rgba(0,102,255,0.06) 15px),
    var(--soft-bg);
  color: var(--muted);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.story-photo-placeholder::before {
  content: "";
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
}
.story-photo-spec {
  margin: 0;
}
.story-photo-spec-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.story-photo-spec-row dt {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
}
.story-photo-spec-row dd {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.story-info-side {}
.story-num {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.story-name {
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.story-name a { color: inherit; text-decoration: none; }
.story-name-en {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.story-uni {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}
.story-headline {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 32px;
}
.story-headline .blue { color: var(--blue); }
.story-body {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 40px;
}
.story-body p { margin-bottom: 18px; }
.story-body p:last-child { margin-bottom: 0; }
.story-body strong { font-weight: 700; color: var(--blue); }

/* ============ Actions: Video thumb + PDF card ============ */
.story-actions-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.story-actions-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--blue);
}
.story-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Video thumbnail (link to YouTube in new tab) */
.story-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: 4px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: transform 0.2s;
}
.story-video-thumb:hover { transform: translateY(-2px); }
.story-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s, filter 0.3s;
}
.story-video-thumb:hover img {
  transform: scale(1.04);
  filter: brightness(0.85);
}
.story-video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}
.story-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 12px 32px rgba(0, 102, 255, 0.4);
  transition: transform 0.2s, background 0.2s;
}
.story-video-thumb:hover .story-video-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #1A75FF;
}
.story-video-play::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--white);
  margin-left: 6px;
}
.story-video-meta {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  z-index: 3;
  color: var(--white);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* PDF Card */
.story-pdf-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px 24px 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.story-pdf-card:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
}
.story-pdf-icon {
  width: 44px;
  height: 56px;
  position: relative;
  margin-bottom: 18px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
}
.story-pdf-card:hover .story-pdf-icon {
  border-color: var(--white);
  background: var(--ink);
}
.story-pdf-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.story-pdf-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.6;
}
.story-pdf-card:hover .story-pdf-sub { color: rgba(255,255,255,0.6); }
.story-pdf-link {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.story-pdf-card:hover .story-pdf-link { color: var(--white); }
.story-pdf-link::after {
  content: "→";
  font-family: var(--font-en);
}

/* ============ Empty State ============ */
.story-empty {
  padding: 120px 0;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .stories-intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-row { padding: 60px 0; }
  .story-row-inner,
  .story-row:nth-child(even) .story-row-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .story-row:nth-child(even) .story-photo-side { order: 0; }
  .story-row:nth-child(even) .story-info-side  { order: 0; }
  .story-photo-side { position: static; }
  .story-photo { max-width: 480px; }
  .story-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   Story Permalink (個別ページ導線)
   ============================================================ */
.story-num-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.story-num-wrap .story-num { margin-bottom: 0; }
.story-permalink {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s, gap 0.2s;
}
.story-permalink::after {
  content: "→";
  font-family: var(--font-en);
  transition: transform 0.2s;
}
.story-permalink:hover {
  color: var(--blue);
}
.story-permalink:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   Video Modal (YouTube 全画面再生)
   ============================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 36, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: video-modal-in 0.2s ease-out;
}
@keyframes video-modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.video-modal-frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}
.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.15s, background 0.15s, color 0.15s;
  z-index: 10001;
}
.video-modal-close:hover {
  background: var(--blue);
  color: var(--white);
  transform: scale(1.05);
}
.video-modal-close::before {
  content: "✕";
  font-weight: 600;
}
@media (max-width: 640px) {
  .video-modal { padding: 16px; }
  .video-modal-close { top: 16px; right: 16px; width: 40px; height: 40px; }
}

/* video-thumb は既に `.story-video-thumb` で button 想定。
   既存の `<a>` ベースから `<button>` に切り替えるため text-align/font 系もリセット */
button.story-video-thumb {
  font: inherit;
  text-align: left;
  color: inherit;
}

/* ============================================================
   Media Modal: PDF variant (FlipHTML5)
   ============================================================ */
.video-modal--pdf .video-modal-frame {
  aspect-ratio: auto;
  width: min(96vw, 1280px);
  height: min(92vh, 900px);
  max-width: none;
}
.video-modal--pdf .video-modal-frame iframe {
  background: var(--white);
}

/* button.story-pdf-card のリセット (a → button 化のため) */
button.story-pdf-card {
  font: inherit;
  cursor: pointer;
  text-align: left;
}
