/* =========================================================
   Gastronomie & Hotellerie (B2B)
   ========================================================= */

.gs-wrap {
  --g-navy: var(--lp-navy);
  --g-navy-dark: var(--lp-navy-dark);
  --g-text: var(--lp-text);
  --g-muted: var(--lp-muted);
  --g-label: var(--lp-label);
  --g-border: var(--lp-border);
  --g-accent: var(--lp-accent);

  /* Variablen für die geteilten Bausteine aus category.css */
  --c-navy: var(--g-navy);
  --c-navy-dark: var(--g-navy-dark);
  --c-muted: var(--g-muted);
  --c-label: var(--g-label);
  --c-border: var(--g-border);
  --c-accent: var(--g-accent);

  padding-top: 1.5rem;
}

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

/* Brotkrümel (components.css) - etwas enger über dem Titelbild */
.gs-wrap .lp-breadcrumbs ol {
  margin-bottom: 1.25rem;
}

/* =========================================================
   Titelbild - gleiche Bildsprache wie der Hero der Startseite,
   aber im Container und niedriger
   ========================================================= */

.gs-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 58vh, 540px);
  min-height: clamp(380px, 58svh, 540px);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  overflow: hidden;
  border-radius: var(--lp-radius);
  background-color: var(--g-navy-dark);
  color: #fff;
}

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

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

/* Nur hinter dem Text abdunkeln - das Foto bleibt sichtbar */
.gs-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%);
}

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

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

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

.gs-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;
}

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

.gs-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(--g-navy-dark);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.gs-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;
}

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

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

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

.gs-hero__caption-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
}

.gs-hero__caption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.gs-hero__caption a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

/* =========================================================
   Sektionen
   ========================================================= */

.gs-section {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
  border-top: 1px solid var(--g-border);
}

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

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

.gs-section__head .gs-section__title {
  margin-bottom: 0.5rem;
}


/* Häufige Fragen - Inhalt aus dem Editor (Baustein "Häufige Fragen (FAQ)"), Aufklapp-Stil aus faq.css */
/* Links ausgerichtet wie alle anderen Abschnitte, Lesebreite begrenzt */
.gs-faq {
  max-width: 52rem;
}

.gs-faq > h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--g-navy-dark);
  text-wrap: balance;
}

.gs-faq .wp-block-details p {
  line-height: 1.75;
  color: var(--g-muted);
}

.gs-faq > :last-child {
  margin-bottom: 0;
}

/* Überschrift mit Link rechts daneben (Referenzen) */
.gs-section__head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.gs-section__head--split .gs-section__title {
  margin-bottom: 0;
}

/* =========================================================
   Fakten unter dem Titelbild
   ========================================================= */

.gs-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--g-border);
}

.gs-fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.25rem 1.25rem 1.35rem;
}

.gs-fact:first-child {
  padding-left: 0;
}

.gs-fact + .gs-fact {
  border-left: 1px solid var(--g-border);
}

.gs-fact__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--g-navy-dark);
}

.gs-fact__text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--g-muted);
}

.gs-facts + .gs-section {
  border-top: 0;
}

/* =========================================================
   Referenzen - ein großes Projekt, vier kleine
   ========================================================= */

.gs-refs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-ref--lead {
  grid-column: span 2;
  grid-row: span 2;
}

.gs-ref__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gs-ref__link:hover {
  color: inherit;
}

.gs-ref__link:focus-visible {
  outline: 2px solid var(--g-navy);
  outline-offset: 3px;
}

.gs-ref__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--lp-radius);
  background-color: var(--g-border);
}

.gs-ref--lead .gs-ref__media {
  aspect-ratio: 4 / 3;
}

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

.gs-ref__title {
  margin: 0.75rem 0 0.15rem;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--g-navy-dark);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.gs-ref--lead .gs-ref__title {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.gs-ref__link:hover .gs-ref__title {
  text-decoration-color: rgba(44, 62, 80, 0.45);
}

.gs-ref__meta,
.gs-ref__products {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--g-muted);
}

.gs-ref__products {
  margin-top: 0.15rem;
  color: var(--g-navy);
}

