/* =========================================================================
 * Open Sans — self-hosted (vorher Google Fonts CDN)
 *
 * Subsets: latin + latin-ext (deckt DE + EN + TR + FR + IT ab; RU braucht
 * cyrillic — wenn du das willst, ergänze via gwfh.mranftl.com Subset 'cyrillic'
 * und füge entsprechende @font-face-Blöcke hinzu).
 * Quelle: google-webfonts-helper (Mirror von Google Fonts).
 * font-display: swap = Fallback-Font sofort sichtbar, Web-Font tauscht still.
 * ========================================================================= */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-300.bfaf4e47e716.woff2") format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-regular.be54f77ab356.woff2") format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-600.ab5f9cdfc018.woff2") format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-700.1779a8586ad4.woff2") format('woff2');
}

/* =========================================================================
 * Würzburg Sehen — Design System
 *
 * Reusable component classes prefixed with .ws- (= "wuerzburg sehen").
 * Built on top of Tailwind utilities (self-hosted via tailwind.min.css).
 * Used by all apps: districts, attractions, restaurants, jobs, events, etc.
 *
 * Token-Quelle: tailwind.config.js (Self-Hosting, lokal kompiliert).
 *   ws-primary    #3381B5  (Stadt-Blau, Würzburg-Akzent)
 *   ws-accent     #FF6E1E  (CTA/Highlight)
 *   ws-ink        #1F2937  (Haupt-Text)
 *   ws-muted      #6B7280  (Sekundär-Text)
 *   ws-bg         #FAFAFA  (Seiten-Hintergrund)
 *   ws-border     #E5E7EB  (Trennlinien, Card-Rahmen)
 * ========================================================================= */

/* ---------- Layout ---------- */
.ws-container { max-width: 1200px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 1024px) { .ws-container { padding-inline: 2rem; } }

