/* ============================================================
   movie-detail.css
   Styles for /movie/{slug} - all classes used in movie-detail.php
   Depends on theme.css variables.
   ============================================================ */

/* -- Hero --------------------------------------------------- */

.movie-hero {
    position: relative;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    padding: 40px 0 36px;
    border-bottom: 1px solid var(--border);
}

.movie-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7,19,24,.65) 0%,
        rgba(7,19,24,.92) 60%,
        var(--bg) 100%
    );
    pointer-events: none;
}

.movie-hero-no-backdrop {
    background-color: var(--bg-card-alt);
}
.movie-hero-no-backdrop::before {
    background: none;
}

.movie-hero .container { position: relative; z-index: 1; }

.movie-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 640px) {
    .movie-hero-grid {
        grid-template-columns: 200px 1fr;
        gap: 36px;
        align-items: start;
    }
}
@media (min-width: 1024px) {
    .movie-hero-grid {
        grid-template-columns: 240px 1fr;
        gap: 48px;
    }
}

/* Poster column */
.movie-poster-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.movie-poster {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 2/3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
@media (min-width: 640px) { .movie-poster { max-width: none; width: 100%; } }
.movie-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.btn-play-trailer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: rgba(0,201,177,.12);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
    max-width: 200px;
}
.btn-play-trailer:hover { background: rgba(0,201,177,.2); }
.btn-play-trailer svg  { color: var(--accent); }

/* Info column */
.movie-info-col { min-width: 0; }

.movie-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-strong);
    line-height: 1.1;
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}
@media (min-width: 768px) { .movie-title { font-size: 36px; } }

.movie-year {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
}
.movie-original-title { font-size: 13px; color: var(--text-muted); margin: 0 0 8px; }
.movie-tagline {
    font-size: 14px;
    font-style: italic;
    color: var(--accent);
    margin: 0 0 14px;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
}

/* Genre tags */
.movie-meta-row { margin-bottom: 12px; }
.meta-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-tag {
    display: inline-block;
    padding: 4px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.genre-tag:hover { border-color: var(--accent-border); color: var(--accent); }

/* Quick meta row */
.movie-quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--text-muted);
}
.quick-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 600;
}
.quick-meta-item.certificate { background: var(--accent-faint); color: var(--accent); border-color: var(--accent-border); }

/* Ratings row */
.movie-ratings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.rating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 64px;
    text-align: center;
    gap: 2px;
}
.rating-card strong { font-size: 20px; font-weight: 900; color: var(--text-strong); line-height: 1; }
.rating-card small  { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.rating-card .vote-count { font-size: 10px; color: var(--text-muted); }
.rating-primary { border-color: var(--accent-border); }
.rating-primary strong { color: var(--accent); }
.safety-good   { border-color: rgba(34,197,94,.3); }
.safety-good strong { color: #22c55e; }
.safety-medium { border-color: rgba(245,181,63,.3); }
.safety-medium strong { color: var(--gold); }
.safety-low    { border-color: rgba(231,76,60,.3); }
.safety-low strong { color: var(--danger); }

/* Overview and credits */
.movie-overview {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 14px;
}
.movie-credit {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 6px;
}
.movie-credit strong { color: var(--text); }

/* -- Content area ------------------------------------------- */

.movie-content { padding: 36px 0 72px; }

.content-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}
.content-section:last-child { border-bottom: 0; }

.section-heading {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-strong);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-heading svg { color: var(--accent); }

/* -- Where to Watch ----------------------------------------- */

.watch-section { }
.watch-subgroup { margin-bottom: 20px; }
.watch-subtitle {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.watch-platforms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.watch-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    font-size: 13px;
}
.watch-platform-card:hover { border-color: var(--accent-border); }
.watch-platform-card strong { font-size: 13px; color: var(--text); }
.watch-availability { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.watch-free       { color: #22c55e; }
.watch-subscription { color: var(--accent); }
.watch-rent,
.watch-buy        { color: var(--gold); }
.watch-price { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.watch-audio { opacity: 0.85; }

.telecom-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.telecom-list li {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.telecom-bundle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 8px;
    background: var(--accent-faint);
    border: 1px solid var(--accent-border);
    border-radius: 4px;
    color: var(--accent);
}

/* -- Story -------------------------------------------------- */

.story-block { margin-bottom: 16px; }
.story-block h3 { font-size: 14px; font-weight: 700; color: var(--text-muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.story-block p  { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin: 0; }

/* -- Cast grid ---------------------------------------------- */

.cast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (min-width: 480px) { .cast-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) { .cast-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1024px) { .cast-grid { grid-template-columns: repeat(8, 1fr); } }

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 10px 6px;
    border-radius: 8px;
    transition: background 0.15s;
}
.cast-card:hover { background: var(--bg-card); }

.cast-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card-alt);
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.cast-photo img { width: 100%; height: 100%; object-fit: cover; }

.cast-card strong { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; }
.cast-card small  { font-size: 11px; color: var(--text-muted); }

/* -- Critic Reviews ----------------------------------------- */

.critic-reviews-public { display: flex; flex-direction: column; gap: 14px; }
.critic-review-public-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 18px;
}
.critic-review-public-card header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.critic-review-public-card header strong { font-size: 14px; color: var(--text); }
.publication { font-size: 12px; color: var(--text-muted); }
.rating-pill {
    padding: 2px 8px;
    background: var(--accent-faint);
    border: 1px solid var(--accent-border);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}
.verdict-tag {
    display: inline-block;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(245,181,63,.12);
    border: 1px solid rgba(245,181,63,.25);
    border-radius: 4px;
    color: var(--gold);
    margin-bottom: 8px;
}
.critic-review-public-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 6px 0; }
.read-full { font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; display: inline-block; margin-top: 6px; }
.read-full:hover { text-decoration: underline; }

/* -- Trailers ----------------------------------------------- */

.trailers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px)  { .trailers-grid { grid-template-columns: repeat(2, 1fr); } }

.video-embed {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card-alt);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* -- Merchandise -------------------------------------------- */

.merch-public-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 480px)  { .merch-public-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .merch-public-grid { grid-template-columns: repeat(4, 1fr); } }

