/* === site-view.css ===
   Theme-aware news list + article view styling for movie site
   Uses same design tokens as style.css (glass, accent, shadows)
*/

/* Design tokens */
:root {
    --sv-text-primary: var(--text-primary, #f5f7ff);
    --sv-text-muted: var(--text-muted, #a3acce);
    --sv-accent: var(--accent, #8f6fff);
    --sv-accent-strong: var(--accent-strong, #ff8f6f);
    --sv-surface: var(--surface-glass, rgba(255,255,255,0.04));
    --sv-border: var(--border-subtle, rgba(255,255,255,0.07));
    --sv-card-shadow: var(--card-shadow, 0 20px 40px rgba(10,12,28,0.5));
    --sv-radius: 12px;
    --news-thumb-w: 108px;
    --news-thumb-h: 72px;
    --news-gap: 0.75rem;
  }
  
  /* ===============================
     NEWS LIST PAGE (index.php)
     =============================== */
  .page-content h1.news-heading {
    color: var(--sv-text-primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
  }
  
  .page-content p.news-subtitle {
    color: var(--sv-text-muted);
    margin: 0 0 1rem;
    font-size: 0.95rem;
  }
  
  /* News card layout */
  .news-card {
    display: block;
    border-radius: var(--sv-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--sv-surface);
    border: 1px solid var(--sv-border);
    box-shadow: 0 10px 28px rgba(3,6,23,0.45);
    transition: transform .15s ease, box-shadow .18s ease;
  }
  
  .news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sv-card-shadow);
  }
  
  /* Row layout */
  .news-card .row.g-0 {
    align-items: center;
    gap: var(--news-gap);
  }
  
  /* Thumbnail */
  .news-card .thumb {
    width: var(--news-thumb-w);
    height: var(--news-thumb-h);
    flex: 0 0 var(--news-thumb-w);
    overflow: hidden;
    display: block;
    border-right: 1px solid rgba(255,255,255,0.03);
    background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
  }
  
  .news-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
  }
  
  /* Card body */
  .news-card .card-body {
    padding: 0.6rem 0.9rem;
    color: var(--sv-text-primary);
  }
  
  .news-card .card-title {
    font-size: 1rem;
    margin: 0;
    line-height: 1.15;
    font-weight: 600;
  }
  
  .news-card .card-title a {
    color: var(--sv-accent);
    text-decoration: none;
  }
  
  .news-card .card-title a:hover {
    color: var(--sv-accent-strong);
    text-decoration: underline;
  }
  
  .news-card .excerpt {
    font-size: 0.92rem;
    color: var(--sv-text-muted);
    margin-top: 0.35rem;
  }
  
  .news-card .meta {
    font-size: 0.78rem;
    color: var(--sv-text-muted);
    margin-top: 0.25rem;
  }
  
  /* Responsive stacking */
  @media (max-width: 576px) {
    .news-card .row.g-0 {
      flex-direction: column;
      align-items: stretch;
    }
    .news-card .thumb {
      width: 100%;
      height: 160px;
      flex: 0 0 auto;
      border-right: none;
      border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .news-card .card-body {
      padding: 0.75rem;
    }
  }
  
  /* ===============================
     ARTICLE PAGE (view.php)
     =============================== */
  .news-article h1 {
    color: var(--sv-text-primary);
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  
  .news-article .text-muted {
    color: var(--sv-text-muted) !important;
    font-weight: 500;
    margin-bottom: 1.5rem;
  }
  
  .news-content {
    background: var(--sv-surface);
    border: 1px solid var(--sv-border);
    border-radius: calc(var(--sv-radius) + 4px);
    box-shadow: var(--sv-card-shadow);
    padding: 1.25rem;
    margin-bottom: 2rem;
  }
  
  /* Text readability */
  .news-content p,
  .news-content li {
    color: var(--sv-text-primary);
    line-height: 1.75;
    margin-bottom: 1rem;
  }
  
  /* Headings inside content */
  .news-content h2,
  .news-content h3,
  .news-content h4 {
    color: var(--sv-text-primary);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
  
  /* Images, videos, iframes */
  .news-content img,
  .news-content video,
  .news-content iframe {
    display: block;
    max-width: 100%;
    height: auto;
    border: none !important;
    outline: none !important;
    border-radius: 12px;
    margin: 1rem 0;
    background: rgba(255,255,255,0.03);
  }
  
  .news-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
  }
  
  /* Blockquotes */
  .news-content blockquote {
    margin: 1rem 0;
    padding: 0.9rem 1.2rem;
    border-left: 3px solid var(--sv-accent);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    color: var(--sv-text-primary);
    font-style: italic;
  }
  
  /* Code snippets or pre blocks */
  .news-content pre,
  .news-content code {
    background: rgba(255,255,255,0.06);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    color: var(--sv-accent-strong);
    font-family: 'Courier New', monospace;
    overflow-x: auto;
  }
  
  /* Links inside article */
  .news-content a {
    color: var(--sv-accent);
    text-decoration: underline;
    transition: color 0.2s ease;
  }
  .news-content a:hover {
    color: var(--sv-accent-strong);
  }
  
  /* Responsive article content */
  @media (max-width: 720px) {
    .news-content {
      padding: 1rem;
    }
    .news-article h1 {
      font-size: 1.75rem;
    }
  }

  /* Add/override grid thumbnail rules (specific for the news-grid layout) */
.news-grid .news-item .thumb {
    display: block;
    width: 100%;
    height: 200px;            /* fixed visual height */
    overflow: hidden;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.01));
}
.news-grid .news-item .thumb img,
.news-grid .news-item img.thumb-img {
    width: 100%;
    height: 200px;           /* enforce crop height */
    object-fit: cover;
    display: block;
}

/* If you want the thumbnail column to aim for ~370px at desktop, limit max-width of each item */
@media (min-width: 1100px) {
    .news-grid .news-item { flex: 0 0 calc(33.333% - 16px); max-width: calc(33.333% - 16px); }
    /* optionally cap the column to roughly 370px */
    .news-grid .news-item { max-width: 370px; flex-basis: calc(33.333% - 16px); }
}
