/* ===========================================================================
 * Hauptstadt-Entsorger — service detail pages
 * (template-service-details-oldsite.php)
 *
 * Requires ui.css (tokens, primitives, .hp-rte) and home.css (split rows, FAQ,
 * inline CTA), both declared as dependencies in functions.php.
 *
 * Replaces the ~260-line style block that used to live inside the template and
 * the svc- / about-banner / available-cta / focus rules it borrowed from
 * main.css — all of which are shared with page-service-details.php, so the two
 * could not be changed independently.
 *
 * NOTE: never write an asterisk followed by a slash inside these comments (as
 * in a wildcard selector like ".svc-" plus "*" plus "/"). It terminates the
 * comment early; the rest of the block is then parsed as a broken selector and
 * CSS error recovery silently swallows the FIRST REAL RULE that follows. That
 * exact typo disabled .hp-svc-row's `display: flex` here and made the intro
 * section stack at every viewport width.
 *
 * Contents
 *   1. Hero
 *   2. Intro (aside: service list + contact card)
 *   3. Why-us row
 *   4. Dark CTA band
 *   5. Online-request promo
 *   6. Responsive
 * ========================================================================= */

/* ------------------------------------------------------------- 0. Rhythm
 * A service page stacks more bands than any other template on the site: hero,
 * trust strip, intro, up to five editorial rows, process, "wer sonst?",
 * videos, CTA, WhatsApp, FAQ. At the shared spacing — up to 104px of section
 * padding at each seam and 96px between rows — that adds well over a thousand
 * pixels of empty space to a page whose rows are mostly one paragraph each,
 * and the reader spends the scroll waiting rather than reading.
 *
 * --hp-pad is redefined rather than each section being overridden one by one.
 * That is safe HERE and only here: service.css is enqueued on the two service
 * detail templates alone, so nothing else can see it. Do not copy this trick
 * into a stylesheet with a wider reach.
 */
:root {
  --hp-pad: clamp(44px, 4.8vw, 76px);
}

/* Between editorial rows. Same reasoning: these rows are short. */
.hp-splits { gap: clamp(36px, 4vw, 60px); }

/* The row's picture is sticky and its offset has to clear the 80px header —
   with the tighter rhythm it can sit a little closer. */
.hp-split__img { top: 96px; }

/* ---------------------------------------------------------------- 1. Hero
 * Now the shared .hp-hero component in ui.css, rendered from
 * template-parts/hero.php. Nothing service-specific left here. */

/* --------------------------------------------------------------- 2. Intro
 * Flexbox with wrapping, NOT a grid with a breakpoint.
   The columns sit side by side whenever there is room for 400px of content
   plus a 300px aside, and drop to one column the moment there is not — decided
   by the actual available width rather than by a media query guessing at the
   viewport. Earlier grid versions kept collapsing because the breakpoint was
   set above the window the page was actually being viewed in. */
.hp-svc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(20px, 2.4vw, 38px);
}

.hp-svc-row > .hp-svc-row__media,
.hp-svc-row > .hp-svc-row__body {
  flex: 1 1 400px;
  min-width: 0;
}

.hp-svc-row > aside {
  flex: 1 1 300px;
  min-width: 0;
  max-width: 340px;
}

.hp-svc-row + .hp-svc-row { margin-top: clamp(28px, 3.4vw, 48px); }

.hp-svc-row__media {
  margin: 0;
  border-radius: var(--hp-radius);
  overflow: hidden;
  box-shadow: var(--hp-shadow);
}

.hp-svc-row__media img {
  width: 100%;
  height: clamp(280px, 32vw, 430px);
  object-fit: cover;
  object-position: center;
  display: block;
}

.hp-svc-row__body { min-width: 0; }

/* Service list card */
.hp-svc-listcard {
  padding: 26px 24px;
  border-radius: var(--hp-radius);
  background-color: #FDF3E4;
  border: 1px solid rgba(255, 165, 0, 0.22);
}

.hp-svc-listcard__title {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  color: var(--hp-ink);
}

.hp-svc-listcard__all {
  width: 100%;
  margin-top: 16px;
}

.hp-svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-svc-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  background-color: #fff;
  border: 1px solid var(--hp-line);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: var(--hp-ink);
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.25s ease;
}

.hp-svc-list a svg { flex-shrink: 0; opacity: 0.5; transition: opacity 0.25s ease, transform 0.25s ease; }

.hp-svc-list a:hover {
  background-color: var(--hp-green);
  border-color: var(--hp-green);
  color: #fff;
  transform: translateX(3px);
}

.hp-svc-list a:hover svg { opacity: 1; transform: translateX(2px); }

