/* ===========================
   CAFÉ TASSO — Modernes CSS
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lato:wght@300;400;700&display=swap');

:root {
  --brown-dark:   #1a1a1a;
  --brown-mid:    #505050;
  --brown-light:  #c47080;
  --cream:        #f7f7f7;
  --cream-dark:   #eeeeee;
  --red:          #c41022;
  --red-dark:     #9a0c1a;
  --text:         #303030;
  --text-muted:   #808080;
  --border:       #e8e8e8;
  --white:        #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* ===========================
   LAYOUT WRAPPER
   =========================== */

.site-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(0,0,0,0.10);
}

/* ===========================
   HEADER
   =========================== */

.site-header {
  background: var(--red);
  padding: 14px 32px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 16px;
}

.site-header::before {
  display: none;
}

.header-logo {
  display: block;
  height: 68px;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  margin-bottom: 6px;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-top: 0;
  position: relative;
  z-index: 1;
  flex: 1;
  align-self: flex-end;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.12);
}

/* ===========================
   HERO IMAGE
   =========================== */

.hero-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* ===========================
   MAIN LAYOUT
   =========================== */

.page-body {
  display: grid;
  grid-template-columns: 240px 1fr 220px;
  gap: 0;
  min-height: 400px;
}

/* ===========================
   SIDEBAR LEFT (Programm / DB-Widget)
   =========================== */

.sidebar-left {
  background: var(--cream);
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.events-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  overflow-wrap: break-word;
  word-break: break-word;
}

.events-widget .widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
}

.events-widget a {
  color: var(--red);
  text-decoration: none;
}
.events-widget a:hover { text-decoration: underline; }

.events-widget .cancelled {
  color: var(--red);
  font-weight: 700;
}

.sidebar-buchspende {
  margin-top: 20px;
  text-align: center;
}

.sidebar-buchspende p {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.sidebar-buchspende img {
  max-width: 100px;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.sidebar-buchspende img:hover { opacity: 1; }

/* ===========================
   MAIN CONTENT
   =========================== */

.main-content {
  padding: 40px 36px;
  border-right: 1px solid var(--border);
}

.main-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 20px;
  line-height: 1.2;
}

.main-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin: 28px 0 14px;
}

.main-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brown-mid);
  margin: 20px 0 10px;
}

.main-content h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 8px;
}

.main-content p {
  margin-bottom: 14px;
  color: var(--text);
}

.main-content a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid rgba(196,16,34,0.25);
  transition: border-color 0.2s;
}
.main-content a:hover { border-bottom-color: var(--red); }

.main-content ul {
  margin: 10px 0 16px 20px;
}
.main-content ul li { margin-bottom: 4px; }

.welcome-intro {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.mission-list {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
}
.mission-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-style: italic;
  color: var(--brown-mid);
  border-bottom: 1px solid var(--cream-dark);
}
.mission-list li::before {
  content: '…';
  position: absolute;
  left: 0;
  color: var(--red);
  font-style: normal;
  font-weight: 700;
}

.cta-box {
  background: var(--cream);
  border-left: 4px solid var(--red);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
}
.cta-box a {
  font-weight: 700;
  font-size: 1rem;
  border: none !important;
}

.buchspende-info {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  margin-top: 20px;
  font-size: 0.9rem;
}
.buchspende-info strong { color: var(--brown-dark); }

/* Speisekarte page */
.bio-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brown-dark);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.bio-badge::before {
  content: '✿';
  color: var(--brown-light);
}

.menu-link-box {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.menu-link-box a {
  display: inline-block;
  padding: 10px 22px;
  background: var(--red);
  color: var(--white) !important;
  border: none !important;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s, transform 0.1s;
}
.menu-link-box a:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.saisonkarte-preview {
  max-width: 100%;
  border: 3px solid var(--cream-dark);
  border-radius: 4px;
  margin: 14px 0;
  display: block;
  transition: border-color 0.2s;
}
.saisonkarte-preview:hover { border-color: var(--brown-light); }

/* Ausstellung display */
.ausstellung-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.ausstellung-box strong { color: var(--brown-dark); display: block; margin-bottom: 4px; }
.ausstellung-box img {
  max-width: 140px;
  height: auto;
  margin: 10px auto 8px;
  display: block;
  border: 2px solid var(--border);
  border-radius: 3px;
}

/* Antiquariat */
.antiquariat-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cream-dark);
}
.antiquariat-section:last-of-type { border-bottom: none; }

/* Kontakt */
.kontakt-block {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.kontakt-block h3 { margin-top: 0; }
.kontakt-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
  margin-top: 12px;
}

/* Aktuelles */
.news-item {
  background: var(--cream);
  border-left: 4px solid var(--brown-light);
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 0 4px 4px 0;
}
.news-item h4 { margin-top: 0; color: var(--red); }
.news-item .separator {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Links page */
.links-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.links-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 1rem;
}
.links-list li:last-child { border-bottom: none; }

/* ===========================
   SIDEBAR RIGHT (Öffnungszeiten etc.)
   =========================== */

.sidebar-right {
  padding: 28px 18px;
  background: var(--cream);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.65;
}

.sidebar-card .card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--cream-dark);
}

.sidebar-card .ot-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.sidebar-card .ot-row span {
  white-space: nowrap;
  flex-shrink: 0;
}
.sidebar-card .ot-row span:first-child {
  font-weight: 700;
  color: var(--text);
  min-width: 56px;
}

