/* =========================
   GLOBAL RAMADHAN STYLE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  color: #111;

  background:
    radial-gradient(circle at 30% 20%, rgba(59,130,246,0.25), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(30,64,175,0.35), transparent 50%),
    linear-gradient(
      180deg,
      #0f172a 0%,
      #1e293b 40%,
      #1e3a8a 70%,
      #1d4ed8 100%
    );

  background-attachment: fixed;
}


/* container utama */
.ramadhan-box {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

/* judul */
.ramadhan-box h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* lokasi */
#ramadhan-city {
  color: #555;
  margin-bottom: 20px;
}

/* =========================
   CARD IMSAK SUBUH MAGHRIB
========================= */

.ramadhan-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.ramadhan-card {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  padding: 20px 30px;
  border-radius: 14px;
  min-width: 140px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: 0.25s;
}

.ramadhan-card:hover {
  transform: translateY(-4px);
}

.ramadhan-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  opacity: 0.85;
}

.ramadhan-card span {
  font-size: 1.6rem;
  font-weight: bold;
}

/* =========================
   COUNTDOWN
========================= */

#ramadhan-next {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 10px;
}

/* =========================
   DOA BOX
========================= */

.ramadhan-dua {
  margin: 25px auto;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  max-width: 650px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.dua-arab {
  font-size: 1.4rem;
  direction: rtl;
  margin-bottom: 8px;
}

.dua-arti {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* =========================
   TABLE RAMADHAN
========================= */

.ramadhan-table-box {
  margin-top: 30px;
}

.ramadhan-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.ramadhan-table thead {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111;
}

.ramadhan-table th {
  padding: 12px;
  font-weight: 600;
}

.ramadhan-table td {
  padding: 10px;
}

.ramadhan-table tbody tr {
  background: #0f172a;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ramadhan-table tbody tr:nth-child(even) {
  background: #111827;
}

/* highlight hari ini */
.ramadhan-table tbody tr.today {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111;
  font-weight: bold;
}

/* =========================
   DARK MODE
========================= */

body.dark .ramadhan-box {
  background: rgba(15, 23, 42, 0.9);
  color: white;
}

body.dark .ramadhan-table tbody tr {
  background: #020617;
}

body.dark .ramadhan-table tbody tr:nth-child(even) {
  background: #020617;
}

/* =========================
   SAHUR MODE
========================= */

body.sahur-mode {
  background: linear-gradient(
    180deg,
    #0f172a 0%,
    #1e293b 40%,
    #064e3b 100%
  );
  background-attachment: fixed;
  min-height: 100vh;
}

/* =========================
   IFTAR MODE
========================= */

body.iftar-mode{
background: linear-gradient(
180deg,
#2b0f05 0%,
#7c2d12 35%,
#c2410c 70%,
#ea580c 100%
);
background-attachment: fixed;
}
body.sahur-mode,
body.iftar-mode {
  background-size: 200% 200%;
  animation: bgFlow 20s ease infinite;
}

@keyframes bgFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.site-footer {
  background: #081223;
  text-align: center;
  padding: 25px 15px;
  font-size: 15px;
  color: #e7eaed;
  font-family: "Source Serif 4", serif;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  margin: 0 10px;
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  opacity: 0.8;
}

/* =========================
   NAVBAR RAMADHAN PREMIUM
========================= */
.ramadhan-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;

  background: linear-gradient(
    135deg,
    rgba(2,6,23,0.85),
    rgba(15,23,42,0.85),
    rgba(30,41,59,0.85)
  );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow: 0 8px 25px rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(255, 215, 100, 0.18);
  overflow: hidden;
}

/* bintang animasi */
.ramadhan-navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 70% 40%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 70%, rgba(255,255,255,0.3), transparent);
  opacity: 0.35;
  animation: starMove 40s linear infinite;
  pointer-events: none;
}

@keyframes starMove {
  from { transform: translateY(0); }
  to { transform: translateY(40px); }
}

/* logo */
.ramadhan-navbar .logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #facc15;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ramadhan-navbar .logo span {
  color: #fff;
}

/* menu */
.ramadhan-navbar .nav-links {
  display: flex;
  gap: 20px;
}

.ramadhan-navbar .nav-links a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.25s ease;
  position: relative;
}

.ramadhan-navbar .nav-links a:hover {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  transform: translateY(-1px);
}

/* theme button */
#themeToggle {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border: none;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(250, 204, 21, 0.35);
  transition: 0.25s;
}

