/* core/home.css — Startseite: Full-bleed Header/Footer, “luftiger” Main */

html[data-theme="light"]{
  --bg: #ffffff;
  --surface: #f4ebda;
  --surface-2: #dddddd;
  --text: rgba(0,0,0,.88);
  --muted: rgba(0,0,0,.62);
  --border: rgba(0,0,0,.18);

  --green: #006400;
  --teal: #00796b;

  --header-bg: var(--green);
  --header-text: rgba(255,255,255,.96);

  --shadow: 0 10px 28px rgba(0,0,0,.12);
}

html[data-theme="dark"]{
  --bg: #0f1115;
  --surface: #1a1f26;
  --surface-2: #242b34;
  --text: rgba(255,255,255,.90);
  --muted: rgba(255,255,255,.68);
  --border: rgba(255,255,255,.16);

  --green: #1b8a3a;
  --teal: #2aa198;

  --header-bg: #0a3b14;
  --header-text: rgba(255,255,255,.96);

  --shadow: 0 16px 44px rgba(0,0,0,.45);
}

:root{
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Container + “Gutter” = der Hauch Abstand zu den Rändern */
  --container: 1100px;
  --gutter: 16px;

  /* Vertikale Luft im Main (oben/unten) */
  --main-pad-y: 18px;

  --radius: 14px;
  --gap: 14px;
}

@media (min-width: 820px){
  :root{
    --gutter: 22px;     /* Desktop: ein Tick mehr Luft */
    --main-pad-y: 22px; /* Desktop: oben/unten etwas großzügiger */
  }
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

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

a{ color: inherit; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  border:0;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:10px;
  background: var(--surface);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  z-index:9999;
}
.skip-link:focus{ left: var(--gutter); }

/* ---------- Header: Hintergrund bis zum Rand ---------- */
.site-header{
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid rgba(0,0,0,.15);
}

/* Innenabstand kommt über .container */
.header-inner{
  padding-top: 16px;
  padding-bottom: 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 260px;
}

.brand-mark{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  overflow: hidden;
  display:grid;
  place-items:center;
}
.brand-mark img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
}

.brand-title{
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-subtitle{
  font-size: .95rem;
  color: rgba(255,255,255,.82);
}

/* Untere Header-Zeile: weiterhin full-bleed, Inhalt im Container */
.header-lower{
  padding-top: 10px;
  padding-bottom: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}

/* ---------- Search + Buttons ---------- */
.header-actions{
  flex: 1;
  display:flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.search{
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.search-input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: var(--header-text);
  outline: none;
}
.search-input::placeholder{ color: rgba(255,255,255,.72); }
.search-input:focus{
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 0 0 4px rgba(255,255,255,.12);
}

.btn{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: var(--header-text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

.btn-theme{
  display:flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
}
.theme-icon{ opacity: .9; }

/* ---------- Filters (chips) ---------- */
.filters{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.94);
  border-radius: 999px;
  padding: 9px 12px;
  cursor:pointer;
  font-weight: 800;
  letter-spacing: .01em;
}
.chip:hover{ filter: brightness(1.06); }
.chip.is-active{
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 4px rgba(0,0,0,.10);
}

/* ---------- Status ---------- */
.status-row{
  margin-top: 10px;
  display:flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  color: rgba(255,255,255,.86);
}
#resultCount{
  font-weight: 900;
  color: rgba(255,255,255,.98);
}
.status-hint{
  font-size: .95rem;
  color: rgba(255,255,255,.78);
}

/* ---------- Main: rundum Luft (oben/unten + durch Container links/rechts) ---------- */
.main{
  padding-top: var(--main-pad-y);
  padding-bottom: calc(var(--main-pad-y) + 6px);
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.card{
  grid-column: span 4;
  display:block;
  text-decoration:none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 14px 16px;
  transition: transform 120ms ease, filter 120ms ease;
  min-height: 132px;
}

.card:hover{
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.card:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--teal) 70%, transparent);
  outline-offset: 3px;
}

.card-top{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}

.badge{
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--green) 85%, #000 15%);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

.icon{
  font-size: 1.1rem;
  opacity: .9;
}

.card-title{
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.card-desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

/* No results */
.no-results{
  margin-top: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

/* ---------- Footer: Hintergrund bis zum Rand, Inhalt im Container ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  padding-top: 18px;
  padding-bottom: 28px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.footer-inner{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: start;
}

.footer-col{ grid-column: span 4; }

.footer-col-right{
  grid-column: span 4;
  display:flex;
  justify-content: flex-end;
}

.footer-heading{
  margin: 0 0 8px;
  font-size: 1rem;
}

.footer-links{
  list-style:none;
  margin:0;
  padding:0;
}

.footer-links li{ margin: 6px 0; }

.footer-links a{
  color: var(--muted);
  text-decoration:none;
}
.footer-links a:hover{
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-meta{
  color: var(--muted);
  display:flex;
  align-items:center;
  height:100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .card{ grid-column: span 6; }

  .header-inner{
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions{
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .brand{ min-width: unset; }
  .search{ width: 100%; }
}

@media (max-width: 640px){
  .card{ grid-column: span 12; }
}

@media (max-width: 820px){
  .footer-col{ grid-column: span 12; }
  .footer-col-right{ justify-content: flex-start; }
}