/* ============================================================
   FEUERWEHRKAPELLE PFOHREN – Haupt-Stylesheet
   ============================================================ */

/* Google Fonts – Raleway (Überschriften) + Jost (Fließtext) */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&family=Jost:wght@300;400;500;600&display=swap');

/* ── CSS-Variablen ── */
:root {
  --primary:     #8b1a1a;
  --primary-dk:  #6b1212;
  --primary-lt:  #a52020;
  --secondary:   #2c2c2c;
  --accent:      #c8a84b;
  --accent-lt:   #d9be7a;
  --bg:          #f5f5f0;
  --bg-card:     #ffffff;
  --text:        #1a1a1a;
  --text-muted:  #666666;
  --green:       #2d7a3a;
  --purple:      #6a1f8a;
  --gray:        #888888;
  --border:      #e0e0d8;

  --font-heading: 'Raleway', 'Segoe UI', sans-serif;
  --font-body:    'Jost', 'Segoe UI', sans-serif;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.13);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);

  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 4px;

  --nav-height:    64px;
  --header-height: 72px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

/* ── App-Wrapper (max 430px, zentriert) ── */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* ── HEADER ── */
.app-header {
  background: var(--primary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.app-header .logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.1);
}

.app-header .header-text {
  flex: 1;
}

.app-header .header-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-header .header-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── BOTTOM NAVIGATION ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-height);
  background: var(--secondary);
  display: flex;
  z-index: 200;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.25);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s, background 0.2s;
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover { color: rgba(255,255,255,0.85); }

.nav-item.active {
  color: var(--accent);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item span {
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── SCROLL-CONTENT ── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px calc(var(--nav-height) + 16px);
  -webkit-overflow-scrolling: touch;
}

/* ── TAB PANELS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── SECTION TITLE ── */
.section-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-title:first-child { margin-top: 4px; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.card-sm {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ── NÄCHSTER TERMIN (Home) ── */
.next-event-card {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.next-event-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

.next-event-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -10px;
  width: 80px; height: 80px;
  background: rgba(0,0,0,0.08);
  border-radius: 50%;
}

.next-event-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dk);
  font-weight: 700;
  margin-bottom: 6px;
}

.next-event-card .event-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dk);
  line-height: 1.2;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.03em;
}

.next-event-card .event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--secondary);
}

.next-event-card .event-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* ── TERMIN-LISTE ── */
.event-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.event-list-item:last-child { border-bottom: none; }

.event-date-badge {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 5px 4px;
}

.event-date-badge .day {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-badge .month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.event-info { flex: 1; min-width: 0; }

.event-info .title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-info .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.type-probe    { background: #e8f5ea; color: var(--green); }
.type-auftritt { background: #fce8e8; color: var(--primary); }
.type-jugend   { background: #f0e8f8; color: var(--purple); }
.type-sonstiges{ background: #f0f0f0; color: var(--gray); }

/* ── KALENDER ── */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-month-label {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.calendar-nav-btn {
  width: 34px; height: 34px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.calendar-nav-btn:hover { background: var(--primary-lt); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  padding: 2px;
}

.calendar-day:hover { background: var(--border); }
.calendar-day.today { background: var(--primary); color: #fff; border-radius: 50%; }
.calendar-day.today .day-num { color: #fff; }
.calendar-day.selected { background: var(--accent); border-radius: 50%; }
.calendar-day.other-month .day-num { color: var(--border); }

.day-num {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
}

.day-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.day-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-probe    { background: var(--green); }
.dot-auftritt { background: var(--primary); }
.dot-jugend   { background: var(--purple); }
.dot-sonstiges{ background: var(--gray); }

/* ── RAUM TABS ── */
.room-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.room-tabs::-webkit-scrollbar { display: none; }

.room-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: var(--font-body);
}

.room-tab:hover { border-color: var(--primary); color: var(--primary); }

.room-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── RAUM-BELEGUNG EINTRAG ── */
.booking-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.booking-item .booking-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.booking-item .booking-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── NEWS CARDS ── */
.news-featured {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.news-featured::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.news-featured .badge {
  display: inline-block;
  background: var(--accent);
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.news-featured .news-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.news-featured .news-text {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-featured .news-date {
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.news-card .news-color-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
  align-self: stretch;
  flex-shrink: 0;
}

.news-card .news-body { flex: 1; min-width: 0; }

.news-card .badge {
  display: inline-block;
  background: var(--accent);
  color: var(--secondary);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 4px;
}

.news-card .news-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.news-card .news-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.news-card .news-date {
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 5px;
}

.news-bild {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  display: block;
}

.news-card .news-bild {
  border-radius: 0;
  max-height: 160px;
  margin-left: -1px;
  width: calc(100% + 2px);
}

.news-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.news-link:hover { text-decoration: underline; }

/* ── INFO-SEITE ── */
.info-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 8px;
}

.vorstand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.vorstand-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.vorstand-avatar {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.vorstand-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 3px;
}

.vorstand-rolle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.contact-block {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg { width: 18px; height: 18px; color: #fff; }

.contact-body { flex: 1; }
.contact-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-size: 0.88rem; color: var(--text); font-weight: 500; margin-top: 2px; }
.contact-value a { color: var(--primary); text-decoration: none; }
.contact-value a:hover { text-decoration: underline; }

/* ── FAB (Floating Action Button) ── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  right: calc(50% - 215px + 16px);
  width: 54px; height: 54px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(139,26,26,0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 150;
}

.fab:hover { transform: scale(1.07); box-shadow: 0 6px 20px rgba(139,26,26,0.5); }
.fab:active { transform: scale(0.96); }

@media (max-width: 430px) {
  .fab { right: 16px; }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 430px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--primary); color: #fff; }

/* ── FORMULARE ── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}

.btn-primary:hover { background: var(--primary-lt); }
.btn-primary:active { background: var(--primary-dk); }

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover { background: #d0d0c8; }

.btn-danger {
  background: #c0392b;
  color: #fff;
  width: 100%;
}
.btn-danger:hover { background: #a93226; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  width: 100%;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); }

/* ── WARNMELDUNG ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-warning {
  background: #fff3cd;
  border-left: 4px solid #f0ad4e;
  color: #856404;
}

.alert-danger {
  background: #fce8e8;
  border-left: 4px solid var(--primary);
  color: var(--primary-dk);
}

.alert-success {
  background: #e8f5ea;
  border-left: 4px solid var(--green);
  color: #1b5e20;
}

/* ── LEERZUSTÄNDE ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px; height: 48px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.empty-state p { font-size: 0.9rem; }

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  opacity: 0;
  background: var(--secondary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2000;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.35s ease;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { background: var(--green); }
.toast.error   { background: var(--primary); }

/* ── LEGEND ── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── RESPONSIVE DESKTOP ── */
@media (min-width: 431px) {
  body { background: #ddd; }
  #app { margin: 0 auto; }
  .fab { right: calc(50% - 215px + 16px); }
  .bottom-nav { left: 50%; }
  .toast { max-width: 400px; }
}
