/* ==========================================================================
   WEB HUB EDITORIAL — full-bleed magazine layout (web-hub-real-pages)
   Sport / Events / Schulen / Kitas / Geschäfte / Gesundheit
   NOT cube-grid. NOT Melisa portal shell. Mobile /m/ does not load this.
   Image convention: /img/web-hubs/{hub}/{slot}.webp + .hub-* classes
   ========================================================================== */
:root {
  --wh-ink: #2b221b;
  --wh-muted: #6e6054;
  --wh-sub: #8a7a6c;
  --wh-bg: #f2eae0;
  --wh-surface: #faf5ed;
  --wh-paper: #fffdf9;
  --wh-line: #ded3c4;
  --wh-green: #1e4d38;
  --wh-green-soft: #ebf3ee;
  --wh-accent: #9a3412;
  --wh-gold: #a16207;
  --wh-radius: 18px;
  --wh-radius-sm: 12px;
  --wh-shadow: 0 10px 36px -12px rgba(43, 34, 27, 0.18);
  /* Full web content band — was 1120px "столбик"; now magazine width */
  --wh-max: 1360px;
  --wh-pad: clamp(20px, 3.2vw, 48px);
  --wh-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,Helvetica,sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.web-hub {
  margin: 0;
  font-family: var(--wh-font);
  background: var(--wh-bg);
  color: var(--wh-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wh-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--wh-pad);
  max-width: none;
  background: rgba(250, 245, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wh-line);
}
.wh-topbar a {
  color: var(--wh-green);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.wh-topbar a:hover { text-decoration: underline; }
.wh-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
}
.wh-topbar nav a { color: var(--wh-muted); font-weight: 600; }
.wh-topbar nav a.is-here { color: var(--wh-green); }

.wh-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(200px, 28vh, 320px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #1a3328 center/cover no-repeat;
}
.wh-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 28, 22, 0.25) 0%, rgba(15, 28, 22, 0.78) 72%, rgba(15, 28, 22, 0.92) 100%);
}
.wh-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wh-max);
  margin: 0 auto;
  padding: 36px var(--wh-pad) 40px;
}
.wh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wh-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.85rem, 1.4rem + 2vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.wh-hero .wh-lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.wh-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  max-width: 920px;
}
.wh-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--wh-radius-sm);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}
.wh-stat strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}
.wh-stat span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Content band — full magazine width, NOT phone column */
.wh-wrap {
  width: 100%;
  max-width: var(--wh-max);
  margin: 0 auto;
  padding: 32px var(--wh-pad) 72px;
}

.wh-section {
  margin: 0 0 48px;
}
.wh-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.wh-section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wh-section-head p {
  margin: 4px 0 0;
  color: var(--wh-muted);
  font-size: 0.98rem;
  max-width: 64ch;
}
.wh-section-head .wh-more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wh-green);
  text-decoration: none;
  white-space: nowrap;
}
.wh-section-head .wh-more:hover { text-decoration: underline; }

/* Optional readable measure for long prose only */
.wh-prose {
  max-width: 68ch;
}

/* ========== Image slots (reusable for future generation) ========== */
.hub-img,
.hub-feature-media,
.hub-band-media,
.hub-card-media {
  background-color: #e7dfd2;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hub-img img,
.hub-feature-media img,
.hub-band-media img,
.hub-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hub-band {
  position: relative;
  margin: 0 0 28px;
  border-radius: var(--wh-radius);
  overflow: hidden;
  min-height: 160px;
  border: 1px solid var(--wh-line);
  box-shadow: 0 4px 18px -10px rgba(43, 34, 27, 0.14);
}
.hub-band-media {
  min-height: 180px;
  height: clamp(160px, 22vw, 260px);
}
.hub-band-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(180deg, transparent, rgba(20, 28, 22, 0.72));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

/* Featured magazine card */
.wh-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--wh-paper);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  overflow: hidden;
  box-shadow: var(--wh-shadow);
}
.wh-feature-media,
.hub-feature-media.wh-feature-media {
  min-height: 220px;
  background: #d6cbb8 center/cover no-repeat;
  position: relative;
}
.wh-feature-media .wh-badge {
  position: absolute;
  top: 16px;
  left: 16px;
}
.wh-feature-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--wh-green-soft);
  color: var(--wh-green);
  border: 1px solid rgba(30, 77, 56, 0.18);
}
.wh-badge.gold {
  background: #eef6f1;
  color: #1e4d38;
  border-color: rgba(146, 64, 14, 0.2);
}
.wh-badge.accent {
  background: #ffedd5;
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.2);
}
.wh-feature-body h3 {
  margin: 0;
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  font-weight: 800;
}
.wh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--wh-muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.wh-feature-body p {
  margin: 0;
  color: var(--wh-muted);
  font-size: 0.98rem;
}
.wh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.wh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.wh-btn:hover { transform: translateY(-1px); }
.wh-btn-primary {
  background: var(--wh-green);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(30, 77, 56, 0.55);
}
.wh-btn-primary:hover { background: #153828; }
.wh-btn-secondary {
  background: var(--wh-surface);
  color: var(--wh-ink);
  border-color: var(--wh-line);
}
.wh-btn-secondary:hover { background: #f3ebe1; }
.wh-btn-ghost {
  background: transparent;
  color: var(--wh-green);
  border-color: rgba(30, 77, 56, 0.25);
}

/* Card grids — stretch across full content band */
.wh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wh-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wh-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.wh-card {
  display: flex;
  flex-direction: column;
  background: var(--wh-paper);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  overflow: hidden;
  box-shadow: 0 4px 18px -8px rgba(43, 34, 27, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
}
.wh-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--wh-shadow);
}
.wh-card-media,
.hub-card-media.wh-card-media {
  height: 170px;
  background: #e7dfd2 center/cover no-repeat;
  position: relative;
  flex: 0 0 auto;
}
.wh-card-media .wh-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.wh-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.wh-card-body h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
}
.wh-card-body p {
  margin: 0;
  color: var(--wh-muted);
  font-size: 0.9rem;
  flex: 1;
}
.wh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wh-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0e7db;
  color: #523a28;
}

