/*
Theme Name: restbid
Theme URI: https://restbid.de/
Author: Restbid
Description: Block-Theme für restbid.de. Struktur übertragen aus der Industry-Vorlage (DexignZone), Marke und Tokens aus restbid-web (CLAUDE.md, DESIGN-TOKENS.md). Ohne jQuery, ohne externe CDNs, ohne Dark Mode.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: restbid
Tags: block-theme, full-site-editing
*/

/* ==========================================================================
   Basis
   ========================================================================== */
:root {
  --rb-container: 1200px;
  --rb-gutter: 15px;
  --rb-radius-sm: 3px;
  --rb-radius-lg: 10px;
  --rb-shadow-card: 0 0 30px 0 rgba(20, 24, 31, 0.06);
  --rb-shadow-card-hover: 0 12px 28px 0 rgba(20, 24, 31, 0.14);
  --rb-shadow-menu: 0 1px 40px 0 rgba(20, 24, 31, 0.08);
  --rb-line: var(--wp--preset--color--outline);
  --rb-ease-aus: cubic-bezier(0.22, 1, 0.36, 1);
}

body { -webkit-font-smoothing: antialiased; }

/* Eyebrow über der Überschrift. Orangefarbener Kleintext trägt signal-ink,
   nicht signal-500 — auf Weiß erreicht signal-500 nur 3,58:1 und verfehlt
   damit die 4,5:1-Schwelle für normalen Text (DESIGN-TOKENS.md). */
.rb-kicker {
  display: block;
  color: var(--wp--preset--color--signal-ink);
  font-family: var(--wp--preset--font-family--plex-mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Zweifarbige Überschrift: ein Schlüsselwort in der Signalfarbe, der Rest in
   Anthrazit — die Logik der Wortmarke, übertragen auf H1 (CLAUDE.md, Marke).
   Große Schrift, daher greift die 3:1-Schwelle und signal-500 ist zulässig. */
.rb-akzent { color: var(--wp--preset--color--signal-500); }

/* Sechseck als Marker. Wiederkehrendes Element für Schrittnummern,
   Aufzählungszeichen und Statusmarker — höchstens drei bis vier je Seite. */
.rb-hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 60px;
  flex: none;
  background: var(--wp--preset--color--signal-500);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  color: #fff;
  font-family: var(--wp--preset--font-family--barlow-condensed);
  font-size: var(--wp--preset--font-size--xxl);
  font-weight: 700;
  line-height: 1;
}
.rb-hex svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; }

/* ==========================================================================
   Kopfbereich  — Vorlage: index.html:92-135, layout/header.css
   ========================================================================== */
.rb-header {
  background: #fff;
  position: relative;
  width: 100%;
  z-index: 99;
  box-shadow: var(--rb-shadow-menu);
}
.rb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--rb-container);
  margin-inline: auto;
  padding-inline: var(--rb-gutter);
  min-height: 70px;
}

/* Logo: Signet plus Wortmarke als Lebendtext. Die Wortmarke ist bewusst
   keine Grafikdatei — sie skaliert scharf und ist vorlesbar (brand/README.md).
   Sobald unter Design ein Logo hinterlegt wird, tritt es an ihre Stelle. */
.rb-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.rb-logo:hover { text-decoration: none; }
.rb-logo__signet { width: 32px; height: 32px; flex: none; }
.rb-logo__wort {
  font-family: var(--wp--preset--font-family--barlow-condensed);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--wp--preset--color--steel-950);
}
.rb-logo__wort b { font-weight: 700; color: var(--wp--preset--color--signal-500); }
.rb-header__inner:has(.wp-block-site-logo img) .rb-logo { display: none; }
.rb-header .wp-block-site-logo img { max-width: 180px; height: auto; display: block; }

.rb-header .wp-block-navigation { font-weight: 600; }
.rb-header .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--wp--preset--color--steel-900);
  font-size: var(--wp--preset--font-size--2-sm);
  padding: 24px 18px;
  display: inline-block;
  position: relative;
  text-decoration: none;
  transition: color .4s var(--rb-ease-aus);
}
.rb-header .wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: auto;
  width: 0;
  height: 3px;
  background: var(--wp--preset--color--signal-500);
  transition: width .4s var(--rb-ease-aus);
}
.rb-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.rb-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--signal-ink);
}
.rb-header .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.rb-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after {
  width: 100%;
  left: 0;
  right: auto;
}

/* Unter 992 px bricht die Navigation um, statt sich hinter einem
   Overlay-Menü zu verstecken — dessen Umschalter bräuchte JavaScript. */
