/* ===========================================================================
 * Hauptstadt-Entsorger — Standorte (standorte.php)
 *
 * The location overview: a hero, a tab strip grouping the areas into Bezirke /
 * Ortsteile / Brandenburg, and a closing call to action. The tiles themselves
 * (.hp-loc-grid / .hp-loc-card) are shared with the city pages and live in
 * ui.css; everything here is specific to this page.
 *
 * Requires ui.css (tokens, .hp-section, .hp-container, .hp-head, .hp-btn),
 * declared as a dependency in functions.php. Note that home.css is NOT loaded
 * on this template, so nothing here may lean on it — the closing CTA looks like
 * home.css's .hp-faq__cta on purpose but is styled from scratch below.
 *
 * Contents
 *   1. Hero
 *   2. Tabs
 *   3. Panels
 *   4. Closing CTA
 *   5. Responsive
 * ========================================================================= */

/* ---------------------------------------------------------------- 1. Hero */
.hp-loc-hero {
  position: relative;
  background-color: var(--hp-tint);
  border-bottom: 1px solid var(--hp-line);
  padding: clamp(48px, 5.4vw, 84px) 0 clamp(40px, 4.6vw, 68px);
}

.hp-loc-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 2.8vw, 36px);
}

.hp-loc-hero .hp-head { margin-bottom: 0; }

/* Facts row — the three reassurances under the headline. Pills rather than a
   plain sentence so they stay scannable next to a centred heading block. */
.hp-loc-hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.hp-loc-fact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  background-color: var(--hp-surface);
  border: 1px solid var(--hp-line);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--hp-body);
  box-shadow: var(--hp-shadow);
}

.hp-loc-fact svg { flex-shrink: 0; color: var(--hp-green); }

.hp-loc-fact strong {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--hp-ink);
}

/* ---------------------------------------------------------------- 2. Tabs */
.hp-loc-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(32px, 3.6vw, 48px);
}

.hp-loc-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  background-color: var(--hp-surface);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--hp-ink);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease;
}

.hp-loc-tab:hover {
  border-color: var(--hp-green);
  color: var(--hp-green);
}

.hp-loc-tab:focus-visible {
  outline: 3px solid var(--hp-orange);
  outline-offset: 2px;
}

.hp-loc-tab.is-active {
  background-color: var(--hp-green);
  border-color: var(--hp-green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(39, 108, 3, 0.24);
}

.hp-loc-tab__count {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--hp-green-tint);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--hp-green);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.hp-loc-tab.is-active .hp-loc-tab__count {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* -------------------------------------------------------------- 3. Panels
 * Hidden by default, shown by .is-active. The <noscript> block in
 * standorte.php overrides this to display:block so that with JS off every
 * group is visible rather than the visitor being stranded on the first one —
 * which only works because the default here is display:none. */
.hp-loc-panel { display: none; }

.hp-loc-panel.is-active {
  display: block;
  animation: hpLocFade 0.25s ease;
}

@keyframes hpLocFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.hp-loc-panel:focus-visible {
  outline: 3px solid var(--hp-orange);
  outline-offset: 6px;
  border-radius: var(--hp-radius-sm);
}

.hp-loc-panel__title {
  margin: 0 0 clamp(20px, 2.2vw, 28px);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--hp-ink);
  text-align: center;
}

.hp-loc-empty {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px 24px;
  border: 1px dashed var(--hp-line);
  border-radius: var(--hp-radius);
  text-align: center;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--hp-body);
}

/* --------------------------------------------------------- 4. Closing CTA */
.hp-loc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: clamp(40px, 4.6vw, 68px);
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 44px);
  border-radius: var(--hp-radius);
  background: linear-gradient(120deg, var(--hp-green-tint) 0%, #FDF3E4 100%);
  border: 1px solid rgba(39, 108, 3, 0.18);
}

.hp-loc-cta__text { min-width: 0; }

.hp-loc-cta__title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  color: var(--hp-ink);
}

.hp-loc-cta__sub {
  margin: 0;
  max-width: 62ch;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--hp-body);
}

.hp-loc-cta__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* .hp-btn--light is white-on-dark by design; on this pale card it needs a
   border to exist at all. */
.hp-loc-cta .hp-btn--light {
  border-color: var(--hp-green);
  color: var(--hp-green-deep);
}

.hp-loc-cta .hp-btn--light:hover {
  background-color: var(--hp-green);
  border-color: var(--hp-green);
  color: #fff;
}

/* --------------------------------------------------------- 5. Responsive */

/* Clear the fixed mobile logo bar. This replaces the body-level
   `.page-template-standorte { padding: 7rem 0 0 }` that used to do it, which
   pushed the header down with everything else and applied on desktop too,
   where there is no fixed bar at all. */
@media (max-width: 1024px) {
  .hp-loc-hero {
    padding-top: calc(var(--he-mobile-header, 61px) + clamp(28px, 5vw, 48px));
  }
}

@media (max-width: 680px) {
  /* Full-width tab rows: at three pills per line the labels wrap mid-word and
     the counts end up orphaned. One per line stays readable and gives a much
     bigger tap target. */
  .hp-loc-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hp-loc-tab { justify-content: space-between; }

  .hp-loc-fact {
    width: 100%;
    justify-content: center;
  }

  .hp-loc-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .hp-loc-cta__actions { width: 100%; }
  .hp-loc-cta__actions .hp-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-loc-panel.is-active { animation: none; }
}
