/* =================================================================
   KhatamQuran.ID — Components: Buttons, Cards, Badges, Forms
   ================================================================= */

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .02em;
  border-radius: var(--radius-full);
  padding: 11px 24px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-spring);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.97); }

/* Primary */
.btn-primary {
  background: var(--kq-700);
  color: white;
  border-color: var(--kq-700);
  box-shadow: 0 4px 16px rgba(28,107,58,.3);
}
.btn-primary:hover {
  background: var(--kq-600);
  border-color: var(--kq-600);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(28,107,58,.4);
}

/* Gold */
.btn-gold {
  background: linear-gradient(135deg, var(--kq-gold-mid), var(--kq-gold));
  color: white;
  border-color: var(--kq-gold);
  box-shadow: 0 4px 16px rgba(180,128,10,.3);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(180,128,10,.45);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--kq-700);
  border-color: var(--kq-700);
}
.btn-outline:hover {
  background: var(--kq-700);
  color: white;
}
html.dark .btn-outline {
  color: var(--kq-400);
  border-color: var(--kq-400);
}
html.dark .btn-outline:hover {
  background: var(--kq-700);
  color: white;
}

/* White (for dark backgrounds) */
.btn-white {
  background: white;
  color: var(--kq-800);
  border-color: white;
}
.btn-white:hover {
  background: var(--kq-50);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: rgba(255,255,255,.12);
  color: white;
  border-color: rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.4);
}

/* WhatsApp */
.btn-wa {
  background: #25D366;
  color: white;
  border-color: #25D366;
  box-shadow: 0 4px 16px rgba(37,211,102,.3);
}
.btn-wa:hover {
  background: #1EBE59;
  transform: translateY(-1px);
}

/* Sizes */
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-xl { padding: 16px 40px; font-size: 1.05rem; }


