.hap-bilgi-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}

.hap-bilgi-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  position: relative;
  transition: all var(--transition);
}
.hap-bilgi-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.hap-bilgi-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.hap-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 800;
}

.hap-bilgi-card.turkce .hap-number { background: var(--turkce-light); color: var(--turkce-dark); }
.hap-bilgi-card.matematik .hap-number { background: var(--matematik-light); color: var(--matematik-dark); }
.hap-bilgi-card.geometri .hap-number { background: var(--geometri-light); color: var(--geometri-dark); }
.hap-bilgi-card.tarih .hap-number { background: var(--tarih-light); color: var(--tarih-dark); }
.hap-bilgi-card.cografya .hap-number { background: var(--cografya-light); color: var(--cografya-dark); }
.hap-bilgi-card.vatandaslik .hap-number { background: var(--vatandaslik-light); color: var(--vatandaslik-dark); }
.hap-bilgi-card.guncel .hap-number { background: var(--guncel-light); color: var(--guncel-dark); }

.hap-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.hap-content {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 8px 0 0 52px;
}

.hap-example {
  margin: 12px 0 0 52px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: var(--text);
  font-style: italic;
}

.hap-bilgi-card.turkce .hap-example { border-left-color: var(--turkce); }
.hap-bilgi-card.matematik .hap-example { border-left-color: var(--matematik); }
.hap-bilgi-card.geometri .hap-example { border-left-color: var(--geometri); }
.hap-bilgi-card.tarih .hap-example { border-left-color: var(--tarih); }
.hap-bilgi-card.cografya .hap-example { border-left-color: var(--cografya); }
.hap-bilgi-card.vatandaslik .hap-example { border-left-color: var(--vatandaslik); }
.hap-bilgi-card.guncel .hap-example { border-left-color: var(--guncel); }

.hap-formula {
  margin: 12px 0 0 52px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  color: var(--text);
}

.hap-gated-section {
  position: relative;
  margin-top: 24px;
}

.hap-gated-section.blurred .hap-bilgi-card {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.hap-gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(250,250,250,0) 0%, rgba(250,250,250,.85) 20%, rgba(250,250,250,.98) 50%);
  z-index: 10;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
}

.hap-gate-overlay.hidden { display: none; }

.hap-gate-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.hap-gate-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
}

.hap-gate-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.hap-gate-desc {
  font-size: .95rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hap-gate-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}
.hap-gate-cta:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hap-gate-login {
  margin-top: 12px;
  font-size: .875rem;
  color: var(--text-secondary);
}
.hap-gate-login a {
  color: var(--primary);
  font-weight: 600;
}

.hap-dashboard-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  padding: 20px;
  background: var(--primary-light);
  border: 1px solid rgba(249,115,22,.2);
  border-radius: var(--radius-lg);
  text-align: center;
}
.hap-dashboard-cta.hidden { display: none; }

.hap-dashboard-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.hap-dashboard-cta a:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.hap-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 250, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 90;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.hap-sticky-bar.visible { transform: translateY(0); }
.hap-sticky-bar.hidden { display: none; }

