/* ==========================================================================
   HAZIRBELGE — MODERN KURUMSAL SaaS TEMA VE ARAYÜZ STİLLERİ (app.css)
   Bağımsız .hb-* isim uzayı, cam efektli üst bar, açık/koyu tema, ergonomik butonlar
   ========================================================================== */

:root {
  --hb-bg: #f4f7fb;
  --hb-surface: #ffffff;
  --hb-surface-glass: rgba(255, 255, 255, 0.88);
  --hb-surface-alt: #eef2f8;
  --hb-border: #e2e8f0;
  --hb-border-strong: #cbd5e1;
  --hb-text: #0f172a;
  --hb-text-muted: #475569;
  --hb-text-soft: #64748b;

  --hb-primary: #2563eb;
  --hb-primary-hover: #1d4ed8;
  --hb-primary-dark: #1e3a8a;
  --hb-primary-soft: #eff6ff;
  --hb-primary-ring: rgba(37, 99, 235, 0.22);
  --hb-accent: #4f46e5;

  --hb-success: #15803d;
  --hb-success-bg: #dcfce7;
  --hb-warning: #b45309;
  --hb-warning-bg: #fef3c7;
  --hb-danger: #dc2626;
  --hb-danger-bg: #fee2e2;

  --hb-radius-xs: 6px;
  --hb-radius-sm: 10px;
  --hb-radius-md: 14px;
  --hb-radius-lg: 20px;

  --hb-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --hb-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --hb-shadow-md: 0 12px 28px -6px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --hb-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.16);
  --hb-shadow-primary: 0 6px 18px -3px rgba(37, 99, 235, 0.35);

  --hb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hb-font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
}

[data-hb-theme="dark"] {
  --hb-bg: #0b0f19;
  --hb-surface: #111827;
  --hb-surface-glass: rgba(17, 24, 39, 0.88);
  --hb-surface-alt: #1e293b;
  --hb-border: #1f2937;
  --hb-border-strong: #334155;
  --hb-text: #f8fafc;
  --hb-text-muted: #cbd5e1;
  --hb-text-soft: #94a3b8;

  --hb-primary: #3b82f6;
  --hb-primary-hover: #2563eb;
  --hb-primary-dark: #60a5fa;
  --hb-primary-soft: rgba(59, 130, 246, 0.15);
  --hb-primary-ring: rgba(59, 130, 246, 0.3);
  --hb-accent: #6366f1;

  --hb-success: #4ade80;
  --hb-success-bg: rgba(22, 163, 74, 0.18);
  --hb-warning: #fbbf24;
  --hb-warning-bg: rgba(217, 119, 6, 0.18);
  --hb-danger: #f87171;
  --hb-danger-bg: rgba(220, 38, 38, 0.18);

  --hb-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --hb-shadow-md: 0 14px 32px rgba(0, 0, 0, 0.45);
  --hb-shadow-lg: 0 24px 54px rgba(0, 0, 0, 0.6);
  --hb-shadow-primary: 0 6px 20px rgba(59, 130, 246, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.hb-body {
  margin: 0;
  padding: 0;
  background-color: var(--hb-bg);
  color: var(--hb-text);
  font-family: var(--hb-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Klavye Erişilebilirlik Odak Halkası */
.hb-body a:focus-visible,
.hb-body button:focus-visible,
.hb-body input:focus-visible,
.hb-body select:focus-visible,
.hb-body textarea:focus-visible {
  outline: 2.5px solid var(--hb-primary);
  outline-offset: 2px;
}

.hb-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .hb-container {
    padding: 0 16px;
  }
}

/* ==========================================================================
   ÜST GEZİNME ÇUBUĞU (NAVBAR) — SADE VE ERGONOMİK
   ========================================================================== */
.hb-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--hb-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hb-border);
}

.hb-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hb-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--hb-text);
}

.hb-brand-badge,
.hb-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hb-font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  flex-shrink: 0;
}

.hb-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.hb-brand-text strong {
  font-family: var(--hb-font-display);
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hb-text);
}

.hb-brand-text small {
  font-size: 11px;
  font-weight: 600;
  color: var(--hb-text-soft);
}

.hb-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--hb-surface-alt);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--hb-border);
}

