/*
Theme Name: Hotelbewertung Chef – Entwurfsversion 2
Theme URI: https://wordpress.org/
Author: Projektentwurf Hotelbewertung Chef
Description: Schlanke WordPress-Block-Theme-Grundvorlage nach dem lokalen Entwurf.
Version: 0.3.2
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: hotelbewertung-chef
*/

/* Kleine Ergänzungen, die über theme.json hinausgehen. */
.wp-site-blocks { overflow-x: clip; }
a { text-underline-offset: 0.18em; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--wp--preset--color--hb-coral);
  outline-offset: 3px;
}
.wrap { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--wp--preset--color--hb-line); background: var(--wp--preset--color--hb-white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 120px; }
.brand { display: inline-flex; align-items: center; color: var(--wp--preset--color--hb-navy); text-decoration: none; }
.custom-logo { display: block; max-width: min(420px, 100%); height: auto; }
.brand-logo { display: block; width: 420px; height: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 25px; font-size: .92rem; font-weight: 750; }
nav a { color: var(--wp--preset--color--hb-navy); text-decoration: none; }
nav a:hover { color: var(--wp--preset--color--hb-teal); }
nav .active,
nav a[aria-current="page"],
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content { padding-bottom: 5px; border-bottom: 3px solid var(--wp--preset--color--hb-teal); color: var(--wp--preset--color--hb-navy); }
main#main-content { padding-top: 40px; padding-bottom: 60px; }
footer { padding: 30px 0; background: var(--wp--preset--color--hb-white); color: var(--wp--preset--color--hb-navy); font-size: .83rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: 0; }
.footer-inner nav { font-size: .83rem; }
.wp-block-navigation-item__content:hover { color: var(--wp--preset--color--hb-navy); }
.hb-card { border-top: 5px solid var(--wp--preset--color--hb-teal); }
.hb-card:nth-child(2) { border-top-color: var(--wp--preset--color--hb-coral); }
.hb-card:nth-child(3) { border-top-color: var(--wp--preset--color--hb-navy); }

@media (max-width: 781px) {
  .hb-header-inner { padding-top: 16px !important; padding-bottom: 16px !important; }
  .hb-hero { padding-top: 56px !important; padding-bottom: 56px !important; }
  .header-inner, .footer-inner { display: block; }
  header nav, .footer-inner nav { justify-content: flex-start; margin-top: 16px; }
  .brand-logo { width: min(340px, 100%); }
}

/* Volle Abschnittsbreite, begrenzte Lesebreite und robuste Tablet-/Mobilansicht. */
main#main-content.wrap { width: 100%; max-width: none; margin: 0; padding-top: 0; padding-bottom: 0; }
main#main-content > * { max-width: none; }
main#main-content .wrap { width: min(1140px, calc(100% - 40px)); max-width: 1140px; margin-left: auto; margin-right: auto; }

@media (max-width: 900px) {
  .site-header .header-inner, header .header-inner { flex-direction: column; align-items: flex-start; justify-content: center; min-height: auto; padding-top: 24px; padding-bottom: 24px; }
  .site-header nav, header nav { width: 100%; justify-content: flex-start; gap: 12px 20px; }
}

@media (max-width: 600px) {
  main#main-content .wrap { width: min(100% - 32px, 1140px); }
  .brand-logo { width: min(340px, 100%); }
  .site-header nav, header nav { font-size: .88rem; }
}

/* Finaler Breiten-Fix fuer alle Seitentypen - 17.07.2026. */
:root {
  --wp--style--global--content-size: 100%;
  --wp--style--global--wide-size: 100%;
}
html, body { max-width: 100%; overflow-x: hidden; }
.wp-site-blocks, .wp-site-blocks > *, main#main-content > * { max-width: none !important; }
.wrap, main#main-content .wrap, .header-inner, .footer-inner {
  width: calc(100% - 64px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
main#main-content.wrap {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.alignwide, .alignfull { max-width: none !important; }

@media (max-width: 900px) {
  .wrap, main#main-content .wrap, .header-inner, .footer-inner { width: calc(100% - 48px) !important; }
}

@media (max-width: 600px) {
  .wrap, main#main-content .wrap, .header-inner, .footer-inner { width: calc(100% - 32px) !important; }
}

/* Kompakte, inhaltsabhaengige Raster fuer alle Seitentypen. */
.hero-grid, .methodology-grid, .two-col, .example-grid {
  display: grid !important;
  gap: 48px !important;
  align-items: start !important;
}
.hero-grid, .methodology-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr) !important; }
.two-col { grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr) !important; }
.example-grid { grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr) !important; }
.hero-grid > *, .methodology-grid > *, .two-col > *, .example-grid > * {
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin-top: 0 !important;
}
.hero-card, .method-card { margin-top: 0 !important; }