@media (max-width: 991px) {
  .rb-header__inner { padding-block: 10px; }
  .rb-header .wp-block-navigation { width: 100%; }
  .rb-header .wp-block-navigation > .wp-block-navigation__container {
    width: 100%;
    justify-content: flex-start;
    gap: 2px 18px;
  }
  .rb-header .wp-block-navigation .wp-block-navigation-item__content { padding: 8px 0; }
  .rb-header .wp-block-navigation .wp-block-navigation-item__content::after { display: none; }
  .rb-header .wp-block-navigation .wp-block-navigation__submenu-container { position: static; box-shadow: none; }
}

/* ==========================================================================
   Fußbereich  — Vorlage: about-1.html:656 und :702
   ========================================================================== */
.rb-footer { background: var(--wp--preset--color--steel-950); }
.rb-footer__top { padding: 70px 0 30px; }
.rb-footer__inner {
  max-width: var(--rb-container);
  margin-inline: auto;
  padding-inline: var(--rb-gutter);
}
.rb-footer, .rb-footer p, .rb-footer li { color: var(--wp--preset--color--steel-300); }
.rb-footer p { font-size: var(--wp--preset--font-size--2-sm); line-height: 1.7; }
.rb-footer a { color: var(--wp--preset--color--steel-300); text-decoration: none; transition: color .4s var(--rb-ease-aus); }
.rb-footer a:hover { color: var(--wp--preset--color--signal-500); text-decoration: underline; }
.rb-footer h2, .rb-footer h3, .rb-footer h4 {
  color: #fff;
  font-size: var(--wp--preset--font-size--xl);
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 26px;
}
.rb-footer h2::after, .rb-footer h3::after, .rb-footer h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--wp--preset--color--signal-500);
}
.rb-footer .wp-block-navigation .wp-block-navigation__container { gap: 12px; }
.rb-footer .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--wp--preset--color--steel-300);
  font-size: var(--wp--preset--font-size--2-sm);
  text-decoration: none;
}
.rb-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--signal-500);
  text-decoration: underline;
}
.rb-footer__bottom {
  border-top: 1px solid var(--wp--preset--color--steel-800);
  padding: 20px 0;
}
.rb-footer__bottom p { margin: 0; font-size: var(--wp--preset--font-size--2-xs); }

/* ==========================================================================
   Innenseiten-Banner  — Vorlage: about-1.html:314-329
   ========================================================================== */
.rb-banner {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--wp--preset--color--steel-900);
}
.rb-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 31, 0.62);
}
.rb-banner__inner {
  position: relative;
  z-index: 1;
  max-width: var(--rb-container);
  margin-inline: auto;
  padding: 20px var(--rb-gutter);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
.rb-banner h1 {
  color: #fff;
  font-size: var(--wp--preset--font-size--4-5-xl);
  margin: 0;
}
.rb-banner .rb-breadcrumb { color: var(--wp--preset--color--steel-300); font-size: var(--wp--preset--font-size--2-sm); }
.rb-banner .rb-breadcrumb a { color: var(--wp--preset--color--steel-300); text-decoration: none; }
.rb-banner .rb-breadcrumb a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 767px) {
  .rb-banner { min-height: 180px; }
  .rb-banner__inner { justify-content: center; text-align: center; }
  .rb-banner h1 { font-size: var(--wp--preset--font-size--2-5-xl); }
}

/* ==========================================================================
   Sektionen — Rhythmus wie auf den Startseiten der Vorlage.
   Kein primärfarbenes Band: Orange ist Signalfarbe, keine Flächenfarbe
   (CLAUDE.md, Gestaltungsprinzipien).
   ========================================================================== */
.rb-section { padding-block: 80px 54px; }
/* Hero und Sektionen laufen randlos ueber die volle Fensterbreite, wie in der
   Vorlage. Der Inhalt darin bleibt auf 1200 px begrenzt. Die Breakout-Regel
   von WordPress (alignfull) greift nur, wenn der umgebende Layout-Container
   sie kennt — deshalb hier zusaetzlich abgesichert. */
/* Kein eigenes margin-inline hier: WordPress setzt fuer .alignfull negative
   Raender in Hoehe der Wurzel-Polsterung. Eine eigene Regel wuerde genau den
   Ausbruch verhindern, der randlose Sektionen erst moeglich macht. */
/* Sektionen stoßen bündig aneinander, sonst setzt der Standard-Blockabstand
   einen weißen Streifen zwischen zwei farbige Bänder. */
.rb-hero, .rb-section { margin-block: 0 !important; }
.rb-section--light { background: var(--wp--preset--color--surface); }
.rb-section--muted { background: var(--wp--preset--color--surface-muted); }
.rb-section--dark  { background: var(--wp--preset--color--steel-900); }
@media (max-width: 767px) { .rb-section { padding-block: 40px 30px; } }

