/* Belediye Dilekçe — zengin tasarım, formatlar-theme token'larıyla uyumlu */

/* ---- Sayfa shell ---- */
.bd-spoke, .bd-hub, .bd-archive {
  padding: 1.5rem 0 3rem;
  background: linear-gradient(180deg, var(--secondary) 0%, var(--background) 200px);
}
.bd-spoke > .container,
.bd-hub > .container,
.bd-archive > .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- HERO / HEADER (with accent bar) ---- */
.bd-spoke__header, .bd-hub__header, .bd-archive__header {
  position: relative;
  background: linear-gradient(135deg, var(--card) 0%, var(--secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bd-spoke__header::before,
.bd-hub__header::before,
.bd-archive__header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}
.bd-spoke__header h1,
.bd-hub__header h1,
.bd-archive__header h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.bd-spoke__intro, .bd-archive__header > p {
  font-size: 1.05rem;
  color: var(--foreground);
  line-height: 1.7;
  margin: 0;
  max-width: 65ch;
}
.bd-hub__tag {
  font-size: 1rem;
  color: var(--muted-foreground);
  margin: 0;
}
.bd-hub__tag strong,
.bd-archive__header strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---- Generic section cards ---- */
.bd-spoke__info, .bd-spoke__docs, .bd-spoke__legal, .bd-spoke__faq,
.bd-hub__profile, .bd-hub__nap, .bd-hub__depts, .bd-hub__grid,
.bd-hub__rules, .bd-hub__faq, .bd-hub__neighbors,
.bd-archive__intro, .bd-archive__rules, .bd-archive__faq,
.bd-channels, .bd-neighbors {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.bd-spoke__form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Section h2 — decorative left border */
.bd-spoke h2, .bd-hub h2, .bd-archive h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.bd-spoke h3, .bd-hub h3, .bd-archive h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--foreground); margin: 0 0 0.5rem;
}
.bd-spoke p, .bd-hub p, .bd-archive p {
  color: var(--foreground);
  line-height: 1.7;
  margin: 0 0 0.875rem;
}
.bd-spoke p:last-child, .bd-hub p:last-child, .bd-archive p:last-child { margin-bottom: 0; }

.bd-spoke ul, .bd-hub ul, .bd-archive ul { margin: 0; padding-left: 1.25rem; line-height: 1.7; }
.bd-spoke ul li, .bd-hub ul li, .bd-archive ul li { margin-bottom: 0.375rem; color: var(--foreground); }

/* ---- Info card grid ---- */
.bd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.bd-info-card {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.bd-info-card:hover {
  border-color: var(--ring);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.bd-info-card h3 {
  font-size: 0.825rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bd-info-card p {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height: 1.5;
  color: var(--foreground);
  font-weight: 500;
}
.bd-info-card p:last-child { margin-bottom: 0; }
.bd-info-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.bd-info-card a:hover { text-decoration: underline; }
.bd-info-card ul { list-style: none; padding: 0; font-size: 0.875rem; }
.bd-info-card ul li { margin-bottom: 0.25rem; }

/* ---- Channel cards ---- */
.bd-channels__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}
.bd-channel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  position: relative;
}
.bd-channel:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.bd-channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--muted));
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.bd-channel__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--primary);
}
.bd-channel__body {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  display: block;
  line-height: 1.4;
  word-break: break-word;
}
a.bd-channel__body, .bd-channel a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ---- Department cards ---- */
.bd-depts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.bd-dept {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  transition: all 0.15s;
}
.bd-dept:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.bd-dept h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.bd-dept p {
  font-size: 0.875rem;
  margin: 0.25rem 0;
  color: var(--foreground);
}
.bd-dept__addr {
  color: var(--muted-foreground);
  font-size: 0.8rem !important;
  margin-top: 0.375rem !important;
}