.ws-section { padding-block: 2rem; }
.ws-section-title { font-size: 1.875rem; font-weight: 300; margin-bottom: 1rem; color: #1F2937; }
.ws-section-subtitle { font-size: 1.125rem; color: #6B7280; margin-bottom: 2rem; }

/* ---------- Header / Footer ---------- */
.ws-header { background: #fff; border-bottom: 1px solid #E5E7EB; }
.ws-footer { background: #fff; border-top: 1px solid #E5E7EB; }

/* ---------- Navigation ---------- */
.ws-nav { background: #fff; }
.ws-nav-link {
  display: inline-block;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  color: #1F2937;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.ws-nav-link:hover { color: #3381B5; }
.ws-nav-link.is-active { color: #3381B5; border-bottom-color: #3381B5; font-weight: 600; }

.ws-link { color: #3381B5; text-decoration: none; }
.ws-link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.ws-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.ws-btn-primary { background: #3381B5; color: #fff; }
.ws-btn-primary:hover { background: #1E5A85; }
.ws-btn-accent { background: #FF6E1E; color: #fff; }
.ws-btn-accent:hover { background: #E25500; }
.ws-btn-outline { background: transparent; color: #3381B5; border-color: #3381B5; }
.ws-btn-outline:hover { background: #3381B5; color: #fff; }
.ws-btn-ghost { color: #1F2937; background: transparent; }
.ws-btn-ghost:hover { background: #F3F4F6; }

/* ---------- Cards ---------- */
.ws-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ws-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ws-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .ws-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.ws-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.ws-card:hover { box-shadow: 0 8px 16px -4px rgba(0,0,0,.08); transform: translateY(-2px); }
.ws-card-accent { border-top: 4px solid var(--ws-card-accent-color, #3381B5); }
.ws-card-image { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: #F3F4F6; }
.ws-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.ws-card-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.ws-card-text { font-size: 0.875rem; color: #6B7280; margin: 0; }
.ws-card-meta { font-size: 0.75rem; color: #9CA3AF; margin-top: auto; }

/* ---------- Badges & Tags ---------- */
.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #E5E7EB;
  color: #1F2937;
}
.ws-badge-primary { background: #DBEAFE; color: #1E40AF; }
.ws-badge-success { background: #DCFCE7; color: #166534; }
.ws-badge-warning { background: #FEF3C7; color: #92400E; }
.ws-badge-info    { background: #E0F2FE; color: #075985; }

.ws-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background: #F3F4F6;
  color: #374151;
}

/* ---------- Hero ---------- */
.ws-hero {
  position: relative;
  padding-block: 3rem;
  background: linear-gradient(135deg, #3381B5 0%, #1E5A85 100%);
  color: #fff;
}
.ws-hero-title { font-size: 2.5rem; font-weight: 300; margin: 0 0 0.5rem; }
.ws-hero-subtitle { font-size: 1.125rem; opacity: 0.9; margin: 0; }
.ws-hero-accent {
  border-left: 4px solid var(--ws-hero-accent-color, #FF6E1E);
  padding-left: 1rem;
}

/* ---------- Stats Block (für Demografie) ---------- */
.ws-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .ws-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.ws-stat {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  padding: 1rem;
}
.ws-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #3381B5;
  line-height: 1.1;
  display: block;
}
.ws-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  margin-top: 0.25rem;
}
.ws-stat-meta { font-size: 0.6875rem; color: #9CA3AF; margin-top: 0.25rem; }

/* ---------- Article / Prose ---------- */
.ws-prose { max-width: 65ch; }
.ws-prose h2 { font-size: 1.5rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.ws-prose h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.ws-prose p { margin-bottom: 1rem; line-height: 1.6; }
.ws-prose ul, .ws-prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.ws-prose a { color: #3381B5; text-decoration: underline; }

/* ---------- Meta-Rows (Key-Value-Listen) ---------- */
.ws-meta-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ws-meta-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.25rem; border-bottom: 1px solid #F3F4F6; }
.ws-meta-row:last-child { border-bottom: none; }
.ws-meta-key { font-size: 0.875rem; color: #6B7280; }
.ws-meta-value { font-size: 0.875rem; font-weight: 600; text-align: right; }

/* ---------- Breadcrumb ---------- */
.ws-breadcrumb { background: #F9FAFB; border-bottom: 1px solid #E5E7EB; padding-block: 0.6rem; font-size: 0.8125rem; }
.ws-breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.ws-breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: #9CA3AF; }
.ws-breadcrumb a { color: #3381B5; text-decoration: none; }
.ws-breadcrumb a:hover { text-decoration: underline; }
.ws-breadcrumb [aria-current="page"] { color: #6B7280; }

/* ---------- Filter-Pills (z.B. Kategorie-Filter über Karten-Listen) ---------- */
.ws-filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ws-filter-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #E5E7EB;
  font-size: 0.875rem;
  color: #1F2937;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.ws-filter-pill::before {
  content: ""; width: 0.55rem; height: 0.55rem;
  border-radius: 9999px;
  background: var(--ws-pill-color, #3381B5);
  flex-shrink: 0;
}
.ws-filter-pill:hover { border-color: var(--ws-pill-color, #3381B5); }
.ws-filter-pill.is-active {
  background: var(--ws-pill-color, #3381B5);
  border-color: var(--ws-pill-color, #3381B5);
  color: #fff;
}
.ws-filter-pill.is-active::before { background: rgba(255,255,255,.9); }
.ws-filter-pill-count { color: #9CA3AF; font-size: 0.8125rem; }
.ws-filter-pill.is-active .ws-filter-pill-count { color: rgba(255,255,255,.85); }

/* ---------- Card-Location-Zeile (Stadtteil-Pin) ---------- */
.ws-card-location { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8125rem; color: #6B7280; }
.ws-card-location svg { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }

/* ---------- Alerts / Messages ---------- */
.ws-alert { padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 0.5rem; font-size: 0.875rem; }
.ws-alert-info    { background: #E0F2FE; color: #075985; }
.ws-alert-success { background: #DCFCE7; color: #166534; }
.ws-alert-warning { background: #FEF3C7; color: #92400E; }
.ws-alert-error,
.ws-alert-danger  { background: #FEE2E2; color: #991B1B; }

/* ---------- Attribution (Pflicht für DL-DE-BY-2.0 etc.) ---------- */
.ws-attribution {
  font-size: 0.75rem;
  color: #9CA3AF;
  font-style: italic;
}
.ws-attribution a { color: inherit; text-decoration: underline; }

/* ---------- UGC-Block (Sprach-Markierung für Browser-Translate) ---------- */
.ugc-content { display: block; }

/* ---------- Forms ---------- */
.ws-input {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  background: #fff;
}
.ws-input:focus { outline: none; border-color: #3381B5; box-shadow: 0 0 0 3px rgba(51,129,181,.15); }
.ws-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }

/* Auto-Styling für nackte Django-Forms innerhalb von .ws-form-fields (allauth, Self-Service). */
.ws-form-fields .ws-form-field { margin-bottom: 1rem; }
.ws-form-fields label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; color: #1F2937; }
.ws-form-fields input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
.ws-form-fields textarea,
.ws-form-fields select {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  background: #fff;
  color: #1F2937;
}
.ws-form-fields input:focus,
.ws-form-fields textarea:focus,
.ws-form-fields select:focus {
  outline: none;
  border-color: #3381B5;
  box-shadow: 0 0 0 3px rgba(51,129,181,.15);
}
.ws-form-fields .has-error input:not([type=checkbox]):not([type=radio]),
.ws-form-fields .has-error textarea,
.ws-form-fields .has-error select { border-color: #DC2626; }
.ws-form-help  { color: #6B7280; font-size: 0.75rem; margin-top: 0.25rem; }
.ws-form-error { color: #991B1B; font-size: 0.8125rem; margin-top: 0.25rem; }

/* Auth-Entrance-Pages (Login/Signup/Pw-Reset) — Card-Layout auf <main> via body-class. */
body.is-auth-page main {
  max-width: 28rem;
  margin: 2.5rem auto;
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
body.is-auth-page main h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem; color: #1F2937; }
body.is-auth-page main p { font-size: 0.9375rem; color: #374151; margin: 0 0 1rem; }
body.is-auth-page main p a { color: #3381B5; text-decoration: underline; }
body.is-auth-page main hr { border: 0; border-top: 1px solid #E5E7EB; margin: 1.5rem 0; }

/* Login-CTA fürs Registrieren (unter dem Login-Form). */
.ws-auth-divider { border: 0; border-top: 1px solid #E5E7EB; margin: 1.5rem 0 1.25rem; }
.ws-auth-cta { text-align: center; }
.ws-auth-cta-text { font-size: 0.875rem; color: #6B7280; margin: 0 0 0.75rem !important; }
.ws-btn-block { display: flex; width: 100%; justify-content: center; }

/* ---------- Legacy alert.css preserved ---------- */
.alert-debug { color: black; background-color: white; border-color: #d6e9c6; }
.alert-error { color: #b94a48; background-color: #f2dede; border-color: #eed3d7; }

/* ---------- Hero mit Foto (Home) ---------- */
.ws-hero-photo {
  position: relative;
  isolation: isolate;
  padding-block: 5rem;
  color: #fff;
  overflow: hidden;
}
.ws-hero-photo::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--ws-hero-img-jpg);
  background-image: image-set(
    var(--ws-hero-img-webp) type("image/webp"),
    var(--ws-hero-img-jpg)  type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
}
.ws-hero-photo::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30,90,133,.55) 0%, rgba(31,41,55,.65) 100%);
}
.ws-hero-photo-title    { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; margin: 0 0 .75rem; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ws-hero-photo-subtitle { font-size: 1.125rem; max-width: 42rem; margin: 0 auto 2rem; opacity: .95; text-shadow: 0 1px 4px rgba(0,0,0,.35); }

/* ---------- Home-Suchformular (groß, mittig) ---------- */
.ws-search-hero { display: flex; max-width: 40rem; margin-inline: auto; }
.ws-search-hero input {
  flex: 1; border: 0; padding: .9rem 1.1rem; font-size: 1rem;
  border-radius: .5rem 0 0 .5rem; background: #fff; color: #1F2937;
}
.ws-search-hero input:focus { outline: 2px solid #FF6E1E; outline-offset: 2px; }
.ws-search-hero button {
  border: 0; padding: .9rem 1.4rem; font-weight: 600; cursor: pointer;
  border-radius: 0 .5rem .5rem 0; background: #FF6E1E; color: #fff;
}
.ws-search-hero button:hover { background: #E25500; }

/* ---------- Entry-Tiles (Home-Kacheln) ---------- */
.ws-tile-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .ws-tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ws-tile-grid { grid-template-columns: repeat(3, 1fr); } }

.ws-tile {
  position: relative; display: block; overflow: hidden;
  border-radius: .75rem; aspect-ratio: 4 / 3;
  text-decoration: none; color: #fff;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.15);
}
.ws-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -8px rgba(0,0,0,.25); }
.ws-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s;
}
.ws-tile:hover img { transform: scale(1.04); }
.ws-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.7) 100%);
}
.ws-tile-label {
  position: absolute; left: 1rem; right: 1rem; bottom: 1.75rem; z-index: 1;
  font-size: 1.375rem; font-weight: 600; line-height: 1.15;
}
.ws-tile-sub {
  position: absolute; left: 1rem; right: 1rem; bottom: .75rem; z-index: 1;
  font-size: .8125rem; opacity: .9;
}

/* ---------- Cookie-Banner (TTDSG) ---------- */
.ws-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ws-bg, #fff); color: var(--ws-ink, #18181b);
  border-top: 1px solid var(--ws-border, #e5e7eb);
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}
.ws-cookie-banner-body {
  max-width: 64rem; margin: 0 auto; padding: 1rem 1.25rem;
  display: grid; gap: .75rem; grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .ws-cookie-banner-body { grid-template-columns: 1fr auto; align-items: center; }
}
.ws-cookie-banner-title { font-size: 1rem; font-weight: 600; margin: 0; }
.ws-cookie-banner-text { font-size: .875rem; line-height: 1.5; margin: 0; color: var(--ws-ink, #18181b); }
.ws-cookie-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Two-Click-Embed (DSGVO) ---------- */
.ws-embed-figure { margin: 1.5rem 0; }
.ws-embed { position: relative; aspect-ratio: 16 / 9; border-radius: .5rem; overflow: hidden; background: #111; }
.ws-embed-gate {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer;
  display: block;
}
.ws-embed-thumb { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.ws-embed-gate-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; padding: 1.5rem; text-align: center;
}
.ws-embed-gate-text { font-size: .875rem; line-height: 1.45; max-width: 38ch; margin: 0; }
.ws-embed-gate-play {
  display: inline-block; padding: .5rem 1rem; border-radius: 999px;
  background: rgba(255,255,255,.18); font-size: 1rem; font-weight: 500;
  backdrop-filter: blur(4px);
}
.ws-embed-gate:hover .ws-embed-gate-play,
.ws-embed-gate:focus-visible .ws-embed-gate-play { background: rgba(255,255,255,.3); }
.ws-embed-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.ws-embed-caption { font-size: .8125rem; color: var(--ws-muted, #6b7280); margin-top: .5rem; }

/* ---------- Print ---------- */
@media print {
  .ws-header, .ws-footer, .ws-nav, .ws-language-switcher { display: none; }
}
