/* =========================================================
    Vorlage "Category" - Terrasse & Garten, Fenster & Fassade
    ========================================================= */

.pc-wrap {
  --c-navy: var(--lp-navy);
  --c-navy-dark: var(--lp-navy-dark);
  --c-muted: var(--lp-muted);
  --c-label: var(--lp-label);
  --c-border: var(--lp-border);
  --c-accent: var(--lp-accent);

  padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.pc-wrap) {
    scroll-behavior: smooth;
  }
}

/* Tastaturfokus (Buttons und Textlinks: components.css) */
.pc-card:focus-visible,
.pc-jump__link:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 3px;
}

/* Kopfbereich */
.pc-header {
  margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

/* =========================================================
    Visueller Titelbild-Hero (Markisen-Seite)
    ========================================================= */

.pc-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  /* Übersichtsseiten dienen der Auswahl: die Sprungmarken sollen beim Laden schon sichtbar sein */
  min-height: clamp(360px, 52svh, 480px);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  overflow: hidden;
  border-radius: var(--lp-radius);
  background-color: var(--c-navy-dark);
  color: #fff;
  margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

.pc-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.pc-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 55%;
}

/* Nur hinter dem Text abdunkeln — das Foto bleibt sichtbar */
.pc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(15, 22, 29, 0.82) 0%, rgba(15, 22, 29, 0.45) 38%, rgba(15, 22, 29, 0) 68%),
    linear-gradient(to right, rgba(15, 22, 29, 0.55) 0%, rgba(15, 22, 29, 0.2) 45%, rgba(15, 22, 29, 0) 70%);
}

.pc-hero--plain::before {
  content: none;
}

.pc-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.75rem 3rem;
  width: 100%;
}

.pc-hero__content {
  max-width: 42rem;
}

.pc-hero__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  text-wrap: balance;
}

.pc-hero__lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  max-width: 38rem;
}

.pc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.pc-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border: 1px solid #fff;
  border-radius: var(--lp-radius-ui);
  background-color: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-navy-dark);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pc-hero__btn:hover,
.pc-hero__btn:focus-visible {
  background-color: transparent;
  color: #fff;
}

.pc-hero__phone {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.pc-hero__phone:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

.pc-hero__btn:focus-visible,
.pc-hero__phone:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Bildbeschriftung */
.pc-hero__caption {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: right;
  color: rgba(255, 255, 255, 0.88);
}

/* Kopfbereich (bestehend) leicht anpassen wenn Hero vorhanden */
.pc-wrap:has(.pc-hero) .pc-header {
  margin-bottom: 0;
}

/* Beschreibung unter dem Titel (Produktkategorie-Archiv) */
.pc-title {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.35rem + 2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-navy-dark);
  text-wrap: balance;
}

.pc-title::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background-color: var(--c-accent);
}

/* Beschreibung unter dem Titel (Produktkategorie-Archiv) */
.pc-lead {
  max-width: 44rem;
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
  color: var(--c-muted);
}

/* Inhalt aus dem Editor (z. B. Werbebanner) */
.pc-intro {
  margin-top: 2rem;
}

.pc-intro > :last-child,
.pc-intro figure {
  margin-bottom: 0;
}

/* Bildblöcke aus Gutenberg (aligncenter schrumpft sonst auf Bildbreite) */
.pc-intro .wp-block-image,
.pc-intro figure {
  display: block;
  width: 100%;
  margin-inline: 0;
}

.pc-intro p:empty {
  display: none;
}

.pc-intro img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--lp-radius);
}

/* Inhalt aus dem Editor unter den Produktgruppen (nach dem Block "Weiterlesen"): Text und FAQ */
.pc-more .pc-intro {
  margin-top: 0;
}

.pc-more h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--c-navy-dark);
}

.pc-more * + h2 {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.pc-more p,
.pc-more li {
  max-width: 72ch;
  line-height: 1.7;
  color: var(--lp-text);
}

.pc-more ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.pc-more ul > li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--c-border);
}

.pc-more ul > li:last-child {
  border-bottom: 1px solid var(--c-border);
}

.pc-more li strong {
  font-weight: 600;
  color: var(--c-navy-dark);
}

.pc-more a:not(.lp-link) {
  color: var(--c-navy-dark);
  text-decoration: underline;
  text-decoration-color: var(--c-accent);
  text-underline-offset: 0.2em;
}

/* Kategorie-Abschnitte */
.pc-section {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  border-top: 1px solid var(--c-border);
  scroll-margin-top: 6.5rem;
}

.pc-section:first-of-type {
  border-top: 0;
}

.pc-section__head {
  margin-bottom: 2rem;
}

