/* ==========================================================================
   Additions for WordPress: subpages, articles, forms. The approved design
   lives unchanged in styles.css.
   ========================================================================== */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
.nav__links a[aria-current]::after { transform: scaleX(1); }
.wp-site-blocks > * { margin: 0; }
:root :where(.is-layout-flow) > .section, :root :where(.is-layout-flow) > * { margin-block: 0; }
main { display: block; }
.hb-page { min-height: 70vh; }
.card__legal { margin-top: 0.4rem; font-size: 0.76rem; line-height: 1.4; color: var(--muted); }
.card__legal a { text-decoration: underline; text-underline-offset: 2px; }
.card__media a, .qcard__media a { display: block; height: 100%; }
.card__name a, .qcard__name a, .rcard h3 a { color: inherit; text-decoration: none; }
.rcard .card__legal { margin-top: 0.6rem; color: #b9c4bc; }
.rcard .btn { position: relative; z-index: 2; }
.service--reverse .service__media { grid-column: 8 / 13; order: 2; }
.service--reverse .service__copy { grid-column: 1 / 7; grid-row: 1; }
.service__gap { height: 2rem; }
.btn[disabled] { pointer-events: none; }

/* ---------- page title ---------- */
.ptitle { padding: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(1.75rem, 3vw, 2.75rem); }
.ptitle h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); letter-spacing: -0.04em; overflow-wrap: anywhere; hyphens: auto; }

/* ---------- page hero ---------- */
.phero { position: relative; display: flex; align-items: flex-end; min-height: min(78svh, 46rem); padding: calc(var(--nav-h) + 4rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.phero__media { position: absolute; inset: 0; }
.phero__media img { width: 100%; height: 100%; object-fit: cover; }
.phero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 15, 12, 0.92) 0%, rgba(10, 15, 12, 0.6) 48%, rgba(10, 15, 12, 0.15) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(10, 15, 12, 0) 45%); }
.phero__in { position: relative; }
.phero .eyebrow { margin-bottom: 1.1rem; }
.phero h1 { max-width: 14ch; font-size: clamp(2.8rem, 6.6vw, 5.8rem); letter-spacing: -0.045em; line-height: 0.98; hyphens: manual; }
.phero__sub { max-width: 36rem; margin-top: 1.5rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: #cfd9d1; }

/* ---------- text content (core blocks) ---------- */
.hb-content > :where(p, h2, h3, h4, ul, ol, blockquote, figure, table, hr, pre, details, dl, .wp-block-group, .wp-block-columns, .wp-block-buttons, .wp-block-table, .wp-block-image):not([class*="wp-block-highbach"]) { width: min(46rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.hb-content > .alignwide { width: min(var(--max), 100% - 2 * var(--gutter)) !important; max-width: none; }
.hb-content > .alignfull { width: 100% !important; max-width: none; }
.hb-content > *:last-child:not([class*="wp-block-highbach"]) { margin-bottom: clamp(4rem, 8vw, 7rem); }
.hb-content > p, .hb-content > ul, .hb-content > ol, .hb-prose > p, .hb-prose > ul, .hb-prose > ol { margin-block: 0 1.15rem; }
.hb-content > p, .hb-content > ul, .hb-content > ol { color: #d8e1d9; font-size: 1.1rem; line-height: 1.7; }
.hb-content > ul, .hb-content > ol, .hb-prose ul, .hb-prose ol { padding-left: 1.4rem; }
.hb-content > ul li, .hb-prose ul li { padding-left: 0.25rem; }
.hb-content > :is(ul, ol) li + li, .hb-prose li + li { margin-top: 0.4rem; }
.hb-content > ul > li::marker, .hb-prose li::marker { color: var(--accent); }
.hb-content > h2:not([class*="__"]) { margin-block: 3rem 1rem; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.08; }
.hb-content > h3:not([class*="__"]) { margin-block: 2.2rem 0.75rem; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; }
.hb-content > h4 { margin-block: 1.75rem 0.5rem; font: 700 1.1rem/1.3 var(--font-body); }
.hb-content > h2:first-child, .hb-content > h3:first-child { margin-top: 0; }
.hb-content > p a, .hb-content > ul a, .hb-content > ol a, .hb-content > h3 a, .hb-prose a, .hb-content .wp-block-group p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hb-content > figure { margin-block: 2.25rem; }
.hb-content > figure img { width: 100%; border-radius: var(--r-card); border: 1px solid var(--line); }
.hb-content figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--muted); }
.hb-content blockquote { padding-left: 1.4rem; border-left: 2px solid var(--accent); font-size: 1.2rem; }
.hb-content .wp-block-table table, .hb-prose table { width: 100%; border-collapse: collapse; }
.hb-content .wp-block-table :is(td, th), .hb-prose :is(td, th) { padding: 0.75rem 0.9rem; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.hb-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }
.hb-prose h3 { margin: 2rem 0 0.7rem; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
.hb-prose > :last-child { margin-bottom: 0; }
.wp-element-button, .wp-block-button__link { font: 700 1rem/1 var(--font-body); }

/* ---------- article ---------- */
.ahead { padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem)); margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.ahead h1 { max-width: 20ch; margin-top: 1.1rem; font-size: clamp(2.3rem, 5.2vw, 4.6rem); letter-spacing: -0.04em; hyphens: auto; }
.ahead__meta { margin-top: 1.2rem; color: var(--muted); }
.ahead__img { margin-top: clamp(1.75rem, 4vw, 3rem); overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--line); aspect-ratio: 21 / 10; }
.ahead__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .ahead__img { aspect-ratio: 4 / 3; } }

