/* =====================================================
   Sistem Display Informasi - Stylesheet
   Tema: Navy #1e3a5f + Gold #d4a017
   Target: TV/Monitor 1080p+, fullscreen
   ===================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --warna-primer: #1e3a5f;
  --warna-aksen: #d4a017;
  --warna-bg: #0a1929;
  --warna-card: rgba(255, 255, 255, 0.08);
  --warna-card-border: rgba(212, 160, 23, 0.25);
  --warna-text: #ffffff;
  --warna-text-muted: rgba(255, 255, 255, 0.7);
  --warna-text-dim: rgba(255, 255, 255, 0.5);

  --header-h: 110px;
  --footer-h: 80px;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-arabic: 'Amiri', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html, body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-display);
  color: var(--warna-text);
  background: var(--warna-bg);
}

/* Background gradient + subtle pattern */
body {
  background:
    radial-gradient(ellipse at top left, rgba(212, 160, 23, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(30, 58, 95, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, #0a1929 0%, #0f2540 50%, #0a1929 100%);
}

#display-root {
  display: grid;
  grid-template-rows: var(--header-h) 1fr var(--footer-h);
  height: 100vh;
  position: relative;
}

/* ====================================================
   HEADER
   ==================================================== */
.di-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2rem;
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.95) 0%, rgba(30, 58, 95, 0.85) 100%);
  border-bottom: 2px solid var(--warna-aksen);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.di-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--warna-aksen) 50%, transparent 100%);
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.di-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.di-logo-wrap {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}

.di-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.di-logo-placeholder {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--warna-primer);
}

.di-header-title h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.di-header-title p {
  font-size: 0.95rem;
  color: var(--warna-text-muted);
  margin-top: 0.25rem;
}

/* Center: cuaca */
.di-cuaca-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(212, 160, 23, 0.1);
  border: 1px solid var(--warna-card-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.di-cuaca-icon { font-size: 2.5rem; line-height: 1; }
.di-cuaca-suhu { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.di-cuaca-desc { font-size: 0.85rem; color: var(--warna-text-muted); margin-top: 0.25rem; }

/* Right: clock */
.di-header-right { display: flex; justify-content: flex-end; }
.di-clock-box { text-align: right; }
.di-jam {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--warna-aksen);
  line-height: 1;
}
.di-tanggal {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.35rem;
  color: var(--warna-text);
}
.di-hijriyah {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  color: var(--warna-text-muted);
  margin-top: 0.15rem;
}

/* ====================================================
   MAIN
   ==================================================== */
.di-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow: hidden;
}

/* --- LEFT: slide stage --- */
.di-main-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.di-slide-stage {
  flex: 1;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--warna-card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.di-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
  padding: 3rem;
  text-align: center;
}

.di-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.di-slide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.di-slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 3rem 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: left;
}

.di-slide-text {
  z-index: 2;
  max-width: 90%;
}
.di-slide-text h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.di-slide-text h2 { font-size: 3rem; font-weight: 700; line-height: 1.15; }
.di-slide-text p  { font-size: 1.5rem; line-height: 1.5; opacity: 0.95; }

.di-slide-empty {
  background: linear-gradient(135deg, var(--warna-primer) 0%, #0a1929 100%);
  color: var(--warna-text-muted);
}

/* Slide dots indicator */
.di-slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.di-slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  cursor: default;
}

.di-slide-dot.active {
  background: var(--warna-aksen);
  width: 30px;
  border-radius: 5px;
}

/* --- RIGHT: cards --- */
.di-main-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
}

