/* ============================================================
   vedanta.study — Recommended Movies module
   Extends common/css/styles.css design tokens
============================================================ */

/* ── Star Rating ── */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
  font-size: 0.8rem;
}
.star-rating i.fa-star,
.star-rating i.fa-star-half-alt { color: var(--accent); }
.star-rating i.far.fa-star { color: var(--border); }
.star-rating .rating-num {
  margin-left: 6px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Genre Tag variants (reuses blog-card-category look) ── */
.genre-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-light);
  color: var(--accent);
  white-space: nowrap;
}

/* ── Movie Poster / Banner Placeholder (no external images used) ── */
.movie-poster {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--poster-a, #B5621D), var(--poster-b, #362C24));
}
.movie-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.14), transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}
.movie-poster .poster-icon {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.55);
}
.movie-poster .poster-title {
  position: relative;
  z-index: 1;
  padding: 16px;
  color: var(--white);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* ── Movies Landing Grid ── */
.movies-page-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}
.movie-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.movie-card:hover .movie-poster .poster-title { text-decoration: none; }
.movie-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.movie-card-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.movie-card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.movie-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}
.movie-card-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.movie-card-meta span.dot { color: var(--border); }
.movie-card-meta-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.movie-card-meta-stacked strong {
  color: var(--text-muted);
  font-weight: 600;
}
.movie-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.movie-card-link:hover { color: var(--accent-dark); }
.movie-card-link::after { content: '→'; }

/* ── Movie Detail: Hero Banner ── */
.movie-hero {
  position: relative;
  aspect-ratio: 21/9;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--poster-a, #B5621D), var(--poster-b, #362C24));
}
.movie-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.05) 100%);
}
.movie-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 0 32px;
}
.movie-hero .genre-tag {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  backdrop-filter: blur(2px);
}
.movie-hero h1 {
  color: var(--white);
  margin: 12px 0 10px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.movie-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,0.88);
  font-size: 0.9rem;
}
.movie-hero-meta .star-rating { color: var(--accent-mid); }
.movie-hero-meta .star-rating i.fa-star,
.movie-hero-meta .star-rating i.fa-star-half-alt { color: var(--accent-mid); }
.movie-hero-meta .star-rating i.far.fa-star { color: rgba(255,255,255,0.4); }
.movie-hero-meta .star-rating .rating-num { color: rgba(255,255,255,0.88); }
.movie-hero-meta span.dot { color: rgba(255,255,255,0.45); }

/* ── Back link ── */
.movie-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--transition);
}
.movie-back-link:hover { color: var(--accent); }

/* ── Section labels within detail page ── */
.movie-section { margin-bottom: 48px; }
.movie-section h2 {
  font-size: 1.5rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.movie-section h2 i { color: var(--accent); font-size: 1.1rem; }
.movie-section > p {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Cast Grid ── */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cast-card {
  display: flex;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cast-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.cast-info h4 {
  font-size: 0.95rem;
  margin-bottom: 3px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
}
.cast-info p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Philosophical Points — Accordion ── */
.phil-accordion { display: flex; flex-direction: column; gap: 10px; }
.phil-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.phil-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.phil-item-header h4 {
  font-size: 0.98rem;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phil-item-header .phil-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phil-item-header .phil-chevron {
  color: var(--text-light);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.phil-item.open .phil-item-header .phil-chevron { transform: rotate(180deg); color: var(--accent); }
.phil-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.phil-item-body-inner {
  padding: 0 20px 18px 56px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ── Prev / Next nav ── */
.movie-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 8px;
}
.movie-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.movie-nav a:hover { color: var(--accent); }
.movie-nav a.next { text-align: right; margin-left: auto; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .movies-page-grid { grid-template-columns: repeat(2, 1fr); }
  .cast-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .movies-page-grid { grid-template-columns: 1fr; }
  .movie-hero { aspect-ratio: 4/3; }
}

/* ── v24 · The film's own image in the hero ──────────────────
   A blurred, darkened copy fills the banner and the poster sits on the
   right. Both are plain <img>s that remove themselves if the file is
   missing, leaving the gradient banner as it was. */
.movie-hero-bg {
  position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px);
  object-fit: cover; filter: blur(14px) brightness(.55) saturate(1.1); z-index: 0;
}
.movie-hero::before { z-index: 1; }
.movie-hero-inner { z-index: 2; padding-left: 24px; padding-right: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.movie-hero-text { min-width: 0; }
.movie-hero-poster {
  flex: 0 0 auto; width: 170px; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
}
.movie-hero-credit { position: absolute; right: 12px; bottom: 6px; z-index: 2; font-size: .66rem; color: rgba(255,255,255,.55); }
@media (max-width: 640px) {
  .movie-hero { aspect-ratio: auto; min-height: 260px; }
  .movie-hero-poster { width: 96px; }
}

/* v24 · Film posters on the listing: a blurred fill behind the poster itself. */
.movie-poster > img:not(.movie-poster-bg):not(.movie-poster-img) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.movie-poster-bg { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); object-fit: cover; filter: blur(12px) brightness(.6); }
.movie-poster-img { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); height: 84%; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 22px rgba(0,0,0,.45); z-index: 1; }
.movie-poster:has(.movie-poster-img) .poster-icon { display: none; }
.movie-poster:has(.movie-poster-img) .poster-title { max-width: 58%; }