/* ---------- article list ---------- */
.parchive { padding-bottom: clamp(4rem, 9vw, 8rem); }
.parchive__grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.pcard { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); transition: border-color 0.3s; }
.pcard:hover { border-color: rgba(49, 172, 107, 0.5); }
.pcard__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__body { padding: 1.25rem 1.35rem 1.5rem; }
.pcard__name { margin-top: 0.4rem; font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.12; hyphens: auto; }
.pcard__name a { text-decoration: none; }
.pcard .card__info { margin-top: 0.75rem; font-size: 1rem; }
@media (max-width: 1000px) { .parchive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .parchive__grid { grid-template-columns: 1fr; } }

.pager { display: flex; justify-content: center; margin-top: clamp(2.5rem, 5vw, 4rem); }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pager :is(a, .current, .dots) { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: var(--r-pill); text-decoration: none; font-weight: 700; }
.pager .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager .dots { border-color: transparent; }
.pager a:hover { border-color: var(--accent); }

/* ---------- contact form ---------- */
.cform__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 3vw, 2.5rem); row-gap: 2.5rem; }
.cform__grid > :first-child { grid-column: 1 / 6; }
.cform__form { grid-column: 7 / 13; }
.cform__text { margin: 1.25rem 0 1.75rem; max-width: 30rem; color: #cfd9d1; font-size: 1.1rem; }
.cform__form p { margin-bottom: 1.1rem; }
.cform label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
.cform :is(input:not([type="checkbox"]), textarea) { width: 100%; min-height: 52px; padding: 0.8rem 1rem; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-input); background: var(--surface); color: var(--text); font: inherit; }
.cform__hp { position: absolute; left: -9999px; }
.cform__check { display: flex; gap: 0.75rem; align-items: flex-start; }
.cform__check input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--accent); flex: none; }
.cform__check label { margin: 0; color: #cfd9d1; }
.cform__check a { text-decoration: underline; }
.cform__msg { padding: 0.9rem 1.1rem; border: 1px solid var(--accent); border-radius: var(--r-input); background: rgba(49, 172, 107, 0.12); }
.cform__msg.is-fehler { border-color: #e0785a; background: rgba(224, 120, 90, 0.12); }
@media (max-width: 900px) { .cform__grid > * , .cform__grid > :first-child { grid-column: 1 / -1; } }

.phero + .section, .phero + .wp-block-highbach-service { padding-top: clamp(3rem, 6vw, 5rem); }
@media (max-width: 767px) {
  .phero { min-height: 70svh; }
  .phero__media::after { background: linear-gradient(0deg, rgba(10, 15, 12, 0.96) 0%, rgba(10, 15, 12, 0.5) 60%, rgba(10, 15, 12, 0.25) 100%); }
  .hero__cta .btn { width: 100%; }
}