.pc-section__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1;
  color: var(--c-navy-dark);
}

.pc-section__text {
  margin: 0.6rem 0 0;
  color: var(--c-muted);
}

/* Produktkarten */
.pc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--lp-radius);
  background-color: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  border: 1px solid var(--lp-border);
  transition: border-color 0.3s ease;
}

.pc-card:hover {
  color: inherit;
  border-color: #b5bdc5;
}

.pc-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--c-border);
}

.pc-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.pc-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem 1.4rem 1.4rem;
}

.pc-card__title {
  margin: 0 0 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-navy-dark);
}

/* Höchstens vier Zeilen - lange Produkttexte ohne Auszug sollen die Karten nicht unterschiedlich hoch machen */
.pc-card__info {
  display: -webkit-box;
  flex: 1;
  margin: 0 0 1.25rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-muted);
}

.pc-card__info strong {
  font-weight: 600;
  color: var(--c-navy);
}

.pc-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-navy);
}

.pc-card__more .lp-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .pc-card:hover .pc-card__img {
    transform: scale(1.05);
  }

  .pc-card:hover .pc-card__more .lp-arrow {
    transform: translateX(3px);
  }
}

/* Beratung am Seitenende (template-parts/cta.php) - Abstand kommt von der letzten Sektion */
.pc-wrap .lp-cta {
  margin-top: 0;
}

/* Google Bewertungen */
.pc-reviews {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  border-top: 1px solid var(--c-border);
}

.pc-reviews__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.pc-reviews__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1;
  color: var(--c-navy-dark);
}

.pc-reviews__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.pc-reviews__stars {
  display: inline-flex;
  gap: 2px;
}

.pc-reviews__rating {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-muted);
}

.pc-reviews__widget {
  border-radius: var(--lp-radius);
  overflow: hidden;
}

.pc-reviews__widget .ti-widget {
  border-radius: var(--lp-radius);
}

.pc-reviews__widget .ti-widget .ti-inner,
.pc-reviews__widget .ti-widget.ti-goog .ti-review-item > .ti-inner {
  border-radius: var(--lp-radius) !important;
}

@media (max-width: 575.98px) {
  .pc-reviews__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .pc-reviews {
    padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
  }
}

/* Sprungmarken zu den Kategorien */
.pc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.pc-jump__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--lp-rule);
  border-radius: var(--lp-radius-ui);
  background-color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-navy-dark);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pc-jump__link:hover {
  border-color: var(--c-navy);
  background-color: var(--c-navy);
  color: #fff;
}

/* Direkt unter dem Titelbild: der Abstand kommt vom Hero */
.pc-hero + .pc-jump {
  margin-top: 0;
}

/* Referenzprojekte und Schauraum vor der Beratung am Seitenende */
.pc-proof__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.pc-proof__cards.ref-cards--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
  .pc-proof__cards.ref-cards--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .pc-hero {
    padding: 1.5rem 1rem;
    min-height: clamp(300px, 60svh, 400px);
  }

  .pc-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .pc-hero__content {
    max-width: 100%;
  }

  .pc-jump {
    gap: 0.4rem;
  }

  .pc-jump__link {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }
}

/* =========================================================
   Kategorie-Karten statt Produktgruppen (z. B. Terrasse & Garten)
   Karten-Styles in entry-cards.css
   ========================================================= */

.pc-entry {
  border-top: 0;
}

.pc-entry__title {
  margin-bottom: 2rem;
  line-height: 1.2;
  text-wrap: balance;
}

/* =========================================================
   Häufige Fragen am Seitenende: zweispaltig wie der Referenzblock (.pc-proof)
   links Überschrift und Telefon, rechts die Fragen (Aufklapp-Stil aus faq.css)
   ========================================================= */

/* gleiche Werte wie die Überschrift des Referenzblocks (.pc-section__title) */
.pc-faq .pc-faq__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1;
}

.pc-faq__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.pc-faq__items > :first-child {
  margin-top: 0;
}

.pc-faq__items > :last-child {
  margin-bottom: 0;
}

/* Einleitung zwischen Titelbild und Kategorie-Karten - kurzer Absatz über die volle Breite */
.pc-entry__text {
  margin: 0 0 clamp(2.5rem, 1.5rem + 3vw, 4rem);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--c-muted);
}

/* Mehrere Absätze: nur der letzte trägt den großen Abstand zu den Karten */
.pc-entry__text:has(+ .pc-entry__text) {
  margin-bottom: 1rem;
}

/* Absatz gehört zum Titelbild: weniger Abstand nach oben */
.pc-entry:has(> .pc-entry__text) {
  padding-top: 1.5rem;
}
