/* ════════════════════════════════════════════════════════════
   YOUTUBE PAGE — youtube.css
   Diload via page_css.php ketika $page === 'youtube'
   Semua warna menggunakan variabel global dari custom.css.

   CATATAN:
   - Warna #FF0000 (YouTube red) tetap hardcode — brand color platform
   - vid-duration, play-circle, play-overlay tetap gelap — di atas foto
   ════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════
   1. PAGE HERO
   Dark  : foto gelap + dark overlay dari bawah
   Light : Split Tone — cream solid kiri → transparan kanan
   ════════════════════════════════════════════════════════════ */

.page-hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--bg-deep);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1611162616305-c69b3fa7fbe0?w=1400&q=80')
              center / cover no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease, filter 0.3s ease;
}

[data-theme="dark"] .page-hero-bg,
:root:not([data-theme]) .page-hero-bg {
  filter: grayscale(40%) brightness(0.28);
}

[data-theme="light"] .page-hero-bg {
  filter: brightness(0.82) saturate(0.55);
}

.page-hero:hover .page-hero-bg { transform: scale(1); }

.page-hero-overlay {
  position: absolute;
  inset: 0;
  transition: background 0.3s ease;
}

[data-theme="dark"] .page-hero-overlay,
:root:not([data-theme]) .page-hero-overlay {
  background: linear-gradient(
    to top,
    var(--bg-deep)           0%,
    rgba(8,8,8,0.55)         50%,
    rgba(8,8,8,0.20)         100%
  );
}

[data-theme="light"] .page-hero-overlay {
  background: linear-gradient(
    105deg,
    rgba(245,241,234,0.97)   0%,
    rgba(245,241,234,0.90)   30%,
    rgba(245,241,234,0.45)   55%,
    rgba(245,241,234,0.00)   72%
  );
}

[data-theme="light"] .page-hero {
  border-bottom: 1px solid var(--border-nav);
}

/* Grid texture — redup di light mode */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(212,168,67,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,168,67,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .page-hero::before { opacity: 0; }

.page-hero-content {
  position: relative;
  z-index: 10;
  padding: 0 64px 52px;
  width: 100%;
}

/* Breadcrumb */
.breadcrumb-kbc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.breadcrumb-kbc a {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-kbc a:hover { color: var(--gold); }

.breadcrumb-kbc span {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

[data-theme="light"] .breadcrumb-kbc a    { color: var(--text-muted); }
[data-theme="light"] .breadcrumb-kbc span { color: var(--gold-dark); }

.breadcrumb-sep { color: var(--border-gold); }

/* Title */
.page-hero-title {
  font-family: var(--font-alt);
  font-size: clamp(52px, 8vw, 100px);
  color: var(--text-primary);
  letter-spacing: 3px;
  line-height: 0.9;
  transition: color 0.3s ease;
}

/* Accent tetap YouTube red */
.page-hero-title .accent { color: #FF0000; }

[data-theme="light"] .page-hero-title { color: #1C1510; }

/* Entry animation */
.hero-entry {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.8s var(--ease-expo) forwards;
}

@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }


/* ════════════════════════════════════════════════════════════
   2. CHANNEL STRIP
   Dark: --bg-deep | Light: --bg-card
   ════════════════════════════════════════════════════════════ */

.channel-strip {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  transition: var(--transition-theme);
}

[data-theme="light"] .channel-strip { background: var(--bg-card); }

/* Avatar — tetap YouTube red */
.channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.channel-name {
  font-family: var(--font-alt);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--text-primary);
  line-height: 1;
  transition: color 0.3s ease;
}

.channel-subs {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 3px;
}

/* Subscribe button — tetap YouTube red */
.subscribe-yt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FF0000;
  color: #fff;
  border: none;
  padding: 9px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.22s;
  text-decoration: none;
}

.subscribe-yt:hover {
  background: #cc0000;
  transform: translateY(-2px);
  color: #fff;
}

.channel-stat {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-stat i { color: var(--gold); }

[data-theme="light"] .channel-stat i { color: var(--gold-dark); }


/* ════════════════════════════════════════════════════════════
   3. FEATURED EMBED
   Dark: --bg-card-2 | Light: --bg-card
   ════════════════════════════════════════════════════════════ */

.featured-section {
  background: var(--bg-card-2);
  padding: 64px 0 0;
  transition: var(--transition-theme);
}

[data-theme="light"] .featured-section { background: var(--bg-card); }

.featured-video-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  transition: border-color 0.3s ease;
}

[data-theme="light"] .featured-video-wrap {
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
}

/* 16:9 aspect ratio */
.video-embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Placeholder */
.video-placeholder {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--bg-input);
  cursor: pointer;
  overflow: hidden;
}

.video-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?w=1200&q=70') center / cover;
}

.video-placeholder-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8,8,8,0.62);
}

/* Play circle — tetap YouTube red */
.play-circle-yt {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  transition: transform 0.3s;
  position: relative;
  z-index: 1;
}