.wh-timeline {
  display: grid;
  gap: 0;
  border-left: 3px solid var(--wh-green);
  padding-left: 20px;
  margin-left: 6px;
}
.wh-timeline-item {
  position: relative;
  padding: 0 0 22px 4px;
}
.wh-timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wh-green);
  border: 2px solid var(--wh-bg);
}
.wh-timeline-item time {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--wh-green);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.wh-timeline-item h4 {
  margin: 4px 0;
  font-size: 1.05rem;
}
.wh-timeline-item p {
  margin: 0;
  color: var(--wh-muted);
  font-size: 0.92rem;
}

.wh-sources {
  margin-top: 8px;
  padding: 16px 18px;
  background: var(--wh-surface);
  border: 1px dashed var(--wh-line);
  border-radius: var(--wh-radius-sm);
  font-size: 0.82rem;
  color: var(--wh-muted);
}
.wh-sources a { color: var(--wh-green); font-weight: 600; }
.wh-sources ul { margin: 8px 0 0; padding-left: 18px; }

.wh-footer {
  border-top: 1px solid var(--wh-line);
  padding: 24px var(--wh-pad);
  text-align: center;
  color: var(--wh-sub);
  font-size: 0.82rem;
  background: var(--wh-surface);
}
.wh-footer a { color: var(--wh-green); font-weight: 600; }

.wh-live-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, #ebf3ee, #faf5ed);
  border: 1px solid rgba(30, 77, 56, 0.18);
  border-radius: var(--wh-radius-sm);
  font-size: 0.9rem;
}
.wh-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
  animation: wh-pulse 1.6s ease infinite;
}
@keyframes wh-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.08); }
}

.wh-month {
  margin: 28px 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wh-accent);
}