.hap-sticky-bar p {
  font-size: .9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.hap-sticky-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.hap-sticky-bar a:hover {
  background: var(--primary-dark);
  color: #fff;
}

.hap-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.hap-topic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.hap-topic-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hap-topic-item .topic-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.hap-topic-item .topic-info {
  flex: 1;
}
.hap-topic-item .topic-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
.hap-topic-item .topic-count {
  font-size: .8rem;
  color: var(--text-light);
}

.hap-topic-item .topic-arrow {
  color: var(--text-light);
  transition: transform var(--transition);
}
.hap-topic-item:hover .topic-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

@media (max-width: 768px) {
  .hap-bilgi-card { padding: 18px 20px; }
  .hap-content, .hap-example, .hap-formula { margin-left: 0; margin-top: 12px; }
  .hap-bilgi-header { gap: 12px; }
  .hap-gate-overlay { padding: 32px 16px; }
  .hap-sticky-bar { flex-direction: column; gap: 8px; padding: 10px 16px; }
  .hap-topic-grid { grid-template-columns: 1fr; }
  .hb-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hb-table th, .hb-table td { white-space: nowrap; }
}

/* hap-bilgiler leaf-page depth upgrade: intro + example question (P3b) */
.hap-intro { color: var(--text-secondary); line-height: 1.8; font-size: 1rem; margin: 0 0 28px; max-width: 720px; }
.hap-example-question { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.hap-eq-soru { font-size: .98rem; line-height: 1.7; margin: 0 0 14px; color: var(--text); }
.hap-eq-options { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hap-eq-options li { font-size: .92rem; line-height: 1.6; color: var(--text-secondary); }
.hap-eq-answer { font-size: .92rem; line-height: 1.7; color: var(--text-secondary); margin: 0; padding-top: 14px; border-top: 1px dashed var(--border); }
.hap-eq-answer strong { color: var(--primary); }

/* ── hap v2: özet box, sequential nav, print/PDF ─────────────────────── */
/* Quotable direct-answer box right under the H1 — the snippet search
   engines and LLMs lift. Keep it one short paragraph + key facts. */
.hap-ozet {
  background: var(--bg-alt, #f8fafc);
  border: 1.5px solid var(--border, #e4e4e7);
  border-left: 4px solid var(--primary, #f97316);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 0 0 22px;
}
.hap-ozet p { margin: 0; line-height: 1.7; color: var(--text, #18181b); }
.hap-ozet-facts {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 12px; padding: 0; list-style: none;
  font-size: .85rem; color: var(--text-secondary, #52525b);
}
.hap-ozet-facts li strong { color: var(--text, #18181b); }

/* Sequential prev/next between topics (registry order). */
.hap-seq {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 36px 0 8px; flex-wrap: wrap;
}
.hap-seq a {
  flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 18px; border: 1.5px solid var(--border, #e4e4e7);
  border-radius: 12px; text-decoration: none; transition: border-color .15s ease;
}
.hap-seq a:hover { border-color: var(--primary, #f97316); }
.hap-seq-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #71717a); }
.hap-seq-title { font-size: .92rem; font-weight: 700; color: var(--text, #18181b); }
.hap-seq-next { text-align: right; align-items: flex-end; }
.hap-seq-pos {
  display: inline-block; margin: 0 0 14px; font-size: .78rem; font-weight: 700;
  color: var(--text-secondary, #71717a);
}

/* Print / PDF: these pages become the PDF source later — strip chrome,
   unblur the gate, keep the kural cards compact. */
@media print {
  .nav, .footer, .cta-section, .hap-sticky-bar, .hap-gate-overlay,
  .hap-seq, .back-to-top, .seocta-card, .seocta-bar, .faq-list { display: none !important; }
  .hap-gated-section.blurred { filter: none !important; }
  .hap-gated-section.blurred * { filter: none !important; }
  body { background: #fff; }
  .hap-bilgi-card { break-inside: avoid; border: 1px solid #ddd; box-shadow: none; }
  main { padding: 0 !important; }
}

/* Henüz üretilmemiş konu satırı: tıklanamaz, "Yakında" etiketli.
   Daha önce var olmayan sayfalara bağlanıp 404 veriyorlardı. */
.hap-topic-item.is-soon {
  opacity: .6;
  cursor: default;
  pointer-events: none;
}
.hap-topic-item.is-soon .topic-count {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-alt, #f4f4f5);
  color: var(--text-secondary, #71717a);
  font-size: .72rem;
  font-weight: 700;
}

/* ── Basılabilir kitapçık kartı ─────────────────────────────────────────────
   Konu hub'ında ve hap bilgiler ana sayfasında PDF indirme çağrısı.
   Dosyalar functions/hap-bilgiler/pdf/[[path]].js ile oturum arkasında;
   giriş yapmamış ziyaretçi tıklayınca kayıt sayfasına yönlenir. */
.hap-pdf-card {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 22px 24px;
  border: 1px solid var(--border, #e4e4e7);
  border-left: 4px solid var(--primary, #f97316);
  border-radius: var(--radius, 12px);
  background: var(--bg, #fff);
}
.hap-pdf-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-alt, #f4f4f5);
  color: var(--primary, #f97316);
}
.hap-pdf-body { flex: 1 1 260px; min-width: 0; }
.hap-pdf-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.hap-pdf-body p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-secondary, #71717a);
}
.hap-pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hap-pdf-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.hap-pdf-actions .pdf-primary {
  background: var(--primary, #f97316);
  color: #fff;
}
.hap-pdf-actions .pdf-secondary {
  border: 1px solid var(--border, #e4e4e7);
  color: var(--text, #18181b);
}
.hap-pdf-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: .8rem;
  color: var(--text-secondary, #71717a);
}
@media (max-width: 560px) {
  .hap-pdf-actions a { flex: 1 1 100%; justify-content: center; }
}
@media print { .hap-pdf-card { display: none !important; } }