.hb-nav-link {
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--hb-text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.hb-nav-link:hover {
  color: var(--hb-text);
}

.hb-nav-link.is-active {
  background-color: var(--hb-surface);
  color: var(--hb-primary);
  box-shadow: var(--hb-shadow-xs);
}

.hb-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hb-theme-btn,
.hb-icon-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: var(--hb-radius-sm);
  border: 1px solid var(--hb-border);
  background: var(--hb-surface);
  color: var(--hb-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.hb-theme-btn:hover,
.hb-icon-btn:hover:not(:disabled) {
  background: var(--hb-surface-alt);
  border-color: var(--hb-border-strong);
}

.hb-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hb-mobile-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--hb-radius-sm);
  border: 1px solid var(--hb-border);
  background: var(--hb-surface);
  color: var(--hb-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.hb-mobile-menu {
  display: none;
  border-top: 1px solid var(--hb-border);
  background: var(--hb-surface);
  padding: 12px 20px 18px;
  flex-direction: column;
  gap: 6px;
}

.hb-mobile-menu.is-open {
  display: flex;
}

@media (max-width: 960px) {
  .hb-nav-links {
    display: none;
  }
  .hb-mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .hb-navbar-inner {
    padding: 0 14px;
    height: 60px;
  }
  .hb-brand-text small {
    display: none;
  }
  .hb-nav-actions .hb-return-link {
    display: none;
  }
}

/* ==========================================================================
   BUTON SİSTEMİ VE ETİKETLER
   ========================================================================== */
.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--hb-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.hb-btn-primary {
  background: linear-gradient(135deg, var(--hb-primary) 0%, var(--hb-accent) 100%);
  color: #ffffff;
  box-shadow: var(--hb-shadow-primary);
}

.hb-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.hb-btn-outline {
  background-color: var(--hb-surface);
  color: var(--hb-text);
  border-color: var(--hb-border-strong);
  box-shadow: var(--hb-shadow-xs);
}

.hb-btn-outline:hover:not(:disabled) {
  background-color: var(--hb-surface-alt);
  border-color: var(--hb-text-soft);
}

.hb-btn-ghost {
  background-color: transparent;
  color: var(--hb-text-muted);
  border-color: transparent;
}

.hb-btn-ghost:hover:not(:disabled) {
  background-color: var(--hb-surface-alt);
  color: var(--hb-text);
}

.hb-btn-danger {
  background-color: var(--hb-danger-bg);
  color: var(--hb-danger);
  border-color: rgba(220, 38, 38, 0.22);
}

.hb-btn-danger:hover:not(:disabled) {
  background-color: var(--hb-danger);
  color: #ffffff;
}

.hb-btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: 8px;
}

.hb-btn-lg {
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
}

.hb-pill,
.hb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background-color: var(--hb-primary-soft);
  color: var(--hb-primary);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

/* ==========================================================================
   ANA SAYFA HERO (2 SÜTUNLU MODERN KURUMSAL DÜZEN)
   ========================================================================== */
.hb-hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--hb-border);
  background:
    radial-gradient(circle at 15% 15%, var(--hb-primary-soft) 0%, transparent 48%),
    radial-gradient(circle at 85% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 45%);
}

.hb-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 980px) {
  .hb-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hb-hero h1 {
  font-family: var(--hb-font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 16px 0 16px;
  line-height: 1.12;
  color: var(--hb-text);
}

.hb-hero-lead {
  font-size: clamp(15.5px, 1.8vw, 18px);
  color: var(--hb-text-muted);
  margin: 0 0 26px;
  max-width: 600px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .hb-hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hb-hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

@media (max-width: 980px) {
  .hb-hero-cta {
    justify-content: center;
  }
}

.hb-hero-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--hb-text-muted);
}

@media (max-width: 980px) {
  .hb-hero-badges {
    justify-content: center;
  }
}

.hb-hero-preview-card {
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-lg);
  padding: 20px;
  box-shadow: var(--hb-shadow-lg);
  position: relative;
}

.hb-mini-sheet {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  text-align: left;
}

.hb-mini-bar {
  height: 7px;
  border-radius: 99px;
  background: #e2e8f0;
  margin-bottom: 6px;
}

/* ==========================================================================
   GENEL BÖLÜM (SECTION) VE BAŞLIKLAR
   ========================================================================== */
.hb-section,
.hb-section-block {
  padding: 60px 0;
}

.hb-section-alt {
  background-color: var(--hb-surface-alt);
  border-top: 1px solid var(--hb-border);
  border-bottom: 1px solid var(--hb-border);
}

.hb-section-header,
.hb-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.hb-section-header h2,
.hb-section-head h2 {
  font-family: var(--hb-font-display);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--hb-text);
}

