/* ══════════════════════════════════════════
   TAHASSAN — Custom Styles
   tahassan.com | Metode Tahsin Al-Quran
══════════════════════════════════════════ */

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Poppins', sans-serif; overflow-x: hidden; }

/* ── FONTS ── */
.arabic      { font-family: 'Scheherazade New', serif; direction: rtl; }
.display-font{ font-family: 'Playfair Display', serif; }

/* ── PATTERNS ── */
.islamic-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.geo-dots {
  background-image: radial-gradient(rgba(212,160,23,.15) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── GRADIENT TEXT ── */
.text-gold-gradient {
  background: linear-gradient(135deg, #d4a017, #f4c842, #d4a017);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-emerald-gradient {
  background: linear-gradient(135deg, #155e37, #1a7a45);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── SHIMMER BUTTON ── */
.btn-shimmer {
  background: linear-gradient(135deg, #d4a017 0%, #f4c842 40%, #d4a017 80%, #b8860b 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* ── CARD HOVER ── */
.card-hover { transition: transform .3s ease, box-shadow .3s ease; }
.card-hover:hover { transform: translateY(-4px); }

/* ── SCROLL REVEAL ── */
.reveal         { opacity: 0; transform: translateY(28px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ── PROGRESS BAR ── */
.prog-bar  { height: 4px; border-radius: 2px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #1a7a45, #d4a017); transition: width 1.5s ease; }

/* ── TICKER ── */
.ticker-wrap  { overflow: hidden; }
.ticker-track {
  display: flex; gap: 48px; white-space: nowrap;
  width: max-content; animation: ticker 30s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

/* ── MOBILE NAV ── */
.mobile-nav       { transform: translateX(-100%); transition: transform .3s ease; }
.mobile-nav.open  { transform: translateX(0); }

/* ── FAQ ── */
.faq-answer                   { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.faq-item.open .faq-answer    { max-height: 500px; }
.faq-item.open .faq-icon      { transform: rotate(45deg); }
.faq-icon                     { transition: transform .3s ease; }

/* ── COUNTDOWN ── */
.countdown-box {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212,160,23,.3);
}

/* ── FLOATING WA ── */
.wa-float {
  position: fixed; bottom: 20px; right: 16px;
  z-index: 9999;
  animation: float 3s ease-in-out infinite;
}

/* ── BACK TO TOP ── */
#backTop {
  position: fixed; bottom: 80px; right: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 9998;
}
#backTop.show { opacity: 1; pointer-events: all; }

/* ── TOPBAR ── */
.topbar-scroll {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── BADGE LIVE ── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.badge-live::before {
  content:''; display:inline-block; width:7px; height:7px;
  border-radius:50%; background:#ef4444; margin-right:5px;
  animation:blink 1.4s ease-in-out infinite;
}

/* ── TESTIMONIAL QUOTE ── */
.testi-card::before {
  content: '"';
  position: absolute; top: -8px; left: 16px;
  font-size: 64px; font-family: Georgia, serif;
  color: rgba(212,160,23,.2);
  line-height: 1;
}

/* ── SECTION DIVIDER ── */
.divider-wave          { height: 60px; overflow: hidden; }
.divider-wave svg      { width: 100%; height: 100%; }

/* ── DROPDOWN MENU ── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: white; border: 1px solid #e5f0eb;
  border-radius: 14px; padding: 8px; min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  transform: translateX(-50%) translateY(-8px);
  z-index: 1000;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: #374151;
  transition: background .15s, color .15s;
}
.dropdown-menu a:hover {
  background: #f0faf3; color: #155e37;
}

/* ── MOBILE DROPDOWN ── */
.mob-dd-btn  { cursor: pointer; user-select: none; }
.mob-dd-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.mob-dd-panel.open { max-height: 300px; }

/* ── BOOK CARD ── */
.book-card {
  background: linear-gradient(135deg, #063d20, #155e37);
  border-radius: 20px; overflow: hidden;
  position: relative;
}
.book-cover {
  background: linear-gradient(160deg, #d4a017, #f4c842 40%, #b8860b);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  aspect-ratio: 2/3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
  text-align: center;
}

/* ── KERJASAMA CARD ── */
.ks-card {
  border-radius: 24px; overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.ks-card:hover { transform: translateY(-6px); }

/* ── DARK MODE TOGGLE BUTTON ── */
#themeToggle {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}

/* ══════════════════════════════════════════
   DARK MODE — .dark applied to <html>
══════════════════════════════════════════ */
.dark body { background: #0a1a10; color: #e8f5ed; }

/* Navbar */
.dark #navbar {
  background: rgba(10,26,16,.92) !important;
  border-color: rgba(21,94,55,.3) !important;
}
.dark #navbar a.text-gray-600 { color: #a7c5b3 !important; }
.dark #navbar a.text-gray-600:hover { color: #fff !important; background: rgba(21,94,55,.3) !important; }
.dark #themeToggle { background: rgba(21,94,55,.3); border-color: rgba(21,94,55,.4); }

/* Sections */
.dark .bg-white      { background: #112218 !important; }
.dark .bg-kinara-cream { background: #0d1e13 !important; }
.dark .text-gray-800 { color: #d4e8da !important; }
.dark .text-gray-600 { color: #a7c5b3 !important; }
.dark .text-gray-500 { color: #8aad97 !important; }
.dark .text-gray-400 { color: #6d9177 !important; }
.dark .text-kinara-dark { color: #d4e8da !important; }
.dark .border-gray-100 { border-color: rgba(21,94,55,.25) !important; }
.dark .shadow-card { box-shadow: 0 2px 16px rgba(0,0,0,.4) !important; }

/* Cards in dark */
.dark .card-hover.bg-white,
.dark .bg-white.rounded-3xl,
.dark .bg-white.rounded-2xl {
  background: #152a1c !important;
  border-color: rgba(21,94,55,.3) !important;
}
.dark .testi-card { background: #152a1c !important; border-color: rgba(21,94,55,.3) !important; }
.dark .faq-item   { background: #152a1c !important; border-color: rgba(21,94,55,.3) !important; }
.dark .faq-item.open .faq-answer p { color: #a7c5b3 !important; }
.dark .faq-q span.font-semibold { color: #d4e8da !important; }

/* Hero cream bg */
.dark section.bg-kinara-cream { background: #0d1e13 !important; }

/* Form section */
.dark #daftar { background: rgba(6,61,32,.95) !important; }

/* Footer stays same (already dark) */

/* Dropdown in dark */
.dark .dropdown-menu {
  background: #152a1c; border-color: rgba(21,94,55,.4);
}
.dark .dropdown-menu a { color: #a7c5b3; }
.dark .dropdown-menu a:hover { background: rgba(21,94,55,.4); color: #fff; }

/* Pricing toggle */
.dark .bg-white.border.border-gray-200 {
  background: #152a1c !important; border-color: rgba(21,94,55,.3) !important;
}
.dark .text-gray-500.hover\:text-kinara-dark { color: #8aad97 !important; }

/* Segmen usia */
.dark .bg-amber-50   { background: rgba(212,160,23,.1) !important; }
.dark .bg-blue-50    { background: rgba(59,130,246,.1) !important; }
.dark .bg-emerald-50 { background: rgba(21,94,55,.2) !important; }
.dark .bg-rose-50    { background: rgba(244,63,94,.1) !important; }
.dark .bg-amber-50.border-amber-100,
.dark .bg-blue-50.border-blue-100,
.dark .bg-emerald-50.border-emerald-100,
.dark .bg-rose-50.border-rose-100 { border-color: rgba(255,255,255,.1) !important; }

/* Rating summary */
.dark .bg-gray-100 { background: rgba(255,255,255,.07) !important; }

/* Mobile menu */
.dark .mobile-nav { background: #0a1a10 !important; }
.dark .mobile-nav a { color: #a7c5b3 !important; }
.dark .mobile-nav a:hover { color: #fff !important; }

/* ── ANIMATIONS (shared) ── */
@keyframes float    { 0%,100%{transform:translateY(0)}  50%{transform:translateY(-12px)} }
@keyframes shimmer  { 0%{background-position:200% 0}   100%{background-position:-200% 0} }
@keyframes ticker   { 0%{transform:translateX(0)}       100%{transform:translateX(-50%)} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulseSoft{ 0%,100%{opacity:1} 50%{opacity:.6} }

/* ── MOBILE ── */
@media (max-width: 640px) {
  .arabic.hero-arabic { font-size: 1.6rem; }
  .dropdown-menu { left: 0; transform: translateX(0); }
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu { transform: translateX(0); }
}
