/* ==================== GOLGOTANEWS WIDGET CSS ==================== */
/* --- 1. TRANSISI & ASAS --- */
body, div, section, article, main, p, li, span, h1, h2, h3 {
  transition: background-color 0.8s ease, color 0.5s ease !important;
}

/* Progress bar atas - NEON SOLID untuk semua mode */
#hn-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: #48FF00; /* neon solid */
  box-shadow: 0 0 8px rgba(72, 255, 0, 0.5);
  z-index: 10001;
  transition: width 0.1s;
}

/* --- 2. CONTAINER AUTO-HIDE --- */
.hn-floating-ui {
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 1;
  visibility: visible;
}
.hn-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Posisi Tombol (dipertahankan) */
.hn-darkmode-toggle, #hn-back-to-top {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #333 !important;
  border: 1px solid #444 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  transition: all 0.3s ease !important;
}

.hn-darkmode-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
#hn-back-to-top {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 9999;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* MOD GELAP */
body.hn-dark .hn-darkmode-toggle,
body.hn-dark #hn-back-to-top {
  background: rgba(30, 30, 30, 0.95) !important;
  color: #fff !important;
  border: 1px solid #f5f5f5 !important;
}

body.hn-dark,
body.hn-dark div,
body.hn-dark section,
body.hn-dark article,
body.hn-dark main {
  background-color: #000 !important;
  color: #f5f5f5 !important;
}

/* ===== POP-UP TIGA BARIS ===== */
#hn-popup-islami {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2a5f3a;
  color: white;
  padding: 20px 25px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: none;
  z-index: 100000;
  max-width: 320px;
  animation: slideIn 0.4s ease-out;
  border: 1px solid #FFD700;
  direction: rtl;
  text-align: center;
}

body.hn-dark #hn-popup-islami {
  background: #1e3a2a;
  border-color: #4eff9e;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#hn-popup-islami .bismillah-symbol {
  font-size: 32px;
  color: #FFD700;
  margin-bottom: 15px;
  line-height: 1.2;
}

#hn-popup-islami .salam-lengkap {
  font-size: 20px;
  color: white;
  margin-bottom: 15px;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255,215,0,0.3);
  padding-bottom: 15px;
}

#hn-popup-islami .welcome-message {
  font-size: 18px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr;
}

#hn-popup-islami .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

#hn-popup-islami .close-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

/* ===== LOADING ANIMASI ISLAMI ===== */
#hn-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 100000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
body.hn-dark #hn-loading {
  background: #000;
}
.hn-loading-content {
  text-align: center;
  direction: rtl;
  max-width: 90%;
}
.hn-loading-symbol {
  font-size: 48px;
  color: #FFD700;
  margin-bottom: 20px;
  animation: fadeIn 0.8s;
}
.hn-loading-salam1 {
  font-size: 28px;
  color: #006400;
  margin-bottom: 10px;
  animation: fadeIn 0.8s 0.2s both;
}
.hn-loading-salam2 {
  font-size: 24px;
  color: #006400;
  margin-bottom: 20px;
  animation: fadeIn 0.8s 0.4s both;
}
body.hn-dark .hn-loading-salam1,
body.hn-dark .hn-loading-salam2 {
  color: #4eff9e;
}
#hn-loading-logo {
  font-size: 36px;
  font-weight: bold;
  color: #006400;
  margin-bottom: 15px;
  direction: ltr;
  font-family: monospace;
  min-height: 50px;
}
body.hn-dark #hn-loading-logo {
  color: #4eff9e;
}
.hn-loading-tagline {
  font-size: 20px;
  color: #333;
  margin: 10px 0;
  direction: ltr;
  opacity: 0;
  animation: fadeIn 0.8s 2.6s forwards;
}
body.hn-dark .hn-loading-tagline {
  color: #ccc;
}
.hn-loading-divider {
  width: 0;
  height: 2px;
  background: #006400;
  margin: 15px auto;
  animation: expandLine 0.8s 2.8s forwards;
}
body.hn-dark .hn-loading-divider {
  background: #4eff9e;
}
@keyframes expandLine {
  from { width: 0; }
  to { width: 150px; }
}
.hn-loading-text {
  font-size: 16px;
  color: #666;
  margin-top: 15px;
  opacity: 0;
  animation: fadeIn 0.8s 3.2s forwards;
}
body.hn-dark .hn-loading-text {
  color: #aaa;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== DESAIN BARU TOMBOL BACK-TO-TOP ==================== */
#hn-back-to-top {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.6) !important;
  color: #1e293b !important;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease !important;
}
body.hn-dark #hn-back-to-top {
  background: rgba(30, 30, 30, 0.2) !important;
  color: #f0f0f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
}
#hn-back-to-top:hover {
  transform: scale(1.05);
}

/* ===== LINGKARAN PROGRESS DALAM TOMBOL BACK-TO-TOP ===== */
#hn-back-to-top svg {
  width: 56px;
  height: 56px;
  display: block;
}

/* NEON UNTUK SEMUA MODE (TERANG DAN GELAP) */
#progress-circle {
  stroke: #48FF00;              /* neon hijau */
  filter: drop-shadow(0 0 4px #48FF00AA);
  transition: stroke-dashoffset 0.1s linear;
}