/* ══════════════════════════════════════
   BADGES / TAGS
   ══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-green {
  background: var(--kq-100);
  color: var(--kq-700);
}
html.dark .badge-green {
  background: var(--kq-800);
  color: var(--kq-300);
}

.badge-gold {
  background: var(--kq-gold-pale);
  color: var(--kq-gold);
}
html.dark .badge-gold {
  background: rgba(180,128,10,.15);
  color: var(--kq-gold-soft);
}

.badge-teal {
  background: rgba(13,115,119,.1);
  color: var(--kq-teal);
}

.badge-dark {
  background: var(--kq-800);
  color: var(--kq-200);
}

.badge-ramadan {
  background: linear-gradient(135deg, #2D1B69, #6B35C8);
  color: white;
}

/* Program Category Badges */
.badge-kta     { background: #FEF3C7; color: #92400E; }
.badge-rbq     { background: #ECFDF5; color: #065F46; }
.badge-lbq     { background: #EFF6FF; color: #1E40AF; }
.badge-fun     { background: #FDF4FF; color: #7E22CE; }
.badge-dauroh  { background: #FFF7ED; color: #9A3412; }

html.dark .badge-kta     { background: rgba(146,64,14,.2); color: #FDE68A; }
html.dark .badge-rbq     { background: rgba(6,95,70,.2); color: #6EE7B7; }
html.dark .badge-lbq     { background: rgba(30,64,175,.2); color: #93C5FD; }
html.dark .badge-fun     { background: rgba(126,34,206,.2); color: #DDD6FE; }
html.dark .badge-dauroh  { background: rgba(154,52,18,.2); color: #FCA5A5; }


/* ══════════════════════════════════════
   CARDS
   ══════════════════════════════════════ */
.card {
  background: var(--kq-surface);
  border: 1px solid var(--kq-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--kq-shadow-lg);
}

.card-body { padding: 24px; }
.card-body-sm { padding: 16px; }
.card-body-lg { padding: 32px; }

/* Program card */
.program-card {
  background: var(--kq-surface);
  border: 1px solid var(--kq-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.program-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--kq-shadow-xl);
}

.program-card .card-accent {
  height: 5px;
  width: 100%;
}

/* Featured/Dark card */
.card-dark {
  background: var(--kq-800);
  border-color: var(--kq-700);
  color: var(--kq-100);
}
html.dark .card-dark {
  background: var(--kq-900);
  border-color: var(--kq-800);
}

/* Glass card */
.card-glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
}

/* Stat card */
.stat-card {
  background: var(--kq-surface);
  border: 1px solid var(--kq-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.stat-card .stat-number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--kq-700);
  line-height: 1;
  display: block;
}
html.dark .stat-card .stat-number { color: var(--kq-400); }
.stat-card .stat-label {
  font-size: .8rem;
  color: var(--kq-text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Testimonial card */
.testimonial-card {
  background: var(--kq-surface);
  border: 1px solid var(--kq-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.testimonial-card .stars {
  color: var(--kq-gold-soft);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}
.testimonial-card blockquote {
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-style: italic;
  color: var(--kq-text-mid);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Image zoom effect */
.img-zoom { overflow: hidden; }
.img-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.img-zoom:hover img { transform: scale(1.06); }

/* Thumbnail image */
.thumb-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}


/* ══════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header .eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kq-gold);
  background: var(--kq-gold-pale);
  border: 1px solid rgba(180,128,10,.2);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}
html.dark .section-header .eyebrow {
  background: rgba(180,128,10,.12);
  color: var(--kq-gold-soft);
}
.section-header h2 {
  margin-bottom: 14px;
}
.section-header p {
  max-width: 56ch;
  margin-inline: auto;
  font-size: 1.05rem;
}

/* Arabic decorative line */
.arabic-deco {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  color: var(--kq-600);
  text-align: center;
  display: block;
  line-height: 1.8;
  margin-bottom: 4px;
}
html.dark .arabic-deco { color: var(--kq-400); }

/* Gold divider */
.divider-gold {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--kq-gold-mid), var(--kq-gold-soft));
  border-radius: 2px;
  margin-inline: auto;
  margin-block: 16px;
}


/* ══════════════════════════════════════
   FORMS
   ══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--kq-text-mid);
  margin-bottom: 6px;
}
.form-label .req { color: #E53E3E; margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--kq-text);
  background: var(--kq-surface);
  border: 1.5px solid var(--kq-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--kq-600);
  box-shadow: 0 0 0 3px rgba(28,107,58,.12);
}
.form-control::placeholder { color: var(--kq-text-light); }
html.dark .form-control {
  background: var(--kq-surface-3);
  border-color: var(--kq-border);
  color: var(--kq-text);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23567060' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--kq-700);
  flex-shrink: 0;
  cursor: pointer;
}
.form-check label {
  font-size: .875rem;
  color: var(--kq-text-muted);
  cursor: pointer;
  line-height: 1.5;
}


/* ══════════════════════════════════════
   PROGRAM INFO ROWS
   ══════════════════════════════════════ */
.info-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--kq-border-soft);
  align-items: flex-start;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-icon {
  width: 36px;
  height: 36px;
  background: var(--kq-surface-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.info-row .info-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--kq-text-muted);
}
.info-row .info-value {
  font-size: .9rem;
  color: var(--kq-text);
  font-weight: 500;
}

/* Price display */
.price-display {
  padding: 16px 20px;
  background: var(--kq-gold-pale);
  border: 1px solid rgba(180,128,10,.2);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
html.dark .price-display { background: rgba(180,128,10,.08); }
.price-display .price-type {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--kq-gold);
  margin-bottom: 4px;
}
.price-display .price-amount {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--kq-text);
}
.price-display .price-note {
  font-size: .75rem;
  color: var(--kq-text-muted);
}


/* ══════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--kq-600), var(--kq-gold-soft));
  z-index: var(--z-top);
  width: 0%;
  transition: width .1s linear;
}


/* ══════════════════════════════════════
   DARK MODE TOGGLE
   ══════════════════════════════════════ */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--kq-200);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--kq-300);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
html.dark .theme-toggle {
  background: var(--kq-700);
  border-color: var(--kq-600);
}
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform var(--transition-spring);
}
html.dark .theme-toggle::before { transform: translateX(20px); }
.theme-icon { font-size: .9rem; }


/* ══════════════════════════════════════
   TICKER (Breaking/Prestasi)
   ══════════════════════════════════════ */
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 50s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-block;
  padding-right: 60px;
  font-size: .78rem;
  color: var(--kq-text-muted);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ══════════════════════════════════════
   FLOAT / STICKY CTA
   ══════════════════════════════════════ */
.float-cta {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--kq-700);
  color: white;
  font-weight: 700;
  font-size: .85rem;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--kq-shadow-xl);
  animation: float-bounce 3.5s ease-in-out infinite;
  transition: transform var(--transition), background var(--transition);
}
.float-cta:hover {
  background: var(--kq-600);
  animation-play-state: paused;
  transform: translateY(-3px);
}

#scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-modal);
  width: 44px;
  height: 44px;
  background: var(--kq-800);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--kq-shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
#scroll-top.show { opacity: 1; pointer-events: all; }
#scroll-top:hover { transform: translateY(-3px); }

@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}


/* ══════════════════════════════════════
   FAQ ACCORDION
   ══════════════════════════════════════ */
.faq-item {
  background: var(--kq-surface);
  border: 1px solid var(--kq-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--kq-text);
  cursor: pointer;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--kq-surface-2); }
.faq-arrow {
  flex-shrink: 0;
  color: var(--kq-600);
  font-size: 1.1rem;
  transition: transform var(--transition);
}
.faq-item[open] .faq-arrow { transform: rotate(180deg); }
.faq-body {
  padding: 0 20px 16px;
  color: var(--kq-text-muted);
  font-size: .9rem;
  line-height: 1.75;
  border-top: 1px solid var(--kq-border-soft);
  padding-top: 14px;
}


/* ══════════════════════════════════════
   LIGHTBOX (Galeri)
   ══════════════════════════════════════ */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,26,14,.93);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: var(--kq-shadow-xl);
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: var(--radius-full);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
}
#lightbox-close:hover { background: rgba(255,255,255,.22); }