.rb-section--dark h1, .rb-section--dark h2, .rb-section--dark h3,
.rb-section--dark h4, .rb-section--dark h5, .rb-section--dark h6 { color: #fff; }
.rb-section--dark p { color: var(--wp--preset--color--steel-300); }
/* Auf dunklem Grund erreicht signal-500 als Kleintext genug Kontrast. */
.rb-section--dark .rb-kicker { color: var(--wp--preset--color--signal-500); }
.rb-section--dark .rb-tile {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.rb-section--dark .rb-tile:hover { border-color: var(--wp--preset--color--signal-500); }

/* Zentrierter Sektionskopf — Vorlage: index.html:422 */
.rb-section__head { text-align: center; margin-bottom: 54px; }
.rb-section__head > * { margin-left: auto !important; margin-right: auto !important; }
.rb-section__head h2 { margin-bottom: 8px; }
.rb-section__head p { max-width: 700px; padding-top: 6px; color: var(--wp--preset--color--muted); }
.rb-section__head > :last-child { margin-bottom: 0; }
@media (max-width: 767px) { .rb-section__head { margin-bottom: 30px; } }

/* ==========================================================================
   Hero  — Vorlage: index.html:320 (statisch, ohne Slider)
   ========================================================================== */
.rb-hero.wp-block-cover { min-height: 600px; padding-block: 90px; }
.rb-hero .wp-block-cover__inner-container { width: 100%; }
/* Mittig gesetzt wie in restbid-web. */
.rb-hero .wp-block-cover__inner-container { text-align: center; }
.rb-hero .rb-kicker { color: var(--wp--preset--color--steel-300); letter-spacing: 2px; }
.rb-hero h1 {
  color: #fff;
  font-size: var(--wp--preset--font-size--6-xl);
  line-height: 0.95;
  margin-bottom: 22px;
  text-wrap: balance;
}
/* Auf dunklem Grund traegt der Akzent den helleren Ton signal-300. */
.rb-hero h1 .rb-akzent { color: var(--wp--preset--color--signal-300); }
.rb-hero p { color: var(--wp--preset--color--steel-200); font-size: var(--wp--preset--font-size--lg); margin-inline: auto; max-width: 58ch; }
.rb-hero video.wp-block-cover__video-background { object-fit: cover; }
.rb-hero .wp-block-buttons { margin-top: 32px; }
@media (max-width: 991px) {
  .rb-hero.wp-block-cover { min-height: 460px; padding-block: 60px; }
  .rb-hero h1 { font-size: var(--wp--preset--font-size--4-5-xl); max-width: none; }
}
@media (max-width: 575px) {
  .rb-hero.wp-block-cover { min-height: 400px; padding-block: 45px; }
  .rb-hero h1 { font-size: var(--wp--preset--font-size--3-xl); }
  .rb-hero p { font-size: var(--wp--preset--font-size--2-sm); }
}

/* ==========================================================================
   Kategorie-Kacheln  — Vorlage: index-3.html:336-416
   Hover bewusst abgeschwächt: dezenter Zoom statt scale(1.5) rotate(-20deg)
   ========================================================================== */
.rb-cards.wp-block-columns { gap: 24px; }
.rb-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #fff;
  border-radius: var(--rb-radius-sm);
  box-shadow: var(--rb-shadow-card);
  height: 100%;
  transition: box-shadow .5s var(--rb-ease-aus), transform .5s var(--rb-ease-aus);
}
.rb-card:hover { box-shadow: var(--rb-shadow-card-hover); transform: translateY(-12px); }
/* Akzentlinie, die beim Überfahren aufwächst.
   Vorlage: after:h-1 after:w-0 after:bg-primary … hover:after:w-full */
.rb-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 4px;
  width: 0;
  background: var(--wp--preset--color--signal-500);
  transition: width .6s var(--rb-ease-aus);
  z-index: 2;
}
.rb-card:hover::after { width: 100%; right: auto; left: 0; }
.rb-card__media { overflow: hidden; border-radius: var(--rb-radius-sm); position: relative; margin: 0; }
.rb-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s var(--rb-ease-aus); }
.rb-card:hover .rb-card__media img { transform: scale(1.06); }
.rb-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.rb-card__body > :last-child { margin-bottom: 0; margin-top: auto; }
.rb-card__body h2, .rb-card__body h3, .rb-card__body h4 {
  font-size: var(--wp--preset--font-size--xxl);
  margin-bottom: 10px;
}
.rb-card__body h2 a, .rb-card__body h3 a, .rb-card__body h4 a {
  color: var(--wp--preset--color--heading);
  text-decoration: none;
}
.rb-card__body h2 a:hover, .rb-card__body h3 a:hover, .rb-card__body h4 a:hover { color: var(--wp--preset--color--signal-ink); }
.rb-card__body p { font-size: var(--wp--preset--font-size--2-sm); color: var(--wp--preset--color--muted); margin-bottom: 20px; }
@media (max-width: 575px) { .rb-card__body { padding: 14px; } }

