/* Theme B — Brotbackhaus Puchheim-Ort */

/* ---------------------------------------------------------------
   Design Tokens
--------------------------------------------------------------- */
:root {
  --bg:          rgb(231, 221, 211);
  --bg-card:     #FFFFFF;
  --text-dark:   #3D2B1A;
  --text-mid:    #6B5744;
  --text-soft:   #8B7355;
  --text-muted:  #9B8472;
  --border:      #E0D5C5;
  --border-nav:  #D9D0C3;
  --accent:      #7A5230;
  --btn-fill:    #D4906A;
  --btn-text:    #F5EDE0;
  --font-serif:  'Fraunces', serif;
  --font-sans:   'DM Sans', sans-serif;

  /* page-color defaults (overridden per page) */
  --page-color:     #9E6040;
  --page-color-bg:  #9E604020;
  --page-color-text:#6A3010;

  /* shared radii */
  --radius-card:  12px;
  --radius-field: 8px;
}

/* Page-specific accent colours */
.page-infos {
  --page-color:     #7A9E82;
  --page-color-bg:  rgba(122, 158, 130, 0.12);
  --page-color-text:#3A6040;
}
.page-backtage {
  --page-color:     #9E6040;
  --page-color-bg:  rgba(158, 96, 64, 0.12);
  --page-color-text:#6A3010;
}
.page-rezepte {
  --page-color:     #7A9EBE;
  --page-color-bg:  rgba(122, 158, 190, 0.12);
  --page-color-text:#1A4060;
}
.page-impressum,
.page-verwaltung {
  --page-color:     #A898C0;
  --page-color-bg:  rgba(168, 152, 192, 0.12);
  --page-color-text:#5A3880;
}

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

/* ---------------------------------------------------------------
   Base
--------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ---------------------------------------------------------------
   Navigation
--------------------------------------------------------------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border-nav);
}

.logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-dark);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links { display: flex; align-items: center; }

.nav-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: 28px;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text-dark); }
.nav-link.active {
  background: var(--page-color-bg);
  color: var(--page-color-text);
  border-radius: 10px;
  padding: 3px 8px;
}

/* ---------------------------------------------------------------
   Main content wrapper
--------------------------------------------------------------- */
.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px 32px;
  flex: 1;
  width: 100%;
}

/* Accent stripe at top of subpages */
.page-infos .content::before,
.page-backtage .content::before,
.page-rezepte .content::before,
.page-impressum .content::before,
.page-verwaltung .content::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--page-color);
  margin: 0 -32px 28px;
}

/* ---------------------------------------------------------------
   Hero (Index)
--------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero img {
  width: 100%;
  display: block;
  background: var(--bg);
}

/* Rauch-Animation */
.smoke-wrap {
  position: absolute;
  left: 55%;
  top: 20%;
  pointer-events: none;
}
.smoke {
  position: absolute;
  width: 16px;
  border-radius: 50%;
  background: rgba(191, 191, 191, 0.55);
  animation: smokerise 3s ease-in infinite;
}
.smoke:nth-child(2) { left:  10px; width: 14px; animation-delay: 0.5s; }
.smoke:nth-child(3) { left:  -6px; width: 13px; animation-delay: 1s;   }
.smoke:nth-child(4) { left:   4px; width: 16px; animation-delay: 1.5s; }
.smoke:nth-child(5) { left:  12px; width: 13px; animation-delay: 2s;   }
.smoke:nth-child(6) { left:  -8px; width: 12px; animation-delay: 2.5s; }

@keyframes smokerise {
  0%   { bottom: 0; height: 14px; opacity: 0.9;
         transform: translateX(0) scaleX(1); }
  50%  { opacity: 0.6; transform: translateX(8px) scaleX(1.4); }
  100% { bottom: 80px; height: 36px; opacity: 0;
         transform: translateX(-6px) scaleX(2); }
}


/* ---------------------------------------------------------------
   Tagline (Index — over hero image, bottom 15%)
--------------------------------------------------------------- */
.tagline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 48px 32px 14px;
  background: linear-gradient(to bottom, transparent, rgba(231, 221, 211, 0.82) 60%, rgba(231, 221, 211, 0.97));
}
.tagline h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0 0 4px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.tagline h1 em {
  font-style: italic;
  color: var(--accent);
}
.tagline p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

/* ---------------------------------------------------------------
   Cards (Index — 3 column photo cards)
--------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 32px;
  margin-top: 65px;
  margin-bottom: 32px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 0.5px solid var(--border);
  overflow: hidden;
  transition: border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--accent);
}
.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body .btn {
  margin-top: auto;
  align-self: flex-start;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0 0 4px;
}
.card-sub {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0 0 14px;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------
   Nächster Backtag Banner (Index)
--------------------------------------------------------------- */
.next-backtag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 0.5px solid var(--border);
  padding: 20px 24px;
  margin: 0 32px 40px;
  transition: border-color 0.15s;
}
.next-backtag:hover {
  border-color: var(--accent);
}
.next-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.next-date {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-dark);
}
.next-detail {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 3px;
}
.next-smoke {
  font-size: 11px;
  color: #B09880;
  margin-top: 4px;
  font-style: italic;
  font-family: var(--font-sans);
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
footer {
  border-top: 0.5px solid var(--border-nav);
  padding: 14px 32px;
  text-align: center;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
}
footer a {
  color: var(--text-muted);
  text-decoration: none;
}
footer a:hover { color: var(--text-dark); }

/* ---------------------------------------------------------------
   Subpage header
--------------------------------------------------------------- */
.page-header {
  margin-bottom: 24px;
  padding-top: 28px;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--page-color-text);
  margin-bottom: 4px;
}
.page-header p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-soft);
}