/* Deep guide / tip blocks — stretch full content band */
.wh-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 28px;
}
.wh-guide-card {
  background: var(--wh-paper);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius-sm);
  padding: 18px 18px 16px;
  min-width: 0;
}
.wh-guide-card .hub-guide-thumb {
  height: 96px;
  margin: -6px -6px 12px;
  border-radius: 10px;
  background: #e7dfd2 center/cover no-repeat;
}
.wh-guide-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}
.wh-guide-card p, .wh-guide-card li {
  margin: 0;
  color: var(--wh-muted);
  font-size: 0.9rem;
}
.wh-guide-card ul { margin: 8px 0 0; padding-left: 18px; }
.wh-guide-card li + li { margin-top: 4px; }
.wh-callout {
  background: linear-gradient(120deg, #ebf3ee, #faf5ed);
  border: 1px solid rgba(30,77,56,.2);
  border-radius: var(--wh-radius);
  padding: 20px 22px;
  margin: 0 0 28px;
}
.wh-callout h3 { margin: 0 0 8px; font-size: 1.15rem; }
.wh-callout p { margin: 0; color: var(--wh-muted); }
.wh-emergency {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--wh-radius);
  padding: 18px 22px;
  margin: 0 0 28px;
}
.wh-emergency h3 { margin: 0 0 8px; color: #9a3412; }
.wh-emergency a { color: #9a3412; font-weight: 800; text-decoration: none; }
.wh-emergency a:hover { text-decoration: underline; }
.wh-split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 10px;
  align-items: start;
}
.wh-list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wh-paper);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  overflow: hidden;
  font-size: 0.92rem;
}
.wh-list-table th, .wh-list-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--wh-line);
  text-align: left;
  vertical-align: top;
}
.wh-list-table th {
  background: var(--wh-surface);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--wh-muted);
}
.wh-list-table tr:last-child td { border-bottom: 0; }
.wh-list-table a { color: var(--wh-green); font-weight: 700; text-decoration: none; }
.wh-list-table a:hover { text-decoration: underline; }
.wh-phone { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

/* Wide desktop: 4-col directory grids use available width */
@media (min-width: 1200px) {
  .wh-grid.wh-grid-dir { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .wh-hero-stats { max-width: 1000px; }
}

@media (max-width: 960px) {
  .wh-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-feature { grid-template-columns: 1fr; }
  .wh-feature-media, .hub-feature-media.wh-feature-media { min-height: 200px; }
  .wh-grid, .wh-grid-4, .wh-grid.wh-grid-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-guide { grid-template-columns: 1fr; }
  .wh-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wh-topbar { padding: 10px 14px; }
  .wh-topbar nav { display: none; }
  .wh-wrap { padding: 20px 14px 48px; }
  .wh-hero-inner { padding: 28px 14px 32px; }
  .wh-grid, .wh-grid-2, .wh-grid-4, .wh-grid.wh-grid-dir { grid-template-columns: 1fr; }
  .wh-hero-stats { grid-template-columns: 1fr 1fr; }
  .wh-feature-body { padding: 20px 16px; }
  .hub-band-media { height: 140px; }
}

@media print {
  .wh-topbar, .wh-btn { display: none !important; }
  .wh-hero { min-height: auto; color: #000; }
  .wh-hero::after { background: none; }
}

/* ---- Directory tools (Schulen search / filter) — web-hub-real-pages ---- */
.wh-dir-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 22px;
}
.wh-search {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--wh-line);
  border-radius: 999px;
  background: var(--wh-paper);
  font: inherit;
  font-size: 1rem;
  color: var(--wh-ink);
  box-shadow: 0 1px 0 rgba(43,34,27,.04);
}
.wh-search:focus {
  outline: 2px solid rgba(30,77,56,.35);
  outline-offset: 1px;
  border-color: var(--wh-green);
}
.wh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wh-filter {
  appearance: none;
  border: 1px solid var(--wh-line);
  background: #efe6da;
  color: var(--wh-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.wh-filter.is-active,
.wh-filter[aria-pressed="true"] {
  background: var(--wh-green);
  border-color: var(--wh-green);
  color: #fff;
}
.wh-card[hidden] { display: none !important; }
.wh-dir-meta {
  font-size: 0.85rem;
  color: var(--wh-muted);
  margin: -8px 0 14px;
}
.wh-link-ext {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--wh-muted);
  text-decoration: none;
}
.wh-link-ext:hover { color: var(--wh-green); text-decoration: underline; }
.wh-schulverw {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 22px;
}
@media (max-width: 800px) {
  .wh-schulverw { grid-template-columns: 1fr; }
}


/* ---- mobile-hubs-enliven: Melisa one-back + phone life ---- */
html.in-melisa-shell .wh-topbar,
html.in-melisa-shell header.wh-topbar,
html.in-melisa-shell [data-embed-hide],
html.in-melisa-shell .embed-hide,
html.in-melisa-shell .hub-back,
html.in-melisa-shell .school-back,
html.in-melisa-shell .portal-back,
html.in-melisa-shell a.melisa-dup-back {
  display: none !important;
}
/* Phone: less magazine chrome, more photo life */
html.in-melisa-shell .wh-hero {
  min-height: 240px !important;
}
html.in-melisa-shell .wh-hero h1 {
  font-size: clamp(1.35rem, 5.2vw, 1.85rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.02em !important;
}
html.in-melisa-shell .wh-lead {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
}
html.in-melisa-shell .wh-eyebrow {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-weight: 650 !important;
  background: rgba(250,245,237,.88) !important;
  color: #5a4a3c !important;
  border: 1px solid rgba(222,211,196,.9) !important;
}
html.in-melisa-shell .hub-img,
html.in-melisa-shell .wh-feature-media,
html.in-melisa-shell .hub-band-media,
html.in-melisa-shell .hub-card-media,
html.in-melisa-shell .wh-card-media {
  filter: saturate(1.08) contrast(1.04) !important;
}
html.in-melisa-shell .wh-footer {
  padding-top: 18px !important;
  font-size: 0.82rem !important;
}