@media (hover: hover) {
  .gs-ref__link:hover .gs-ref__img {
    transform: scale(1.03);
  }
}

/* =========================================================
   Ablauf eines Projekts
   ========================================================= */

.gs-steps {
  padding: clamp(2rem, 1.5rem + 2vw, 3rem);
  border: 1px solid var(--g-border);
  border-radius: var(--lp-radius);
  background-color: #fff;
}

.gs-steps__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: gs-step;
}

.gs-step {
  padding-top: 1rem;
  border-top: 2px solid var(--lp-rule);
  counter-increment: gs-step;
}

.gs-step::before {
  content: counter(gs-step);
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--g-navy);
}

.gs-step__title {
  margin: 0 0 0.3rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--g-navy-dark);
}

.gs-step__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--g-muted);
}

.gs-steps + .gs-section {
  border-top: 0;
}

/* =========================================================
   Alle Systeme als Übersicht
   ========================================================= */

.gs-index {
  scroll-margin-top: 6.5rem;
}

.gs-index__groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 1.75rem;
}

.gs-index__title {
  margin: 0 0 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--lp-rule);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--g-navy-dark);
}

.gs-index__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-index__list li {
  padding-block: 0.3rem;
}

.gs-index__list a {
  font-size: 0.95rem;
  color: var(--g-navy);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.gs-index__list a:hover,
.gs-index__list a:focus-visible {
  text-decoration-color: currentColor;
}

/* Kontakt-Box am Seitenende (template-parts/cta.php, components.css) */
.gs-cta {
  padding-bottom: clamp(1rem, 0.5rem + 1vw, 1.5rem);
}

.gs-cta .lp-cta {
  margin-top: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
  .gs-facts,
  .gs-steps__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-fact:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .gs-fact:nth-child(n + 3) {
    border-top: 1px solid var(--g-border);
  }

  .gs-refs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-ref--lead {
    grid-row: auto;
  }
}

@media (max-width: 767.98px) {
  .gs-hero {
    min-height: clamp(420px, 70svh, 520px);
  }

  /* Schmales Format: Gastgarten statt Hausfassade im Bild */
  .gs-hero__media img {
    object-position: 72% 50%;
  }

  .gs-hero::before {
    background: linear-gradient(to top, rgba(15, 22, 29, 0.88) 0%, rgba(15, 22, 29, 0.5) 55%, rgba(15, 22, 29, 0.12) 100%);
  }

  .gs-hero__caption {
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .gs-hero__btn {
    width: 100%;
  }

  .gs-steps__list {
    grid-template-columns: 1fr;
  }

  .gs-fact {
    padding: 1rem 0.75rem 1.1rem;
  }

  .gs-refs {
    gap: 1.25rem 0.75rem;
  }
}

/* =========================================================
   Titelbild: Aufbau und Styles von .pc-hero (category.css),
   dazu die Referenz-Beschriftung unten rechts
   ========================================================= */

.gs-wrap .pc-hero__lead {
  margin-top: -0.5rem;
}

.gs-hero-caption__label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
}

.gs-hero-caption a {
  color: #fff;
  text-decoration: none;
}

.gs-hero-caption a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gs-hero-caption a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* =========================================================
   Kategorie-Karten (Styles in entry-cards.css)
   ========================================================= */

.gs-cats {
  border-top: 0;
}

.gs-cats .gs-section__title {
  margin-bottom: 2rem;
}

/* Karten ohne Text: Titel mittig zum Pfeil */
.gs-wrap .entry-card__body {
  align-items: center;
}

/* Kleinere Kategorien als Textlinks unter den Karten */
.gs-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 0;
}

.gs-extras__label {
  color: var(--g-muted);
}

@media (max-width: 767.98px) {
  .gs-hero-caption {
    text-align: left;
  }

  /* Hochformat: der Text reicht bis ins helle Laub - Verlauf höher ziehen (wie früher beim Gastro-Titelbild) */
  .gs-wrap .pc-hero::before {
    background: linear-gradient(to top, rgba(15, 22, 29, 0.88) 0%, rgba(15, 22, 29, 0.5) 55%, rgba(15, 22, 29, 0.12) 100%);
  }
}