/* ══════════════════════════════════════
   COUNTDOWN TIMER
   ══════════════════════════════════════ */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 12px 20px;
}
.countdown-unit {
  text-align: center;
  min-width: 48px;
}
.countdown-number {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  display: block;
  line-height: 1;
}
.countdown-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.countdown-sep {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: rgba(255,255,255,.5);
  line-height: 1;
  margin-top: -6px;
}


/* ══════════════════════════════════════
   STEP INDICATOR (Alur Pendaftaran)
   ══════════════════════════════════════ */
.step-list { list-style: none; padding: 0; }
.step-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--kq-border);
  position: relative;
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 44px;
  height: 44px;
  background: var(--kq-700);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-head);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.step-content h4 { margin-bottom: 4px; }
.step-content p { font-size: .875rem; }


/* ══════════════════════════════════════
   TIMELINE (Jadwal Harian)
   ══════════════════════════════════════ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--kq-border);
}
.timeline-item {
  position: relative;
  padding: 12px 0 12px 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: var(--kq-600);
  border: 2px solid var(--kq-surface);
  border-radius: 50%;
}
.timeline-item.highlight::before { background: var(--kq-gold-mid); }
.timeline-time {
  font-size: .78rem;
  font-weight: 700;
  color: var(--kq-600);
  margin-bottom: 2px;
}
.timeline-item.highlight .timeline-time { color: var(--kq-gold); }
.timeline-activity {
  font-size: .9rem;
  color: var(--kq-text);
  font-weight: 500;
}
.timeline-note {
  font-size: .78rem;
  color: var(--kq-text-muted);
}


/* ══════════════════════════════════════
   NEWSLETTER
   ══════════════════════════════════════ */
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
}
.newsletter-form input {
  flex: 1;
  padding: 11px 16px;
  font-size: .875rem;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius-full);
  color: white;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { border-color: rgba(255,255,255,.5); }