.merch-public-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    font-size: 13px;
    font-weight: 700;
}
.merch-public-card:hover { border-color: var(--accent-border); }
.merch-image { width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--bg-card-alt); }
.merch-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.merch-type-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.merch-public-price { font-size: 14px; font-weight: 800; color: var(--accent); }

/* -- Trivia / Story grid ------------------------------------ */

.trivia-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) { .trivia-grid { grid-template-columns: repeat(2, 1fr); } }

.trivia-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}
.trivia-block h3 { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.trivia-block p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* -- Crew --------------------------------------------------- */

.crew-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 640px)  { .crew-list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .crew-list { grid-template-columns: repeat(4, 1fr); } }

.crew-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    font-size: 13px;
}
.crew-item:hover { border-color: var(--accent-border); }
.crew-item strong { font-weight: 700; color: var(--text); }
.crew-item small  { font-size: 11px; color: var(--text-muted); }

/* -- Production Details ------------------------------------- */

.production-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 480px) { .production-details { grid-template-columns: repeat(2, 1fr); } }

.prod-row {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.prod-row strong { color: var(--text); }

/* -- Similar movies ----------------------------------------- */

.similar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 480px)  { .similar-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .similar-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .similar-grid { grid-template-columns: repeat(6, 1fr); } }

.similar-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s;
}
.similar-card:hover { transform: translateY(-3px); }
.similar-poster { aspect-ratio: 2/3; overflow: hidden; border-radius: 6px; background: var(--bg-card-alt); }
.similar-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-card strong { font-size: 12px; font-weight: 700; color: var(--text); }
.similar-card small  { font-size: 11px; color: var(--text-muted); }

/* -- Parents guide ------------------------------------------ */

.parents-guide-block {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

/* -- External link ------------------------------------------ */

.external-link {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    word-break: break-all;
    padding: 4px 0;
}

/* -- Media sub-sections ------------------------------------- */
.media-sub {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.media-sub:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.media-sub-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 14px;
}
/* -- Visual Improvements ------------------------------------ */

/* Better spacing for hero on mobile */
@media (max-width: 639px) {
    .movie-hero { padding: 28px 0 24px; }
    .movie-poster-col { align-items: center; }
    .movie-poster { max-width: 180px; }
    .movie-title { font-size: 22px; text-align: center; justify-content: center; }
    .movie-meta-row { justify-content: center; }
    .meta-genres { justify-content: center; }
    .movie-quick-meta { justify-content: center; }
    .movie-ratings-row { justify-content: center; }
    .movie-overview { text-align: center; }
    .movie-credit { text-align: center; }
}

/* Smooth section transitions */
.content-section {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Better cast card hover */
.cast-card:hover .cast-photo {
    border-color: var(--accent-border);
}

/* Better trailer button */
@media (min-width: 640px) {
    .btn-play-trailer { max-width: none; }
}

/* Better similar movie cards */
.similar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0 0 8px;
}
.similar-card strong,
.similar-card small {
    padding: 0 8px;
}