.hb-section-header p,
.hb-section-head p {
  margin: 0;
  color: var(--hb-text-muted);
  font-size: 15px;
  max-width: 680px;
}

/* ==========================================================================
   BELGE TÜRÜ VE ŞABLON KARTLARI (4 SÜTUNLU TEMİZ IZGARA)
   ========================================================================== */
.hb-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1120px) {
  .hb-doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .hb-doc-grid {
    grid-template-columns: 1fr;
  }
}

.hb-doc-card {
  background-color: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--hb-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hb-doc-card:hover {
  border-color: var(--hb-primary);
  box-shadow: var(--hb-shadow-md);
  transform: translateY(-3px);
}

.hb-doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hb-doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--hb-primary-soft);
  color: var(--hb-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.hb-doc-card h3 {
  font-family: var(--hb-font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--hb-text);
}

.hb-doc-card p {
  font-size: 13.5px;
  color: var(--hb-text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.hb-doc-meta {
  font-size: 12px;
  color: var(--hb-text-soft);
  background-color: var(--hb-surface-alt);
  padding: 9px 11px;
  border-radius: var(--hb-radius-xs);
  line-height: 1.45;
}

.hb-doc-meta strong {
  color: var(--hb-text);
}

.hb-doc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--hb-border);
}

/* ==========================================================================
   TASLAKLARIM BÖLÜMÜ
   ========================================================================== */
.hb-drafts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 920px) {
  .hb-drafts-grid {
    grid-template-columns: 1fr;
  }
}

.hb-draft-item {
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-md);
  padding: 18px;
  background-color: var(--hb-surface);
  box-shadow: var(--hb-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.hb-draft-empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--hb-surface);
  border: 1px dashed var(--hb-border-strong);
  border-radius: var(--hb-radius-md);
  color: var(--hb-text-soft);
  font-size: 14.5px;
}

/* ==========================================================================
   NASIL ÇALIŞIR, GİZLİLİK VE SSS
   ========================================================================== */
.hb-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 860px) {
  .hb-steps-grid {
    grid-template-columns: 1fr;
  }
}

.hb-step-card {
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-md);
  padding: 24px;
  box-shadow: var(--hb-shadow-sm);
}

.hb-step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--hb-primary) 0%, var(--hb-accent) 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.hb-step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.hb-step-card p {
  margin: 0;
  font-size: 14px;
  color: var(--hb-text-muted);
}

.hb-privacy-banner {
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-left: 5px solid var(--hb-success);
  border-radius: var(--hb-radius-md);
  padding: 26px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: var(--hb-shadow-sm);
}

.hb-privacy-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.hb-privacy-banner h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.hb-privacy-banner p {
  margin: 0;
  color: var(--hb-text-muted);
  font-size: 14px;
}

/* Kategori Filtre Çubuğu (templates.php) */
.hb-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 10px;
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-md);
  box-shadow: var(--hb-shadow-xs);
}

.hb-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hb-text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.hb-filter-chip:hover {
  background: var(--hb-surface-alt);
  color: var(--hb-text);
}

.hb-filter-chip.is-active {
  background: var(--hb-primary);
  color: #ffffff;
  box-shadow: var(--hb-shadow-xs);
}

/* SSS (FAQ) */
.hb-faq-list,
.hb-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .hb-faq-list,
  .hb-faq-grid {
    grid-template-columns: 1fr;
  }
}

.hb-faq-item {
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-md);
  padding: 20px;
  box-shadow: var(--hb-shadow-xs);
}

.hb-faq-item h3 {
  font-weight: 700;
  color: var(--hb-text);
  font-size: 15.5px;
  margin: 0 0 8px;
}

.hb-faq-item p {
  margin: 0;
  color: var(--hb-text-muted);
  font-size: 14px;
}

/* ==========================================================================
   ALT BİLGİ (FOOTER)
   ========================================================================== */
.hb-footer {
  border-top: 1px solid var(--hb-border);
  background: var(--hb-surface);
  padding: 44px 0 28px;
  font-size: 13.5px;
  color: var(--hb-text-soft);
}

.hb-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .hb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hb-footer-grid {
    grid-template-columns: 1fr;
  }
}

.hb-footer-grid h4 {
  color: var(--hb-text);
  font-size: 14px;
  margin: 0 0 12px;
}

.hb-footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hb-footer-grid a,
.hb-footer-bottom a {
  color: var(--hb-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.hb-footer-grid a:hover,
.hb-footer-bottom a:hover {
  color: var(--hb-primary);
}

.hb-footer-inner,
.hb-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--hb-border);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