/* ---- Facts (dl) ---- */
.bd-hub__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.bd-hub__facts dt {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.bd-hub__facts dd {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

/* ---- Petition grid (hub) ---- */
.bd-cat-block { margin-bottom: 1.75rem; }
.bd-cat-block:last-child { margin-bottom: 0; }
.bd-cat-block h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 0.625rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.bd-cat-block h3::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 60px; height: 2px;
  background: var(--accent);
}
.bd-petition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.875rem;
}
.bd-petition-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  min-height: 90px;
  position: relative;
}
.bd-petition-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateX(2px);
}
.bd-petition-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.35;
  margin: 0;
}
.bd-petition-card__cta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---- Docs list ---- */
.bd-docs-list {
  list-style: none !important;
  padding: 0 !important;
  display: grid;
  gap: 0.625rem;
  margin: 0;
}
.bd-docs-list li {
  background: var(--secondary);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem 0.75rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  color: var(--foreground);
  position: relative;
  line-height: 1.5;
}
.bd-docs-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ---- Legal box ---- */
.bd-spoke__legal p {
  background: linear-gradient(135deg, var(--secondary), var(--card));
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 0;
  font-family: var(--font-mono, 'Space Grotesk', monospace);
  font-size: 0.9rem;
  color: var(--foreground);
}

/* ---- FAQ accordion (theme-aligned) ---- */
.bd-faq-list {
  display: grid;
  gap: 0.5rem;
}
.bd-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.bd-faq-item[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.bd-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--foreground);
  font-size: 1rem;
  transition: background 0.15s;
  gap: 1rem;
}
.bd-faq-item summary::-webkit-details-marker { display: none; }
.bd-faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.2s;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
}
.bd-faq-item[open] summary::after { transform: rotate(45deg); }
.bd-faq-item summary:hover { background: var(--secondary); }
.bd-faq-item > div {
  padding: 0 1.25rem 1.125rem;
  color: var(--foreground);
  line-height: 1.7;
  font-size: 0.95rem;
}
.bd-faq-item > div p { margin-bottom: 0.75rem; }
.bd-faq-item > div p:last-child { margin-bottom: 0; }
.bd-faq-item > div strong { color: var(--primary); }

/* ---- Neighbors grid ---- */
.bd-neighbors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.625rem;
}
.bd-neighbor {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--foreground);
  transition: all 0.15s;
  text-decoration: none;
  font-weight: 500;
}
.bd-neighbor:hover {
  background: var(--card);
  border-color: var(--accent);
  transform: translateX(2px);
}
.bd-neighbor__arrow {
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.15s;
}
.bd-neighbor:hover .bd-neighbor__arrow { transform: translateX(3px); }

/* ---- Benefit list (archive) ---- */
.bd-archive__benefits {
  list-style: none !important;
  padding: 0 !important;
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 0 !important;
}
.bd-archive__benefits li {
  background: linear-gradient(135deg, var(--secondary), var(--card));
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--foreground);
}
.bd-archive__benefits li strong {
  color: var(--primary);
  font-weight: 700;
}

/* ---- Meta footer (review + disclaimer) ---- */
.bd-spoke__meta, .bd-hub__meta {
  background: var(--secondary);
  border: 1px solid var(--border);
  padding: 1.125rem 1.5rem;
  border-radius: var(--radius-md);
}
.bd-spoke__review {
  font-size: 0.875rem !important;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem !important;
  font-weight: 500;
}
.bd-spoke__review strong { color: var(--primary); }
.bd-spoke__disclaimer {
  font-size: 0.8rem !important;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0 !important;
}
.bd-spoke__disclaimer a { color: var(--accent); font-weight: 600; }