#themeToggle:hover {
  transform: translateY(-2px) scale(1.05);
}

/* =========================
   HERO RAMADHAN
========================= */
.ramadhan-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      rgba(2,6,23,0.7),
      rgba(2,6,23,0.9)
    ),
    url("https://images.unsplash.com/photo-1564769625905-50e93615e769?auto=format&fit=crop&w=1600&q=80")
    center/cover no-repeat;
}

/* overlay glow */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(250,204,21,0.25),
      transparent 60%
    );
  pointer-events: none;
}

/* konten */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 20px;
}

.ramadhan-hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 24px;
}

/* tombol */
.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.25s;
  cursor: pointer;
  border: none;
}

.hero-btn.primary {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
  font-weight: 600;
}

.hero-btn.primary:hover {
  transform: translateY(-2px);
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

.hero-btn.secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* ===============================
   COUNTDOWN GLOW BOX
================================= */

.ramadhan-countdown {
  margin: 20px 0;
}

/* =========================
   HERO COUNTDOWN MODERN
========================= */

.countdown-box {
  display: inline-block;
  padding: 18px 40px;
  margin-top: 20px;

  font-size: 22px;
  font-weight: 600;

  color: #1e293b;

  background: linear-gradient(
    135deg,
    #facc15,
    #f59e0b
  );

  border-radius: 16px;

  box-shadow:
    0 10px 30px rgba(250, 204, 21, 0.35),
    0 0 20px rgba(250, 204, 21, 0.25);

  transition: all 0.3s ease;
}

.countdown-box:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 35px rgba(250, 204, 21, 0.45),
    0 0 25px rgba(250, 204, 21, 0.35);
}

@keyframes glowPulse {
  0% {
    box-shadow:
      0 0 10px rgba(255, 200, 80, 0.2),
      inset 0 0 6px rgba(255, 215, 120, 0.1);
  }
  50% {
    box-shadow:
      0 0 22px rgba(255, 200, 80, 0.45),
      inset 0 0 12px rgba(255, 215, 120, 0.25);
  }
  100% {
    box-shadow:
      0 0 10px rgba(255, 200, 80, 0.2),
      inset 0 0 6px rgba(255, 215, 120, 0.1);
  }
}

.hero-btn.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

#today-row {
  background: rgba(255, 216, 107, 0.15);
  border-left: 4px solid #ffd86b;
  font-weight: 600;
}

.ramadhan-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ramadhan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* =========================
   MOBILE CLEAN RAMADHAN
========================= */
@media (max-width: 768px) {

  body {
    font-size: 15px;
  }

  /* HERO */
  .ramadhan-hero {
    padding: 70px 20px 40px;
    text-align: center;
  }

  .ramadhan-hero h1 {
    font-size: 1.8rem;
  }

  .hero-sub {
    font-size: 0.95rem;
    opacity: 0.9;
  }

  #hero-countdown {
    font-size: 1.2rem;
    padding: 10px 16px;
    margin-top: 12px;
  }

  /* tombol hero */
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
  }

  .hero-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  /* kartu waktu */
  .ramadhan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .ramadhan-card {
    padding: 18px;
    border-radius: 14px;
  }

  .ramadhan-card span {
    font-size: 1.6rem;
    font-weight: 700;
  }

  /* box jadwal */
  .ramadhan-box {
    padding: 25px 15px;
    border-radius: 16px;
    margin: 20px 10px;
  }

  .ramadhan-box h1 {
    font-size: 1.4rem;
  }

  /* tabel scroll */
  .table-scroll {
    overflow-x: auto;
    border-radius: 12px;
  }

  table {
    min-width: 500px;
    font-size: 0.9rem;
  }

  /* footer */
  .site-footer {
    font-size: 0.8rem;
    padding: 18px 10px;
  }
}


/* ACTIVE PRAYER CARD */
.ramadhan-card.active {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111;
  box-shadow: 0 0 20px rgba(255, 200, 0, 0.5);
  transform: translateY(-3px);
}

.ramadhan-card.active h3,
.ramadhan-card.active span {
  color: #111;
}

.qibla-box {
  margin-top: 30px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: white;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#qiblaDirection {
  font-size: 22px;
  font-weight: bold;
  margin-top: 10px;
}