#hn-back-to-top text {
  fill: #FFFFFF;                 /* putih */
  font-size: 40px;
  font-weight: bold;
  dominant-baseline: middle;
  text-anchor: middle;
}

/* Lingkaran background (neon transparan) */
#hn-back-to-top circle:first-child {
  stroke: #48FF0040;             /* neon transparan */
  stroke-width: 6;
}

/* Dark mode tidak perlu override khusus karena sudah seragam */
/* Namun kita pastikan progress bar tetap neon di dark mode */
body.hn-dark #hn-progress-bar {
  background: #48FF00;           /* neon solid */
  box-shadow: 0 0 8px #48FF00;
}

/* ==================== DYNAMIC ISLAND UTAMA (Navigasi) ==================== */
.expandable-btn-container {
  position: fixed;
  right: 20px;
  left: auto;
  transform: none;
  bottom: 20px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.expandable-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  color: #1e293b;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  white-space: nowrap;
  gap: 4px;
}
body.hn-dark .expandable-btn {
  background: rgba(30, 30, 30, 0.2);
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.expandable-btn.expanded {
  width: auto;
  border-radius: 40px;
  padding: 0 8px;
  gap: 6px;
  cursor: default;
  display: flex;
  align-items: center;
}

.expandable-btn .home-icon,
.expandable-btn .darkmode-icon,
.expandable-btn .swipe-container .expanded-icon {
  width: clamp(38px, 8vw, 44px);
  height: clamp(38px, 8vw, 44px);
  font-size: clamp(18px, 4vw, 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.2s, transform 0.1s;
  background: transparent;
  color: inherit;
}

.expandable-btn .home-icon { cursor: pointer; }
.expandable-btn .home-icon:hover { background: rgba(255,255,255,0.2); }
.expandable-btn .darkmode-icon { cursor: pointer; }
.expandable-btn .darkmode-icon:hover { background: rgba(255,255,255,0.2); }

.expandable-btn .swipe-container {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 2px;
  padding: 0 4px;
  flex: 1;
  white-space: nowrap;
}
.expandable-btn .swipe-container::-webkit-scrollbar { display: none; }
.expandable-btn .swipe-container .expanded-icon.active {
  background: rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
body.hn-dark .expandable-btn .swipe-container .expanded-icon.active {
  background: rgba(37, 99, 235, 0.5);
  border-color: rgba(255,255,255,0.8);
}

/* ==================== TOOLTIP (Slider Artikel) ==================== */
#hn-tooltip-kajian {
  position: fixed;
  right: 20px;
  left: auto;
  transform: none;
  bottom: 130px;
  width: 90%;
  max-width: 420px;
  max-height: 70vh;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  z-index: 1000001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: #1e293b;
}
body.hn-dark #hn-tooltip-kajian {
  background: rgba(30, 30, 30, 0.2);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
#hn-tooltip-kajian.show { display: flex; }

.tooltip-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}
body.hn-dark .tooltip-header {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.2);
}
.tooltip-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.tooltip-close {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  backdrop-filter: blur(4px);
}
.tooltip-close:hover { background: rgba(255, 255, 255, 0.5); }

.artikel-slider {
  padding: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.artikel-slider::-webkit-scrollbar { display: none; }

.artikel-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px) saturate(160%);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.6);
  color: inherit;
}
body.hn-dark .artikel-card {
  background: rgba(40, 40, 40, 0.3);
  border-color: rgba(255,255,255,0.2);
}
.artikel-card h4 { font-size: 18px; margin-bottom: 8px; }
.artikel-card p { font-size: 13px; opacity: 0.9; margin-bottom: 8px; line-height: 1.5; }
.artikel-card ul { margin: 8px 0 12px 0; padding-left: 20px; font-size: 12px; color: #1e293b; }
body.hn-dark .artikel-card ul { color: #ccc; }
.artikel-card li { margin-bottom: 4px; }
.artikel-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-block;
  background: rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.5);
}
body.hn-dark .artikel-link {
  color: #90caf9;
  background: rgba(0,0,0,0.3);
}

/* ==================== MENU VERTIKAL (Swipe Up) ==================== */
.vertical-menu {
  position: fixed;
  right: 20px;
  bottom: 130px;
  width: 220px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
  z-index: 1000002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: #1e293b;
}
body.hn-dark .vertical-menu {
  background: rgba(30, 30, 30, 0.2);
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.vertical-menu.show { display: flex; }

.vertical-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.vertical-header h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.vertical-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
}
.vertical-close:hover { background: rgba(255,255,255,0.2); }

.vertical-items {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.vertical-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 16px;
}
.vertical-item:hover { background: rgba(255,255,255,0.2); }
.vertical-item span:first-child { font-size: 20px; }

.vertical-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 16px;
}
.vertical-list-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  color: inherit;
}
.vertical-list-item:last-child { border-bottom: none; }
.vertical-list-item:hover { background: rgba(255,255,255,0.1); }

/* Sembunyikan tombol dark mode asli */
.hn-darkmode-toggle { display: none !important; }