/* BRH Rettungshundestaffel Westerwald e.V. */

:root {
  --color-primary: #7a0000;
  --color-primary-dark: #560000;
  --color-accent: #c9a227;
  --color-dark: #1c1c1c;
  --color-text: #2b2b2b;
  --color-muted: #6b6b6b;
  --color-bg: #f7f6f3;
  --color-card: #ffffff;
  --color-border: #e2ded6;
  --font-base: "Segoe UI", Arial, Helvetica, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-base); color: var(--color-dark); line-height: 1.25; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* Ankündigungsleiste */
.announcement-bar {
  background: #f5f5f5;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  text-align: right;
  color: var(--color-text);
}
.announcement-bar a { color: var(--color-primary); font-weight: 600; }

/* Breadcrumb */
.breadcrumb-bar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.65rem 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.breadcrumb-bar a { color: var(--color-muted); text-decoration: underline; }
.breadcrumb-bar span { color: var(--color-text); }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-banner { height: 64px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--color-primary);
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav > ul > li { position: relative; }

.main-nav a {
  display: block;
  padding: 0.85rem 0.75rem;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.main-nav a.btn-nav {
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
  padding: 0.55rem 1rem;
}
.main-nav a.btn-nav:hover { background: var(--color-primary-dark); border-bottom-color: transparent; }

.main-nav ul.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 240px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-top: 3px solid var(--color-primary);
  padding: 0.4rem 0;
  z-index: 50;
}

.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { padding: 0.6rem 1rem; font-weight: 500; border-bottom: none; }
.dropdown li a:hover { background: var(--color-bg); }

/* Hero */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,0,0,0.55), rgba(20,0,0,0.75));
}
.hero-content { position: relative; max-width: 780px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: 2.2rem; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: var(--max-width);
  margin: -3rem auto 3rem;
  padding: 0 1.25rem;
  position: relative;
  z-index: 5;
}
.stat-card {
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  padding: 1.5rem 1rem;
  text-align: center;
  border-top: 4px solid var(--color-accent);
}
.stat-number { font-size: 2.1rem; font-weight: 700; color: var(--color-primary); }
.stat-label { color: var(--color-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Sections */
.section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h2 { font-size: 1.8rem; }
.section-title .subtitle { color: var(--color-muted); }
.section-alt { background: #fff; }

/* Bild-Banner (Kompetenzen-Unterseiten) */
.page-banner {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,0,0,0.65), rgba(20,0,0,0.15)); }
.page-banner h1 { position: relative; color: #fff; margin: 0; padding: 0 1.25rem; max-width: var(--max-width); margin: 0 auto; width: 100%; }

/* Section layout with sidebar (Verein/Kontakt-Unterseiten) */
.section-layout {
  display: flex;
  gap: 2.5rem;
  padding: 2.5rem 1.25rem;
  align-items: flex-start;
}
.section-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.section-sidebar h3 {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
}
.section-sidebar nav a {
  display: block;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
}
.section-sidebar nav a:last-child { border-bottom: none; }
.section-sidebar nav a:hover { background: var(--color-bg); text-decoration: none; }
.section-sidebar nav a.active {
  border-left-color: var(--color-primary);
  background: var(--color-bg);
  color: var(--color-primary);
  font-weight: 700;
}
.section-content { flex: 1; min-width: 0; }
.section-content h1 { margin-top: 0; }

.member-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.member-list .member-name { font-weight: 600; }
.member-list .member-roles { color: var(--color-muted); font-size: 0.9rem; text-align: right; }
.member-info { display: flex; align-items: center; gap: 0.9rem; }
.member-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--color-bg); border: 1px solid var(--color-border); }
.member-dog { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.3rem; display: flex; align-items: center; gap: 0.5rem; }
.member-dog-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--color-border); }

.dog-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 1.25rem;
}
.dog-card img { width: 130px; height: 130px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--color-bg); }
.dog-card dl { display: grid; grid-template-columns: 140px 1fr; gap: 0.3rem 1rem; margin: 0.5rem 0 0; }
.dog-card dt { font-weight: 600; color: var(--color-muted); }
.dog-card dd { margin: 0; }
.dog-card.deceased { border-left: 4px solid var(--color-dark); }

@media (max-width: 800px) {
  .section-layout { flex-direction: column; }
  .section-sidebar { width: 100%; }
  .dog-card { flex-direction: column; }
  .dog-card img { width: 100%; height: 200px; }
}

/* Cards / grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 12px 25px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-date { color: var(--color-muted); font-size: 0.85rem; margin-bottom: 0.4rem; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.card h3 a { color: var(--color-dark); }
.card p { color: var(--color-text); flex: 1; }
.card .read-more { font-weight: 600; }

/* Page content */
.page-header {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}
.page-header h1 { color: #fff; margin: 0; }
.content-block { padding: 2.5rem 0; }
.content-block h2 { border-left: 4px solid var(--color-accent); padding-left: 0.75rem; margin-top: 2rem; }
.content-block h2:first-child { margin-top: 0; }

.kompetenz-block { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); scroll-margin-top: 90px; }
.kompetenz-block:last-child { border-bottom: none; }

/* Einsatz detail */
.einsatz-meta {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.einsatz-meta dl { display: grid; grid-template-columns: 180px 1fr; gap: 0.5rem 1rem; margin: 0; }
.einsatz-meta dt { font-weight: 600; color: var(--color-muted); }
.einsatz-meta dd { margin: 0; }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}
.form-group textarea { min-height: 120px; }
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-secondary { background: var(--color-muted); }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-danger { background: #a12626; }

.form-card {
  max-width: 480px;
  margin: 3rem auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
}

.flash { padding: 0.9rem 1.1rem; border-radius: 6px; margin-bottom: 1.2rem; font-weight: 600; }
.flash-success { background: #e4f4e6; color: #1e6b2e; }
.flash-error { background: #fbe6e6; color: #9c2020; }
.flash-info { background: #e6eef8; color: #1e4e8b; }

/* Tables */
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--color-border); text-align: left; }
table.data-table th { background: var(--color-bg); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted); }

/* Admin/Member layout */
.app-shell { display: flex; min-height: calc(100vh - 200px); }
.app-sidebar {
  width: 230px;
  background: var(--color-dark);
  color: #eee;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.app-sidebar a { display: block; color: #ddd; padding: 0.6rem 1.5rem; font-weight: 500; }
.app-sidebar a:hover, .app-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.app-sidebar h3 { color: #fff; padding: 0 1.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: #999; }
.app-content { flex: 1; padding: 2rem; max-width: 1000px; }

.folder-tree ul { list-style: none; padding-left: 1.25rem; }
.folder-tree > ul { padding-left: 0; }
.folder-item { padding: 0.3rem 0; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.badge-admin { background: var(--color-primary); color: #fff; }
.badge-member { background: var(--color-accent); color: #3a3000; }

/* Footer */
.site-footer { background: var(--color-dark); color: #ccc; margin-top: 3rem; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-top: 0; }
.footer-col a { color: #ccc; }
.footer-logo { height: 60px; width: auto; margin-bottom: 0.75rem; }
.partner-logo { height: 70px; width: auto; background: #fff; padding: 0.4rem; border-radius: 4px; }
.footer-bottom { text-align: center; padding: 1rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav ul.dropdown { display: none; position: static; box-shadow: none; border-top: none; }
  .has-dropdown.open .dropdown { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; }
  .einsatz-meta dl { grid-template-columns: 1fr; }
}