.hp-svc-list a.is-active {
  background-color: var(--hp-green);
  border-color: var(--hp-green);
  color: #fff;
}

.hp-svc-list a.is-active svg { opacity: 1; }

/* Contact card */
.hp-svc-contact-card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--hp-radius);
  background-color: var(--hp-green-dark);
  overflow: hidden;
  text-align: center;
}

/* Photo sits at z-index 0 with the card's own content lifted above it, rather
   than a negative layer — those only paint above their element's background
   while the stacking context holds exactly right, which it did not. */
.hp-svc-contact-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
}

.hp-svc-contact-card > :not(.hp-svc-contact-card__bg) {
  position: relative;
  z-index: 1;
}

.hp-svc-contact-card__title {
  margin: 0 0 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  color: #fff;
}

.hp-svc-contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 50%;
  background-color: var(--hp-orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 165, 0, 0.3);
  transition: transform 0.3s ease;
}

.hp-svc-contact-card__icon:hover { transform: scale(1.06); }

.hp-svc-contact-card__label {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.hp-svc-contact-card__phone {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hp-svc-contact-card__phone:hover { color: var(--hp-orange); }

/* ------------------------------------------------------------ 3. Why us */
.hp-svc-why__list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.hp-svc-why__list li {
  position: relative;
  padding-left: 34px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--hp-body);
}

.hp-svc-why__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--hp-green-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 6L9 17L4 12' stroke='%23276C03' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ------------------------------------------------------ 4. Dark CTA band */
.hp-svc-cta {
  position: relative;
  overflow: hidden;
  background-color: var(--hp-green-deep);
}

/* Safety net for the two green bands landing next to each other.
   The process band (.hp-section--dark) and this one are both green, and the
   templates now always render a light section between them. If that ever stops
   being true, ui.css's same-class collapse rule will not help — this band is
   .hp-svc-cta, not .hp-section--dark, so the selector never matches and you get
   two full paddings of unbroken green reading as one slab. A visible seam plus
   a single padding keeps them legible as two bands regardless. */
.hp-section--dark + .hp-svc-cta {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: clamp(40px, 4vw, 64px);
}

.hp-svc-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.hp-svc-cta > .hp-container {
  position: relative;
  z-index: 1;
}

.hp-svc-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 26px;
}

.hp-svc-cta__text { max-width: 640px; }

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

/* ------------------------------------------------------------- 5. Promo */
.hp-promo {
  position: relative;
  overflow: hidden;
  background-color: #1d3a0d;
}

.hp-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -12%, rgba(159, 207, 94, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(20, 42, 10, 0.15), rgba(12, 30, 6, 0.55));
  pointer-events: none;
}

.hp-promo > .hp-container {
  position: relative;
  z-index: 1;
}

.hp-promo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 4vw, 60px);
  align-items: center;
}

.hp-promo__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.hp-promo__card {
  padding: 24px;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.hp-promo__card-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: #fff;
}

.hp-promo__lead {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.hp-promo__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-promo__list li {
  position: relative;
  padding-left: 30px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.hp-promo__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 6L9 17L4 12' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.hp-promo__note {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.hp-promo__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.hp-promo__scan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hp-promo__qr { width: 54px; height: 54px; object-fit: contain; display: block; }

.hp-promo__scan-label {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.hp-promo__visual { position: relative; text-align: center; }

.hp-promo__phone {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.45));
}

.hp-promo__logo {
  width: 130px;
  height: auto;
  margin: 22px auto 0;
  display: block;
  opacity: 0.9;
}

/* ---------------------------------------------------------- 6. Responsive */
@media (max-width: 1024px) {
  .hp-promo__grid { grid-template-columns: minmax(0, 1fr); }
  .hp-promo__visual { order: -1; }
  .hp-promo__phone { max-width: 210px; }
}

/* No breakpoint needed for .hp-svc-row — it wraps on its own. This only
   trims the picture once there is a single column to fill. */
@media (max-width: 720px) {
  .hp-svc-row > aside { max-width: none; }
  .hp-svc-row__media img { height: clamp(220px, 48vw, 320px); }
}

@media (max-width: 680px) {
  .hp-promo__cards { grid-template-columns: minmax(0, 1fr); }

  .hp-svc-cta__inner { flex-direction: column; align-items: flex-start; }
  .hp-svc-cta__actions { width: 100%; }
  .hp-svc-cta__actions .hp-btn { flex: 1 1 auto; }

  .hp-promo__actions { width: 100%; }
  .hp-promo__actions .hp-btn { width: 100%; }
  .hp-promo__scan { width: 100%; }

  /* Same reasoning as the home hero: the uppercase captions are what force one
     badge per row, so drop them and let two share a line. */
}