/* hero-small is hidden in Theme B */
.hero-small { display: none; }

/* ---------------------------------------------------------------
   Buttons
--------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--btn-fill);
  color: var(--btn-text);
  border: none;
  border-radius: 20px;
  padding: 9px 22px;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: #B8724E; }

.btn-outline {
  background: transparent;
  color: var(--btn-fill);
  border: 1px solid var(--btn-fill);
}
.btn-outline:hover {
  background: var(--btn-fill);
  color: var(--btn-text);
}

.btn-primary   { background: var(--btn-fill); color: var(--btn-text); border-radius: 20px; }
.btn-secondary { background: var(--accent); color: white; }
.btn-ghost     { background: transparent; border: 0.5px solid var(--border); color: var(--text-dark); }
.btn-danger    { background: #c0392b; color: white; }
.btn-sm        { padding: 5px 14px; font-size: 11px; }
.btn-anmelden  { background: var(--btn-fill); color: var(--btn-text); padding: 8px 18px;
                  border: none; border-radius: 20px; cursor: pointer;
                  font-size: 12px; font-weight: 500; margin-left: auto; white-space: nowrap; }
.btn-disabled  { background: var(--text-muted) !important; cursor: not-allowed; }

/* ---------------------------------------------------------------
   Expandable cards (Backtage)
--------------------------------------------------------------- */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 0.5px solid var(--border);
  margin-bottom: 10px;
}
.card-header:hover { background: #faf7f3; }

/* When card-header is inside a .card, the card provides the outer border already */
.card > .card-header {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.datum-badge {
  background: var(--page-color, var(--btn-fill));
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-field);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}
.uhrzeit         { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.termin-datum    { display: flex; flex-direction: column; gap: 2px; min-width: 100px; }
.termin-status   { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }

.slot-bar        { display: flex; gap: 3px; }
.slot            { width: 14px; height: 14px; border-radius: 3px; }
.slot-frei       { background: #7A9E82; }
.slot-belegt     { background: var(--text-muted); }

.slot-text            { font-size: 0.8rem; font-weight: 500; }
.text-offen           { color: #3A6040; }
.text-ausgebucht      { color: var(--text-muted); }

/* ---------------------------------------------------------------
   Badges
--------------------------------------------------------------- */
.badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-field);
  font-weight: 500;
}
.badge-restwaerme { background: #fff3cd; color: #856404; }
.badge-ki         { background: #e8f4fd; color: #0d6efd; }
.badge-offen      { background: rgba(122, 158, 130, 0.15); color: #3A6040; }
.badge-wartend    { background: #fff3cd; color: #856404; }

/* ---------------------------------------------------------------
   Forms
--------------------------------------------------------------- */
.booking-form  { padding: 20px; border-top: 0.5px solid var(--border); background: #fefcf9;
                  border-radius: 0 0 var(--radius-card) var(--radius-card); }
.form-group    { margin-bottom: 14px; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label          { display: block; font-size: 0.85rem; font-weight: 500;
                  margin-bottom: 4px; color: var(--text-dark); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-field);
  font-size: 0.9rem;
  background: white;
  color: var(--text-dark);
  font-family: var(--font-sans);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea      { min-height: 100px; resize: vertical; }
.radio-group  { display: flex; gap: 16px; }
.radio-label  { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.9rem; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.mt-1         { margin-top: 8px; }
.form-hint    { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* ---------------------------------------------------------------
   Flash messages
--------------------------------------------------------------- */
.flash {
  padding: 10px 14px;
  border-radius: var(--radius-field);
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ---------------------------------------------------------------
   Filter chips & Search
--------------------------------------------------------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  padding: 4px 12px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  font-size: 0.8rem;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-dark);
  text-decoration: none;
  font-family: var(--font-sans);
}
.chip:hover, .chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input { flex: 1; }

/* ---------------------------------------------------------------
   Recipe cards (list)
--------------------------------------------------------------- */
.recipe-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
}
.recipe-card:hover { border-color: var(--accent); }
.recipe-card h3    { font-family: var(--font-serif); font-size: 1rem; margin-bottom: 4px; }
.recipe-card .beschreibung { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 8px; line-height: 1.4; }
.recipe-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  background: rgba(122, 82, 48, 0.08);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-field);
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--text-dark);
}

.vote-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: 0.5px solid var(--border); border-radius: var(--radius-field);
  padding: 6px 14px; cursor: pointer; font-size: 0.85rem; color: var(--text-dark);
  font-family: var(--font-sans);
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------
   Recipe detail
--------------------------------------------------------------- */
.recipe-content   { line-height: 1.7; }
.recipe-content h2 { margin: 20px 0 8px; font-size: 1rem;
                     font-family: var(--font-serif); color: var(--page-color-text, var(--accent)); }
.recipe-content ul, .recipe-content ol { padding-left: 20px; margin-bottom: 12px; }
.recipe-content li { margin-bottom: 4px; }
.recipe-photo      { max-width: 100%; border-radius: var(--radius-card); margin: 16px 0; }

/* ---------------------------------------------------------------
   Info cards
--------------------------------------------------------------- */
.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  text-decoration: none;
  color: var(--text-dark);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.info-card:hover {
  border-color: var(--accent);
}
.info-card-icon  { font-size: 2rem; flex-shrink: 0; }
.info-card-body  { flex: 1; }
.info-card-body h3 { font-family: var(--font-serif); font-size: 1rem; font-weight: 400; margin-bottom: 4px; }
.info-card-body p  { font-size: 0.85rem; color: var(--text-soft); line-height: 1.4; }
.info-card-arrow { color: var(--page-color-text, var(--accent)); font-size: 1.2rem; flex-shrink: 0; }

/* ---------------------------------------------------------------
   Info article content
--------------------------------------------------------------- */
.info-content         { line-height: 1.7; color: var(--text-dark); }
.info-content h2      { color: var(--page-color-text, var(--accent));
                         font-family: var(--font-serif); font-weight: 400;
                         font-size: 1.1rem; margin: 28px 0 10px;
                         padding-bottom: 6px;
                         border-bottom: 0.5px solid var(--border); }
.info-content h3      { color: var(--page-color-text, var(--accent));
                         font-family: var(--font-serif); font-weight: 400;
                         font-size: 1rem; margin: 20px 0 8px; }
.info-content p       { margin-bottom: 12px; }
.info-content ul      { padding-left: 1.4em; margin-bottom: 12px; }
.info-content li      { margin-bottom: 4px; }
.info-content strong  { font-weight: 600; }
.info-content em      { font-style: italic; color: var(--text-soft); }
.info-content a       { color: var(--accent); }

/* ---------------------------------------------------------------
   Similar recipes
--------------------------------------------------------------- */
.similar-section { margin-top: 32px; padding-top: 20px; border-top: 0.5px solid var(--border); }
.similar-section h3 { font-size: 0.9rem; margin-bottom: 10px; color: var(--text-muted); }

/* ---------------------------------------------------------------
   Admin / Verwaltung
--------------------------------------------------------------- */
.admin-section { margin-bottom: 32px; }
.admin-section h2 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 400;
                     margin-bottom: 12px; padding-bottom: 8px;
                     border-bottom: 0.5px solid var(--border); }
.booking-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.85rem; }
.booking-table th, .booking-table td { padding: 8px 10px; text-align: left;
                                        border-bottom: 0.5px solid var(--border); }
.booking-table th { font-weight: 500; background: #faf7f3; }
.booking-table td:nth-child(1) { overflow-wrap: break-word; width: 18%; }
.booking-table th:nth-child(1) { width: 18%; }
.booking-table th:nth-child(2), .booking-table td:nth-child(2) { width: 6%; }
.booking-table th:nth-child(3), .booking-table td:nth-child(3) { width: 13%; }
.booking-table th:nth-child(4), .booking-table td:nth-child(4) { width: 16%; }
.booking-table td:nth-child(5) { word-break: break-all; }
.booking-table th:nth-child(6), .booking-table td:nth-child(6) { width: 13%; white-space: nowrap; }

/* ---------------------------------------------------------------
   Login box
--------------------------------------------------------------- */
.login-box {
  max-width: 360px; margin: 48px auto;
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-card); padding: 32px;
  text-align: center;
}
.login-box h1 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400; margin-bottom: 20px; }
.login-box .form-group { text-align: left; }

/* ---------------------------------------------------------------
   Empty state & Page header (shared)
--------------------------------------------------------------- */
.empty-state { text-align: center; padding: 48px 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------
   Print
--------------------------------------------------------------- */
@media print {
  nav, footer, .btn, .no-print { display: none !important; }
  body { background: white; color: black; }
  .card, .recipe-card { border: 1px solid #ccc; break-inside: avoid; }
}

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 640px) {
  nav { padding: 12px 16px; }
  .logo { font-size: 17px; }
  .nav-link { margin-left: 16px; font-size: 11px; }

  .content { padding: 0 16px 24px; }

  .page-infos .content::before,
  .page-backtage .content::before,
  .page-rezepte .content::before { margin: 0 -16px 20px; }

  .tagline { padding: 24px 16px 20px; }
  .tagline h1 { font-size: 26px; }

  .cards { grid-template-columns: 1fr; padding: 0 16px; gap: 14px; }

  .next-backtag { margin: 0 16px 32px; }

  footer { padding: 12px 16px; }

  .form-row { grid-template-columns: 1fr; }

  .page-header h1 { font-size: 22px; }

  .card-header { flex-wrap: wrap; }
  .termin-status { flex: 1 1 100%; order: 3; }
  .btn-anmelden { order: 2; margin-left: auto; }
}
