/* ==============================
   Eco Health – Branchen Archive
   Scope: archive-branchen.php
   ============================== */

:root {
  /* Colors (align with single page) */
  --eh-bg: #ffffff;
  --eh-surface: #f7f9fb;
  --eh-text: #0d1b2a;
  --eh-muted: #5b6b7a;
  --eh-border: #e3e8ee;
  --eh-primary: #1b8f62; /* eco green */
  --eh-primary-contrast: #ffffff;
  --eh-accent: #2d6cdf;

  /* Rhythm & sizing */
  --eh-font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --eh-radius: 14px;
  --eh-radius-lg: 20px;
  --eh-shadow: 0 6px 24px rgba(11, 30, 50, 0.08);
  --eh-shadow-soft: 0 1px 3px rgba(11, 30, 50, 0.06);
  --eh-maxw: 1080px;

  --eh-space-1: 8px;
  --eh-space-2: 12px;
  --eh-space-3: 16px;
  --eh-space-4: 24px;
  --eh-space-5: 32px;
  --eh-space-6: 48px;
  --eh-space-7: 64px;
}

/*
@media (prefers-color-scheme: dark) {
  :root {
    --eh-bg: #0f1419;
    --eh-surface: #121a22;
    --eh-text: #e6edf3;
    --eh-muted: #9fb1c1;
    --eh-border: #283241;
    --eh-shadow: 0 6px 24px rgba(0,0,0,0.35);
    --eh-shadow-soft: 0 1px 3px rgba(0,0,0,0.35);
  }
}
*/
/* Base scope */
.branchen-archive-hero,
.branchen-archive-list {
  font-family: var(--eh-font);
  color: var(--eh-text);
}

/* -----------------------------
   HERO
   ----------------------------- */
.branchen-archive-hero {
  margin-inline: auto;
  padding: var(--eh-space-7) var(--eh-space-3) var(--eh-space-5);
  max-width: var(--eh-maxw);
  background: linear-gradient(180deg, var(--eh-surface), transparent 70%);
  border-radius: var(--eh-radius-lg);
}

.branchen-archive-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--eh-space-2);
}

.branchen-archive-hero p {
  max-width: 70ch;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--eh-muted);
  margin: 0;
}

/* Optional: filter row (if you add taxonomy filters later) */
.branchen-archive-filters {
  margin-top: var(--eh-space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--eh-space-2);
}

.branchen-archive-filters .chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--eh-border);
  background: var(--eh-bg);
  color: var(--eh-text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.branchen-archive-filters .chip:hover {
  border-color: color-mix(in srgb, var(--eh-border), var(--eh-primary) 40%);
  box-shadow: var(--eh-shadow-soft);
  transform: translateY(-1px);
}

.branchen-archive-filters .chip.is-active {
  background: color-mix(in srgb, var(--eh-primary), #ffffff 85%);
  color: var(--eh-text);
  border-color: color-mix(in srgb, var(--eh-border), var(--eh-primary) 50%);
}

/* -----------------------------
   LIST / GRID
   ----------------------------- */
.branchen-archive-list {
  max-width: var(--eh-maxw);
  margin: 0 auto var(--eh-space-7);
  padding: 0 var(--eh-space-3);
}

.branchen-archive-list .grid {
  display: grid;
  gap: var(--eh-space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .branchen-archive-list .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .branchen-archive-list .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.branchen-card {
  background: var(--eh-bg);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius);
  overflow: clip;
  box-shadow: var(--eh-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.branchen-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--eh-shadow);
  border-color: color-mix(in srgb, var(--eh-border), var(--eh-primary) 25%);
}

.branchen-card a {
  display: grid;
  grid-template-rows: auto 1fr auto;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.branchen-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.branchen-card-body {
  padding: var(--eh-space-4);
}

.branchen-card-title {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  margin: 0 0 var(--eh-space-2);
  line-height: 1.25;
}

.branchen-card-excerpt {
  color: var(--eh-muted);
  margin: 0;
}

.branchen-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eh-space-2);
  padding: var(--eh-space-3) var(--eh-space-4);
  border-top: 1px solid var(--eh-border);
  background: var(--eh-surface);
}

.branchen-card-footer .more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--eh-accent);
  text-underline-offset: 2px;
}

/* If no featured image, give a pleasant placeholder */
.branchen-card .no-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--eh-surface), color-mix(in srgb, var(--eh-surface), #000 6%));
  display: grid;
  place-items: center;
  color: var(--eh-muted);
  font-size: 0.95rem;
}

/* -----------------------------
   PAGINATION
   ----------------------------- */
.pagination,
.navigation.pagination {
  margin-top: var(--eh-space-6);
  display: flex;
  justify-content: center;
}

.pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--eh-border);
  border-radius: 999px;
  padding: 4px;
  background: var(--eh-bg);
  box-shadow: var(--eh-shadow-soft);
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--eh-text);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.pagination .page-numbers:hover {
  background: var(--eh-surface);
  transform: translateY(-1px);
}

.pagination .page-numbers.current {
  background: var(--eh-primary);
  color: var(--eh-primary-contrast);
}

.pagination .page-numbers.dots {
  pointer-events: none;
  color: var(--eh-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .branchen-card,
  .pagination .page-numbers {
    transition: none;
  }
}