/* Lange Ratgebertexte: Inhaltsuebersicht kompakt oben, Text darunter. */
.reading-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 42px !important;
  align-items: start !important;
}
.reading-layout .sticky {
  position: static !important;
  top: auto !important;
  width: 100% !important;
  padding: 28px 32px !important;
  border-left: 5px solid var(--coral, #f06a4b);
  background: var(--white, #fffefa);
  box-shadow: 0 12px 28px rgba(11, 53, 85, 0.07);
}
.reading-layout .toc {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 0 24px !important;
  margin-top: 24px !important;
}
.reading-layout .toc li { min-width: 0; }
.article-copy {
  width: 100% !important;
  max-width: min(1050px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Vorhandene Abschnittsmotive als breite Bildbaender statt kleiner Floats. */
.example-section > .inline-guide-visual {
  float: none !important;
  display: block !important;
  width: calc(100% - 64px) !important;
  max-width: none !important;
  height: clamp(160px, 14vw, 190px) !important;
  margin: 0 auto 34px !important;
  border-bottom: 5px solid var(--coral, #f06a4b);
  object-fit: cover !important;
  object-position: center !important;
}

/* Zwei oder drei Karten fuellen die verfuegbare Breite ohne Leerspalte. */
.related-grid, .guide-grid, .rule-grid, .criteria-grid, .compact-cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

@media (max-width: 900px) {
  .hero-grid, .methodology-grid, .two-col, .example-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .reading-layout { gap: 32px !important; }
  .reading-layout .sticky { padding: 24px !important; }
  .reading-layout .toc { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .example-section > .inline-guide-visual {
    width: calc(100% - 48px) !important;
    height: 165px !important;
    margin-bottom: 28px !important;
  }
  .hero-card, .method-card { margin-top: 0 !important; }
}

@media (max-width: 600px) {
  .hero-grid, .methodology-grid, .reading-layout, .two-col, .example-grid { gap: 24px !important; }
  .reading-layout .sticky { padding: 22px 20px !important; }
  .reading-layout .toc { grid-template-columns: 1fr !important; }
  .example-section > .inline-guide-visual {
    width: calc(100% - 32px) !important;
    height: 145px !important;
    margin-bottom: 24px !important;
  }
  .related-grid, .guide-grid, .rule-grid, .criteria-grid, .compact-cards {
    grid-template-columns: 1fr !important;
  }
}


/* Mobiler Theme-Header: Bildzeichen und Hauptnavigation in einer Zeile. */
.site-header .brand { background-image: none !important; min-height: 0 !important; }
.brand-mark { display: none; }
.brand-wordmark { display: block; width: 420px; max-width: 100%; height: auto; }
@media (max-width: 600px) {
  .site-header .header-inner,
  header .header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    min-height: 60px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  .site-header .brand { flex: 0 0 43px; width: 43px; }
  .brand-wordmark { display: none !important; }
  .brand-mark { display: block; width: 43px; height: 43px; }
  .site-header nav,
  header nav {
    flex: 1 1 auto;
    width: auto !important;
    margin-top: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    font-size: .78rem !important;
  }
  .site-header nav a { white-space: nowrap; }
  .site-header nav .active { padding-bottom: 3px; border-bottom-width: 2px; }
}

/* Mobiler Theme-Header: Bildzeichen und Hauptnavigation in einer Zeile. */
.site-header .brand { background-image: none !important; min-height: 0 !important; }
.brand-mark { display: none; }
.brand-wordmark { display: block; width: 420px; max-width: 100%; height: auto; }
@media (max-width: 600px) {
  .site-header .header-inner,
  header .header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    min-height: 60px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  .site-header .brand { flex: 0 0 43px; width: 43px; }
  .brand-wordmark { display: none !important; }
  .brand-mark { display: block; width: 43px; height: 43px; }
  .site-header nav,
  header nav {
    flex: 1 1 auto;
    width: auto !important;
    margin-top: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    font-size: .78rem !important;
  }
  .site-header nav a { white-space: nowrap; }
  .site-header nav .active { padding-bottom: 3px; border-bottom-width: 2px; }
}


/* Theme-Regeln mit Vorrang vor dem zentralen Designsystem. */
.site-header .brand-mark { display: none !important; }
.site-header .brand-wordmark { display: block !important; }
@media (max-width: 600px) {
  .site-header .brand-mark { display: block !important; }
  .site-header .brand-wordmark { display: none !important; }
}
