/* ====================================================================================================== */
/* V7-HEADER
 * Version:  v1.3.0
 * Issued:   2026-03-01
 * File:     mamadex-videos.css
 * Path:     assets/css/mamadex/partials/mamadex-videos.css
 * Author:   Buktika Command Team
 * Owner:    Buktika — Binka
 * Purpose:  Layout and styling for the MamaDEX explainer videos section.
 *           Section renders inside the canonical .sdx-card-section shell defined
 *           in global.css. This file owns only the internal layout: video grid,
 *           video-card structure, and thumbnail trigger area.
 *           All selectors scoped under .page-mamadex per V7.1 §4.2.
 * Type:     CSS stylesheet
 * License:  © Buktika, 2026. All rights reserved.
 * ISO Reference: ISO/IEC 15897, ISO 27001
 * Source Naming Standard: Buktika v7.1 (ISO Aligned)
 *
 * ChangeLog:
 *   v1.3.0 (2026-03-01): Design System v4.0.0 / Colour Map v3.8.0 compliance rewrite.
 *     REMOVED - .page-mamadex .mamadex-videos shell override block entirely.
 *               width: calc(100vw - 40px), max-width: none, border-radius: 28px,
 *               background: rgba(255,255,252,0.96), border, box-shadow all deleted.
 *               sdx-card-section in global.css owns the section shell. Page CSS
 *               MUST NOT redefine section geometry (Design System v4.0.0 §4.4).
 *     REMOVED - .mamadex-videos .videos-header position:static / z-index:auto block.
 *               Symptom-suppression for a sticky header that never existed in this
 *               context. Dead code. Deleted.
 *     REMOVED - .mamadex-videos .videos-header * transform:none block. Same reason.
 *     REMOVED - .mamadex-videos .videos-header .intro glass-pill treatment.
 *               backdrop-filter glass is restricted to lightbox captions on the dark
 *               overlay backdrop (Colour Map v3.8.0 §8.8.6). A glass pill on body copy
 *               inside a white card surface is an anti-pattern.
 *     FIXED   - .video-card background: rgba(255,252,244,0.96) → var(--card).
 *               Hard rule: no hardcoded hex/rgba for any tokenisable colour (§2.3).
 *     FIXED   - .video-card border: rgba(211,196,170,0.55) → var(--border).
 *               Same rule.
 *     FIXED   - .video-card-title font-size: 17px → 1.0625rem (Unit Standard §15.2).
 *     FIXED   - .video-card-copy .muted font-size: 16px → 1rem (Unit Standard §15.2).
 *     FIXED   - .mamadex-videos .videos-header h2 font-size clamp: px → rem
 *               (Unit Standard §15.2).
 *     FIXED   - All selectors now scoped under .page-mamadex (§4.2 scope rule).
 *     ADDED   - .video-card border-left: 4px solid var(--page-accent) — canonical
 *               card accent always at rest (Design System v4.0.0 §6).
 *     ADDED   - .video-card hover: translateY(-3px) + shadow only. No border change
 *               (Design System v4.0.0 §6 canonical hover rule).
 *   v1.2.1 (2026-02-23): V7.1 header compliance and muted fallback fix.
 *   v1.2.0 (2025-11-18): Original version.
 */
/* ====================================================================================================== */

/* ======================================================================
   VIDEO GRID
   Two columns >= 1280px, one column below.
   Lives inside .sdx-card-section (global.css owns the shell).
   ====================================================================== */

.page-mamadex .mamadex-videos .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.875rem;
}

@media (max-width: 1280px) {
  .page-mamadex .mamadex-videos .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ======================================================================
   VIDEO CARD
   Canonical card pattern: border-left accent always at rest.
   Hover = lift + shadow only. No border change (Design System v4.0.0 §6).
   ====================================================================== */

.page-mamadex .mamadex-videos .video-card {
  display: block;
  background: var(--card);
  border-radius: 0.75rem;
  padding: 1.125rem 1.125rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--page-accent); /* PIL-03 §6: canonical card accent — amber, not primary. */
  box-shadow: var(--card-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.page-mamadex .mamadex-videos .video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

/* ======================================================================
   CARD TITLE ROW
   Full-width, above the main row.
   ====================================================================== */

.page-mamadex .mamadex-videos .video-card-title {
  margin: 0 0 0.625rem;
  font-family: var(--headline-font);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
}

/* ======================================================================
   MAIN ROW — text + thumbnail side by side
   Below 1200px: stack, image first (column-reverse).
   ====================================================================== */

.page-mamadex .mamadex-videos .video-card-main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.125rem;
}

@media (max-width: 1200px) {
  .page-mamadex .mamadex-videos .video-card-main {
    flex-direction: column-reverse;
    gap: 0.875rem;
  }
}

/* Copy block */
.page-mamadex .mamadex-videos .video-card-copy {
  flex: 1 1 auto;
}

.page-mamadex .mamadex-videos .video-card-copy .muted {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
  color: var(--muted);
}

/* ======================================================================
   THUMBNAIL AREA
   Wide side-by-side: 52% of card width.
   Stacked: full card width.
   ====================================================================== */

.page-mamadex .mamadex-videos .video-card-thumb {
  flex: 0 0 52%;
  max-width: 52%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1200px) {
  .page-mamadex .mamadex-videos .video-card-thumb {
    flex: 0 0 auto;
    max-width: 100%;
    justify-content: flex-start;
  }
}

/* Trigger button fills the thumb column */
.page-mamadex .mamadex-videos .video-thumb-button {
  width: 100%;
  max-width: 100%;
  display: inline-flex;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

.page-mamadex .mamadex-videos .video-thumb-button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* ======================================================================
   DARK MODE
   Card surface handled globally by themes.css [data-theme="dark"] .sdx-card-section.
   Border-left accent remains var(--page-primary) — mama-violet reads correctly
   on dark card surface.
   ====================================================================== */

[data-theme="dark"] .page-mamadex .mamadex-videos .video-card {
  border-color: rgba(245, 176, 20, 0.20);
}

[data-theme="dark"] .page-mamadex .mamadex-videos .video-card-title {
  color: var(--sdx-color-mama-amber);
}

/* ======================================================================
   NARROW PHONE
   ====================================================================== */

@media (max-width: 600px) {
  .page-mamadex .mamadex-videos .video-card {
    padding: 1rem 0.875rem 1.125rem;
  }

  .page-mamadex .mamadex-videos .video-card-thumb {
    margin-top: 0.375rem;
  }
}
