﻿/* ==========================================================================
   style-gaststaette-sw.css
   Gastronomie-Verzeichnis Schweinfurt
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design-Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Farben – fränkisch-warm */
  --color-primary: #7a1f1f;         /* Dunkelrot (Wein/Franken) */
  --color-primary-dark: #5a1515;
  --color-primary-light: #a83232;
  --color-accent: #d4a24c;          /* Gold */
  --color-accent-dark: #b8882e;
  --color-bg: #fdfaf5;              /* Cremeweiß */
  --color-bg-alt: #f5ede0;
  --color-bg-box: #ffffff;
  --color-text: #2b2320;
  --color-text-muted: #6b5d56;
  --color-border: #e8ddd0;
  --color-link: #7a1f1f;
  --color-link-hover: #d4a24c;
  --color-success: #4a7c3a;
  --color-info: #3a5a7c;

  /* Typografie */
  --font-sans: "Source Sans 3", "Source Sans Pro", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

  /* Abstände */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --sidebar-width: 280px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Schatten */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   2. Reset & Basis
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Typografie
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  margin-bottom: 0.75em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: var(--space-xl);
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--color-border);
}
h3 { font-size: 1.25rem; color: var(--color-primary-dark); }

p { margin-bottom: 1em; }

a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

a:hover,
a:focus {
  color: var(--color-link-hover);
  border-bottom-color: var(--color-link-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

strong { font-weight: 700; color: var(--color-primary-dark); }
em { font-style: italic; }

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

li { margin-bottom: 0.35em; }

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.5em 1em;
  margin: 1.5em 0;
  background: var(--color-bg-alt);
  font-style: italic;
  color: var(--color-text-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* --------------------------------------------------------------------------
   4. Skip-Link (Barrierefreiheit)
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  border: none;
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   5. Layout-Container
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-xl);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xxl);
  align-items: start;
}

.layout > main { min-width: 0; }

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

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: var(--space-xl) 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212,162,76,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.site-header .wrap {
  position: relative;
  z-index: 1;
}

.site-header h1 {
  color: #fff;
  margin-bottom: 0.25em;
  letter-spacing: -0.01em;
}

.site-header .tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   7. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb a {
  color: var(--color-text-muted);
  border-bottom: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
  border-bottom: 1px dotted var(--color-primary);
}

.breadcrumb strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Hero-Bild
   -------------------------------------------------------------------------- */
.hero {
  margin: 0 0 var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-bg-alt);
}

.hero-banner {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}

.hero figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
  background: var(--color-bg-box);
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   9. Hinweis-Boxen (farewell-note)
   -------------------------------------------------------------------------- */
.farewell-note {
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #fff 100%);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-sm);
}