.play-circle-yt::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #FF0000;
  opacity: 0.3;
  animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
  0%   { transform: scale(1);   opacity: 0.3; }
  100% { transform: scale(2.2); opacity: 0; }
}

.video-placeholder:hover .play-circle-yt { transform: scale(1.1); }

/* Overlay title — selalu putih karena di atas foto gelap */
.video-title-overlay {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 0 24px;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* Featured info */
.featured-info { padding: 24px 0 64px; }

.featured-label {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #FF0000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.featured-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: #FF0000;
}

.featured-vid-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.featured-vid-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.85;
  font-weight: 300;
  max-width: 640px;
  transition: color 0.3s ease;
}

.vid-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.vid-meta-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.vid-meta-item i { color: var(--gold); }

[data-theme="light"] .vid-meta-item i { color: var(--gold-dark); }


/* ════════════════════════════════════════════════════════════
   4. TOOLBAR
   Dark: --bg-card-2 | Light: --bg-card
   ════════════════════════════════════════════════════════════ */

.yt-toolbar {
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition-theme);
}

[data-theme="light"] .yt-toolbar { background: var(--bg-card); }

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 11px 40px 11px 16px;
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.2s, background 0.3s ease, color 0.3s ease;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus         { border-color: var(--border-gold); }

[data-theme="light"] .search-input:focus { border-color: var(--border-nav); }

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 14px;
  pointer-events: none;
}

[data-theme="light"] .search-icon { color: var(--gold-dark); }

.filter-btn {
  padding: 10px 18px;
  border-radius: 40px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
  background: var(--gold-pale-md);
}


/* ════════════════════════════════════════════════════════════
   5. VIDEO GRID
   Dark: --bg-card-2 | Light: --bg-deep (#F5F1EA)
   ════════════════════════════════════════════════════════════ */

.videos-section {
  background: var(--bg-card-2);
  padding: 48px 0 80px;
  transition: var(--transition-theme);
}

[data-theme="light"] .videos-section { background: var(--bg-deep); }

.video-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r);
  overflow: hidden;
  transition: all 0.35s var(--ease-silk);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

[data-theme="light"] .video-card { background: var(--bg-page); }

.video-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
}

[data-theme="light"] .video-card:hover {
  box-shadow: 0 20px 48px rgba(0,0,0,0.08);
}

/* Thumb */
.video-thumb {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.video-thumb img {
  width: 100%;
  display: block;
  transition: all 0.5s;
}

[data-theme="dark"] .video-thumb img,
:root:not([data-theme]) .video-thumb img {
  filter: grayscale(15%) brightness(0.80);
}

[data-theme="light"] .video-thumb img {
  filter: grayscale(10%) brightness(0.90);
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

[data-theme="dark"] .video-card:hover .video-thumb img,
:root:not([data-theme]) .video-card:hover .video-thumb img {
  filter: grayscale(0%) brightness(0.90);
}

[data-theme="light"] .video-card:hover .video-thumb img {
  filter: grayscale(0%) brightness(1);
}

.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.5) 0%, transparent 50%);
}

/* Duration badge — selalu gelap (di atas foto) */
.vid-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
}

/* Play overlay — tetap YouTube red */
.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.video-card:hover .play-overlay { opacity: 1; }

.play-circle-sm {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

/* Category tag */
.vid-cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--gold);
  padding: 3px 9px;
  border-radius: 2px;
  font-weight: 700;
}

/* Card body */
.video-card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.vid-views {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.vid-views i { color: var(--gold); font-size: 10px; }

[data-theme="light"] .vid-views i { color: var(--gold-dark); }

.vid-date {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}


/* ════════════════════════════════════════════════════════════
   6. PAGINATION
   ════════════════════════════════════════════════════════════ */

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 48px 0 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.page-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

[data-theme="light"] .page-btn:hover {
  border-color: var(--border-nav);
  color: var(--gold-dark);
}

.page-btn.active {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}


/* ════════════════════════════════════════════════════════════
   7. SUBSCRIBE CTA
   Dark: --bg-deep | Light: --bg-card
   ════════════════════════════════════════════════════════════ */

.subscribe-cta {
  background: var(--bg-deep);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-theme);
}

[data-theme="light"] .subscribe-cta { background: var(--bg-card); }

/* Glow merah — tetap di kedua tema */
.subscribe-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(255,0,0,0.06) 0%, transparent 70%);
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

/* CTA span tetap YouTube red */
.cta-heading span { color: #FF0000; }

.cta-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  transition: color 0.3s ease;
}


/* ════════════════════════════════════════════════════════════
   8. RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 991.98px) {
  .yt-toolbar,
  .channel-strip { padding: 16px 24px; }
  .featured-info { padding: 20px 0 48px; }
  .video-card:hover { transform: none; box-shadow: none; }
}

@media (max-width: 575.98px) {
  .page-hero-content { padding: 0 20px 36px; }
  .yt-toolbar        { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-entry        { opacity: 1; transform: none; animation: none; transition: none; }
  .page-hero-bg      { transition: filter 0.3s ease; }
  .play-circle-yt::after { animation: none; }
}