/* ==========================================================================
   Verbindlichkeits-Kacheln  — Vorlage: index-4.html:346-380
   ========================================================================== */
.rb-tile {
  padding: 28px 22px 22px;
  background: var(--wp--preset--color--surface-muted);
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg);
  text-align: center;
  height: 100%;
  transition: border-color .5s var(--rb-ease-aus), background .5s var(--rb-ease-aus);
}
.rb-tile:hover { border-color: var(--wp--preset--color--signal-500); }
.rb-tile .rb-hex { margin: 0 auto 16px; }
.rb-tile h2, .rb-tile h3, .rb-tile h4 { font-size: var(--wp--preset--font-size--xl); margin-bottom: 10px; }
.rb-tile p { font-size: var(--wp--preset--font-size--2-sm); margin-bottom: 0; }

/* ==========================================================================
   FAQ  — Optik aus faq-1.html:345, Markup vom Rank-Math-FAQ-Block.
   Aufklappen über <details>/<summary>, ohne JavaScript.
   Das Plus ist reines CSS statt eines Icon-Zeichensatzes.
   ========================================================================== */
.rb-faq .rank-math-list-item { margin-bottom: 16px; transition: box-shadow .4s var(--rb-ease-aus); }
.rb-faq .rank-math-list-item:hover { box-shadow: var(--rb-shadow-card); }

.rb-faq .rank-math-question {
  position: relative;
  margin: 0;
  padding: 20px 56px 20px 22px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-sm);
  background: #fff;
  font-family: var(--wp--preset--font-family--archivo);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 600;
  color: var(--wp--preset--color--heading);
  cursor: pointer;
  list-style: none;
}
.rb-faq .rank-math-question::-webkit-details-marker { display: none; }
.rb-faq .rank-math-question::before,
.rb-faq .rank-math-question::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 14px;
  height: 2px;
  background: var(--wp--preset--color--signal-500);
  transition: transform .3s var(--rb-ease-aus);
}
.rb-faq .rank-math-question::after { transform: translateY(-50%) rotate(90deg); }
.rb-faq .rank-math-question::before { transform: translateY(-50%); }
.rb-faq details[open] > .rank-math-question::after { transform: translateY(-50%) rotate(0deg); }
.rb-faq details[open] > .rank-math-question { border-radius: var(--rb-radius-sm) var(--rb-radius-sm) 0 0; }

.rb-faq .rank-math-answer {
  border: 1px solid var(--rb-line);
  border-top: 0;
  margin-top: -1px;
  border-radius: 0 0 var(--rb-radius-sm) var(--rb-radius-sm);
  padding: 20px 22px;
  background: #fff;
}
.rb-faq .rank-math-answer p { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--2-sm); }
.rb-faq .rank-math-answer > :last-child { margin-bottom: 0; }

/* ==========================================================================
   Beitrag und Archiv
   ========================================================================== */
.rb-meta { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--sm); font-family: var(--wp--preset--font-family--plex-mono); }

.rb-postcard { box-shadow: var(--rb-shadow-card); background: #fff; border-radius: var(--rb-radius-sm); overflow: hidden; height: 100%; }
.rb-postcard .wp-block-post-featured-image img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.rb-postcard .wp-block-post-title { font-size: var(--wp--preset--font-size--xl); margin: 0 0 10px; }
.rb-postcard .wp-block-post-title a { color: var(--wp--preset--color--heading); text-decoration: none; }
.rb-postcard .wp-block-post-title a:hover { color: var(--wp--preset--color--signal-ink); }
.rb-postcard__body { padding: 20px; }

.wp-block-query-pagination { margin-top: 40px; gap: 10px; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-sm);
  text-decoration: none;
  color: var(--wp--preset--color--heading);
}
.wp-block-query-pagination .current {
  background: var(--wp--preset--color--signal-500);
  border-color: var(--wp--preset--color--signal-500);
  color: #fff;
}

/* Sichtbarer Fokus — die Vorlage hat keinen, ohne JS ist Tastaturbedienung Pflicht */
:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--wp--preset--color--signal-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .rb-card, .rb-card::after, .rb-card__media img,
  .rb-faq .rank-math-question::before, .rb-faq .rank-math-question::after { transition: none; }
  .rb-card:hover { transform: none; }
}