/* ---- Municipality archive ---- */
.bd-archive__filter {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
}
.bd-archive__filter input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--foreground);
}
.bd-archive__filter input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.12);
}
.bd-province-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}
.bd-province-block h2 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 0 0 1rem;
}
.bd-muni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem;
}
.bd-muni-card {
  background: linear-gradient(135deg, var(--secondary), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.bd-muni-card:hover {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.bd-muni-card h3 {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}
.bd-muni-card__pop {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* ======================================================= */
/* Interactive form engine */

.fp-bd-wrapper {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 1.25rem;
  margin: 0;
}
@media (max-width: 860px) {
  .fp-bd-wrapper { grid-template-columns: 1fr; }
}

.fp-bd-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: linear-gradient(180deg, var(--secondary) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.fp-bd-panel__title {
  font-size: 1.05rem;
  margin: 0 0 0.375rem;
  color: var(--primary);
  font-weight: 700;
}
.fp-bd-panel__desc {
  margin: 0 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.825rem;
  line-height: 1.5;
}

.fp-bd-form__group { margin-bottom: 0.875rem; }
.fp-bd-form__group label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--foreground);
  line-height: 1.35;
}
.fp-bd-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--card);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fp-bd-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
}
textarea.fp-bd-input { min-height: 3rem; resize: vertical; font-family: inherit; }
.fp-bd-form__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.fp-bd-form__actions .btn { width: 100%; }
.fp-bd-form__notice {
  margin: 0.875rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.4;
}

.fp-bd-preview {
  background: linear-gradient(135deg, var(--muted) 0%, var(--secondary) 100%);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.fp-bd-preview__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.875rem;
  padding: 0 0.25rem;
}
.fp-bd-preview__head strong {
  color: var(--primary);
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fp-bd-preview__document {
  background: #fff;
  padding: 2.5rem 3rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-family: 'Times New Roman', 'Liberation Serif', Georgia, serif;
  font-size: 11.5pt;
  line-height: 1.75;
  color: #111;
  min-height: 420px;
}
.fp-bd-preview__document p { margin: 0 0 0.875em; }

/* Placeholder spans */
.fp-bd-ph {
  display: inline-block;
  min-width: 80px;
  padding: 0 0.35rem;
  background: #fef3c7;
  border-bottom: 1px dashed #d97706;
  color: #92400e;
  font-style: italic;
  transition: background 0.15s;
  border-radius: 2px;
}
.fp-bd-ph--filled {
  background: transparent;
  border-bottom: none;
  color: inherit;
  font-style: normal;
}

/* ---- Print media ---- */
@media print {
  body * { visibility: hidden; }
  .fp-bd-preview__document, .fp-bd-preview__document * { visibility: visible; }
  .fp-bd-preview__document {
    position: absolute; left: 0; top: 0; width: 100%;
    box-shadow: none; padding: 15mm 20mm;
  }
  .fp-bd-panel, .fp-bd-preview__head, header, footer, nav, aside { display: none !important; }
  .fp-bd-ph { background: transparent; border-bottom: none; color: #000; font-style: normal; }
  .fp-bd-ph:not(.fp-bd-ph--filled)::before { content: '..........................'; font-size: 12pt; color: #444; }
  .fp-bd-ph:not(.fp-bd-ph--filled) { font-size: 0; }
  @page { size: A4; margin: 15mm 20mm; }
}

/* ---- Plain print mode (?print=1) ---- */
body.fp-bd-print-mode .fp-bd-wrapper { grid-template-columns: 1fr; }
body.fp-bd-print-mode .fp-bd-panel { display: none; }
body.fp-bd-print-mode .fp-bd-preview__head { display: none; }
body.fp-bd-print-mode .fp-bd-preview { background: transparent; padding: 0; border: none; box-shadow: none; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .fp-bd-panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .bd-spoke, .bd-hub, .bd-archive { padding: 1rem 0 2rem; }
  .bd-spoke__header, .bd-hub__header, .bd-archive__header { padding: 1.25rem 1.5rem; }
  .bd-spoke__info, .bd-spoke__docs, .bd-spoke__legal, .bd-spoke__faq,
  .bd-hub__profile, .bd-hub__nap, .bd-hub__depts, .bd-hub__grid,
  .bd-hub__rules, .bd-hub__faq, .bd-hub__neighbors,
  .bd-archive__intro, .bd-archive__rules, .bd-archive__faq,
  .bd-channels, .bd-neighbors, .bd-province-block { padding: 1.25rem 1.375rem; }
  .fp-bd-preview__document { padding: 1.75rem 1.5rem; font-size: 11pt; }
  .bd-spoke h2, .bd-hub h2, .bd-archive h2 { font-size: 1.15rem; }
}