.farewell-note h3 {
  margin-top: 0;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.farewell-note p:last-child { margin-bottom: 0; }

.farewell-note a {
  color: var(--color-primary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. Benefits-Grid (Schwerpunkte)
   -------------------------------------------------------------------------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0 var(--space-xl);
}

.benefit {
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.benefit:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.benefit h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.benefit p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   11. Rubriken-Liste (klickbare Karten)
   -------------------------------------------------------------------------- */
.rubriken-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.rubriken-list li { margin: 0; }

.rubriken-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s;
}

.rubriken-list a:hover,
.rubriken-list a:focus {
  background: var(--color-bg-alt);
  border-color: var(--color-accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

.rubrik-icon {
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--color-bg-alt);
  border-radius: 50%;
  flex-shrink: 0;
}

.rubrik-content {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  min-width: 0;
}

.rubrik-content strong {
  color: var(--color-primary-dark);
  font-size: 1.05rem;
  font-family: var(--font-serif);
}

.rubrik-content span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.rubrik-arrow {
  font-size: 1.5rem;
  color: var(--color-accent);
  font-weight: 700;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.rubriken-list a:hover .rubrik-arrow {
  transform: translateX(4px);
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .rubriken-list a {
    grid-template-columns: auto 1fr;
    padding: var(--space-md);
  }
  .rubrik-arrow { display: none; }
}

/* --------------------------------------------------------------------------
   12. Sidebar (wird per PHP eingebunden)
   -------------------------------------------------------------------------- */
.sidebar,
aside.sidebar {
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  position: sticky;
  top: 1rem;
  box-shadow: var(--shadow-sm);
}

.sidebar h3,
.sidebar h4 {
  font-size: 1rem;
  margin-top: 0;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--color-border);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px dotted var(--color-border);
}

.sidebar li:last-child { border-bottom: none; }

.sidebar a {
  color: var(--color-text);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-xl) 0;
  margin-top: var(--space-xxl);
}

.site-footer .wrap {
  text-align: center;
}

.footer-main {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
}

.footer-legal {
  font-size: 0.875rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0.5em;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.footer-legal a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   14. Utility-Klassen
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.mt-lg { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-xl); }

/* --------------------------------------------------------------------------
   15. Responsiv – Feinschliff
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .site-header { padding: var(--space-lg) 0; }
  .site-header .tagline { font-size: 1rem; }
  h2 { margin-top: var(--space-lg); }
  .benefits { grid-template-columns: 1fr; }
  .farewell-note { padding: var(--space-md); }
  .wrap { padding: 0 var(--space-sm); }
}

/* --------------------------------------------------------------------------
   16. Print-Styles
   -------------------------------------------------------------------------- */
@media print {
  .skip-link,
  .site-header::before,
  .rubrik-arrow,
  .sidebar,
  .site-footer { display: none; }

  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; border: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
  .farewell-note, .benefit { border: 1px solid #ccc; break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   17. Reduzierte Bewegung (Accessibility)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* --------------------------------------------------------------------------
   18. Sidebar – Erweiterungen
   -------------------------------------------------------------------------- */
.sidebar-nav ul {
  list-style: none;
  padding: 0;
}

.sidebar-nav li {
  margin: 0;
  padding: 0;
  border-bottom: 1px dotted var(--color-border);
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav a {
  display: block;
  padding: 0.6em 0.75em;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
}

.sidebar-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  padding-left: 1em;
  border-bottom: none;
}

.sidebar-nav li.active a {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

/* Alphabet-Grid */
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 4px;
  margin-top: 0.75em;
}

.alphabet-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.alphabet-grid a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: scale(1.05);
}

.alphabet-hint {
  margin-top: 0.75em;
  font-size: 0.875rem;
  text-align: right;
}

.alphabet-hint a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Sidebar-Tipps */
.sidebar-tips ul {
  list-style: none;
  padding: 0;
}

.sidebar-tips li {
  padding: 0.5em 0;
  border-bottom: 1px dotted var(--color-border);
}

.sidebar-tips li:last-child {
  border-bottom: none;
}

.sidebar-tips a {
  color: var(--color-text);
  font-size: 0.95rem;
  display: block;
  padding: 0.25em 0;
}

.sidebar-tips a:hover {
  color: var(--color-link-hover);
  padding-left: 0.5em;
}

/* Sidebar-CTA (Eintrag vorschlagen) */
.sidebar-cta {
  margin-top: var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-left: none;
  padding: var(--space-lg);
}

.sidebar-cta h3 {
  color: #fff;
  margin-top: 0;
}

.sidebar-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.sidebar-cta a {
  color: var(--color-accent);
  font-weight: 700;
  border-bottom: 1px dotted var(--color-accent);
}

.sidebar-cta a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
/* --------------------------------------------------------------------------
   Sidebar im Stil der Vorlage
   -------------------------------------------------------------------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.side-box {
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.side-box h2 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-primary);
}

.side-nav {
  display: flex;
  flex-direction: column;
}

.side-nav a {
  display: block;
  padding: 0.5em 0.75em;
  color: var(--color-text);
  border-radius: var(--radius);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-border);
  transition: all 0.2s;
}

.side-nav a:last-child {
  border-bottom: none;
}

.side-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  padding-left: 1em;
}

.side-nav a:active {
  background: var(--color-primary);
  color: #fff;
}

/* A–Z Grid */
.abc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.abc-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 0.25em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.abc-grid a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: scale(1.1);
}

.abc-grid a.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Sidebar-Tipps (aus words.php) */
.side-box p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5em;
}

.side-box p:last-child {
  margin-bottom: 0;
}

/* Responsive: Sidebar unter dem Inhalt auf Mobil */
@media (max-width: 900px) {
  .sidebar {
    order: 2;
  }
  
  .abc-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 480px) {
  .abc-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin: var(--space-lg) 0 var(--space-xl);
}

@media (max-width: 768px) {
  .benefits {
    grid-template-columns: 1fr;
  }
}