.hijri-date {
  margin-top: 8px;
  font-size: 1rem;
  color: #ffe08a;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* =========================
   BODY DARK MODE
========================= */
body.dark {
  background: #020617;
  color: #e5e7eb;
}

/* =========================
   HERO FINAL DARK
========================= */
body.dark .ramadhan-hero {
  background:
    linear-gradient(
      to bottom,
      rgba(2, 6, 23, 0.85),
      rgba(2, 6, 23, 0.95)
    ),
    url("../assets/images/kaaba.png") center/cover no-repeat;
}

body.dark .hero-sub {
  color: #cbd5f5;
}

body.dark .countdown-box,
body.dark #ramadhan-next {
  color: #0f172a;
}

/* =========================
   RAMADHAN NEXT BOX
========================= */

#ramadhan-next {
  display: inline-block;
  padding: 16px 35px;
  margin-top: 30px;

  font-size: 20px;
  font-weight: 600;

  color: #1e293b;

  background: linear-gradient(
    135deg,
    #facc15,
    #f59e0b
  );

  border-radius: 14px;

  box-shadow:
    0 8px 25px rgba(250, 204, 21, 0.3),
    0 0 18px rgba(250, 204, 21, 0.2);

  transition: all 0.3s ease;
}

#ramadhan-next:hover {
  transform: translateY(-2px);
}

/* =========================
   BOX & TABLE DARK
========================= */
body.dark .ramadhan-box {
  background: #020617;
}

body.dark #ramadhan-city {
  color: #94a3b8;
}

body.dark .ramadhan-card {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
}

body.dark .ramadhan-countdown-box {
  color: #e5e7eb;
}

body.dark .ramadhan-table th {
  background: #facc15;
  color: #111827;
}

body.dark .ramadhan-table td {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark .ramadhan-table tr:nth-child(even) td {
  background: #020617;
}

/* =========================
   NAVBAR DARK
========================= */
body.dark .ramadhan-navbar {
  background: rgba(2, 6, 23, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.doa-harian-box {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.doa-harian-box h3 {
  margin-bottom: 10px;
}

/* =========================
   NAVBAR DASAR
   ========================= */
.ramadhan-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(135deg, #0b1d3a, #0e2a57);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

/* =========================
   NAVBAR MOBILE FIX
   ========================= */
@media (max-width: 768px) {

  .ramadhan-navbar {
    min-height: 90px;
    padding-bottom: 12px;
    position: relative;
  }

  .ramadhan-navbar {
  flex-wrap: wrap;
}

  .logo {
    font-size: 16px;
  }

  .prayer-mini {
    align-self: flex-start;
    font-size: 13px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
  }

  #themeToggle {
    position: absolute;
    right: 12px;
    top: 10px;
  }

  /* BAGIAN MENU UTAMA */
  .nav-links {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding-top: 8px;
  }

  .nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: white;
  }
}

/* ======================
   HIDE PRAYER MINI MOBILE
====================== */
@media (max-width: 768px) {
  .prayer-mini {
    display: none !important;
  }
}

/* AUTO RTL SAAT GOOGLE SET ARAB */
html[lang="ar"] body {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .hero,
html[lang="ar"] .navbar,
html[lang="ar"] .quick-menu,
html[lang="ar"] .article-content {
  text-align: right;
}

.doa-arab {
  font-size: 20px;
  direction: rtl;
  text-align: center;
  line-height: 2;
  font-family: "Amiri", serif;
  margin-bottom: 10px;
}

.doa-id {
  font-size: 14px;
  margin-bottom: 6px;
  color: #b1b1b1;
}

.doa-en {
  font-size: 13px;
  font-style: italic;
  color: #dde1e7;
}

body.dark .doa-harian-box {
  background: linear-gradient(
    135deg,
    #0f172a,
    #1e3a8a
  );
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark .doa-harian-box h3 {
  color: #f8fafc;
}

body.dark #doa-harian {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.8;
}

.scroll-to-top{
  position: fixed;

  left: 18px;
  bottom: 26px;

  width: 42px;
  height: 36px;

  border: none;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  background: linear-gradient(135deg,#ef4444,#dc2626);

  color: white;

  box-shadow:
    0 6px 16px rgba(0,0,0,0.25),
    0 3px 8px rgba(239,68,68,0.35);

  opacity: 0;
  visibility: hidden;

  transform: translateY(14px);
  transition: all 0.28s ease;

  z-index: 999;
  pointer-events: none;
}

.scroll-to-top svg{
  width: 16px;
  height: 16px;
}

.scroll-to-top.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover{
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.3),
    0 6px 14px rgba(239,68,68,0.45);
}

.scroll-to-top:active{
  transform: scale(0.95);
}