.sidebar-map-link {
  display: block;
  text-align: center;
  margin-top: 8px;
}
.sidebar-map-link img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.sidebar-map-link:hover img { border-color: var(--brown-light); }

.sidebar-card .oekonum {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.sidebar-card .speisekarte-thumb {
  display: block;
  margin: 6px auto 0;
  max-width: 88px;
  height: auto;
  border: 2px solid var(--border);
  border-radius: 3px;
}

/* Ausstellung in sidebar */
.sidebar-ausstellung .ausst-title {
  font-weight: 700;
  color: var(--brown-dark);
  font-size: 0.83rem;
  display: block;
  margin-bottom: 4px;
}
.sidebar-ausstellung img {
  display: block;
  max-width: 120px;
  margin: 6px auto;
  border: 2px solid var(--border);
  border-radius: 3px;
}

/* ===========================
   FOOTER
   =========================== */

.site-footer {
  background: var(--red-dark);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 20px 40px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--white); }

/* ===========================
   IMPRESSUM (full width)
   =========================== */

.impressum-content {
  padding: 40px 48px;
  max-width: 800px;
  font-size: 0.9rem;
}

.impressum-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--brown-dark);
  margin-bottom: 24px;
}

.impressum-content h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brown-dark);
  margin: 20px 0 8px;
}

.impressum-content p,
.impressum-content li {
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.7;
}

.impressum-content ul { margin-left: 20px; }

/* ===========================
   HAMBURGER BUTTON
   (nur auf Mobil sichtbar)
   =========================== */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, width 0.25s;
}
.nav-toggle span:nth-child(1) { width: 24px; }
.nav-toggle span:nth-child(2) { width: 18px; }
.nav-toggle span:nth-child(3) { width: 24px; }

/* geöffnet */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 24px; }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 24px; }

/* ===========================
   RESPONSIVE — TABLET
   =========================== */

@media (max-width: 860px) {
  .site-wrapper {
    width: 100%;
  }

  /* Header: Logo + Burger nebeneinander */
  .site-header {
    padding: 18px 20px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .header-logo {
    max-width: 280px;
    flex: 1;
  }

  .nav-toggle {
    display: flex;
    margin-bottom: 0;
    padding: 10px 4px;
  }

  /* Nav: standardmäßig versteckt, beim Öffnen einblenden */
  .site-nav {
    width: 100%;
    flex-direction: column;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0;
  }

  .site-nav.open {
    max-height: 500px;
    padding: 8px 0 4px;
  }

  .site-nav a {
    padding: 12px 8px;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
    letter-spacing: 0.05em;
  }

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

  .site-nav a.active,
  .site-nav a:hover {
    border-left-color: var(--red);
    border-bottom-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
  }

  .hero-image {
    height: 200px;
  }

  /* Grid: einspaltig */
  .page-body {
    grid-template-columns: 1fr;
  }

  /* Reihenfolge auf Mobil:
     1. Hauptinhalt (main-content)
     2. Veranstaltungen/Events (sidebar-left)
     3. Öffnungszeiten/Info-Cards (sidebar-right) — unten als Block
  */
  .main-content   { order: 1; }
  .sidebar-left   { order: 2; }
  .sidebar-right  { order: 3; }

  .sidebar-left {
    border-top: 1px solid var(--border);
    padding: 20px;
  }

  /* Sidebar-right: Cards nebeneinander als Block am Seitenende */
  .sidebar-right {
    border-top: 2px solid var(--border);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    background: #f7f7f7;
  }

  .sidebar-card {
    flex: 1 1 140px;
    min-width: 140px;
    max-width: calc(50% - 6px);
    margin-bottom: 0;
  }

  .main-content {
    padding: 24px 20px;
  }

  .impressum-content {
    padding: 24px 20px;
  }
}

/* ===========================
   RESPONSIVE — MOBIL (klein)
   =========================== */

@media (max-width: 480px) {
  .site-header {
    padding: 14px 16px 0;
  }

  .header-logo {
    max-width: 220px;
  }

  .hero-image {
    height: 150px;
  }

  .main-content {
    padding: 20px 16px;
  }

  .sidebar-left, .sidebar-right {
    padding: 16px;
  }

  /* Unter 480px: Cards nebeneinander bleiben, aber schmaler */
  .sidebar-card {
    flex: 1 1 120px;
    min-width: 120px;
    max-width: calc(50% - 6px);
  }

  .main-content h1 {
    font-size: 1.6rem;
  }

  .site-footer {
    padding: 16px 16px;
    font-size: 0.78rem;
  }

  /* Nav-Links noch etwas größer für Finger */
  .site-nav a {
    padding: 14px 8px;
    font-size: 1rem;
  }
}

/* ===========================
   BARRIEREFREIHEIT
   =========================== */

/* Skip-Link: nur bei Tastaturfokus sichtbar */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--red);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* Fokus-Indikator für alle interaktiven Elemente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Nav-Links Fokus auf rotem Hintergrund */
.site-nav a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -3px;
}



@media print {
  .site-header, .site-nav, .nav-toggle,
  .sidebar-left, .sidebar-right, .site-footer { display: none; }
  .page-body { grid-template-columns: 1fr; }
  .main-content { padding: 0; order: unset; }
}