.di-card {
  background: var(--warna-card);
  border: 1px solid var(--warna-card-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.di-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: rgba(212, 160, 23, 0.12);
  border-bottom: 1px solid var(--warna-card-border);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.di-card-icon { font-size: 1.3rem; }
.di-card-meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--warna-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.di-card-body { padding: 1rem 1.25rem; }

/* Jadwal sholat */
.di-card-sholat { flex-shrink: 0; }

.di-sholat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.di-sholat-row:last-child { border-bottom: none; }
.di-sholat-row span { color: var(--warna-text-muted); font-weight: 500; }
.di-sholat-row strong { font-family: var(--font-mono); font-weight: 700; color: var(--warna-text); }

.di-sholat-row.next {
  background: rgba(212, 160, 23, 0.15);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  border-radius: 8px;
}
.di-sholat-row.next span { color: var(--warna-aksen); font-weight: 600; }
.di-sholat-row.next strong { color: var(--warna-aksen); }

.di-next-sholat {
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, var(--warna-aksen) 0%, #b8860b 100%);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.di-next-label { font-weight: 500; opacity: 0.8; font-size: 0.85rem; }
.di-next-value { font-weight: 800; font-size: 1.1rem; }

/* Galeri */
.di-card-galeri { flex: 1; min-height: 200px; max-height: 50%; }

.di-galeri-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.di-galeri-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.di-galeri-item.active { opacity: 1; }
.di-galeri-item img { width: 100%; height: 100%; object-fit: cover; }

.di-galeri-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
}
.di-galeri-caption h3 { font-size: 1.05rem; font-weight: 700; }
.di-galeri-caption p { font-size: 0.85rem; color: var(--warna-text-muted); margin-top: 0.25rem; }

/* Video */
.di-card-video { flex: 1; min-height: 200px; }
.di-video-stage { flex: 1; position: relative; background: #000; }
.di-video-stage iframe,
.di-video-stage video {
  width: 100%; height: 100%; border: none; display: block;
}

/* ====================================================
   FOOTER (running text)
   ==================================================== */
.di-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.85) 0%, rgba(30, 58, 95, 0.95) 100%);
  border-top: 2px solid var(--warna-aksen);
  overflow: hidden;
}

.di-footer-label {
  background: var(--warna-aksen);
  color: var(--warna-primer);
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 2px;
  position: relative;
}
.di-footer-label::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 20px solid var(--warna-aksen);
  border-top: 40px solid transparent;
  border-bottom: 40px solid transparent;
}

.di-marquee-wrap {
  overflow: hidden;
  padding-left: 2rem;
  position: relative;
}

.di-marquee {
  white-space: nowrap;
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 500;
  padding-left: 100%;
  animation: marquee 45s linear infinite;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.di-footer-right {
  padding: 0 1.5rem;
  font-size: 1rem;
  color: var(--warna-aksen);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ====================================================
   POPUP PENGUMUMAN PRIORITAS
   ==================================================== */
.di-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 4rem;
  transition: opacity 0.5s ease;
}

.di-popup.hidden { opacity: 0; pointer-events: none; }

.di-popup-content {
  max-width: 1200px;
  width: 100%;
  background: linear-gradient(135deg, var(--warna-primer) 0%, #0a1929 100%);
  border: 3px solid var(--warna-aksen);
  border-radius: 24px;
  padding: 3rem 4rem;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(212, 160, 23, 0.3);
  position: relative;
  overflow: hidden;
}

.di-popup-content::before {
  content: 'PENTING';
  position: absolute;
  top: 1rem;
  right: -3rem;
  background: var(--warna-aksen);
  color: #000;
  padding: 0.35rem 4rem;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 2px;
  transform: rotate(45deg);
}

.di-popup-content h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--warna-aksen);
}
.di-popup-content p { font-size: 1.5rem; line-height: 1.5; }
.di-popup-content img { max-width: 100%; max-height: 400px; margin: 1.5rem 0; border-radius: 12px; }

/* ====================================================
   RESPONSIVE - untuk layar < 1280px (admin preview, dsb)
   ==================================================== */
@media (max-width: 1279px) {
  .di-main { grid-template-columns: 1fr; }
  .di-slide-text h1 { font-size: 2.5rem; }
  .di-slide-text h2 { font-size: 2rem; }
  .di-slide-text p  { font-size: 1.1rem; }
  .di-marquee { font-size: 1.1rem; animation-duration: 30s; }
  .di-jam { font-size: 1.75rem; }
}
