/*
Theme Name: flexinno
Theme URI: https://www.flexinno.at
Author: Hubert Kaufmann
Description: Schlankes Block Theme für flexinno Systemmöbel. Arbeitet mit dem Plugin flexinno Core zusammen.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 7.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flexinno
*/

/* ---------- Basis ---------- */
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .wp-block-heading { font-stretch: 112%; text-wrap: balance; }
h1 { font-stretch: 118%; }
h3, h4 { text-transform: none; font-stretch: 104%; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--wp--preset--color--blau); outline-offset: 2px; }
.wp-element-button, .wp-block-button__link { display: inline-flex; align-items: center; gap: .6em; min-height: 52px; box-sizing: border-box; font-stretch: 110%; }
.wp-block-button__link::after { content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: currentColor; border: 2px solid currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--tinte); color: #fff; border-color: var(--wp--preset--color--tinte); }
.fx-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.is-style-abschnitt-dunkel .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--tinte); border-color: #fff; }
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: #E2A900; }

/* ---------- Abschnitte (Block Stile für Gruppen) ---------- */
.wp-site-blocks > main, .fx-main { margin-block-start: 0; }
.fx-main > .wp-block-post-content > *, .fx-main > * { margin-block-start: 0; margin-block-end: 0; }
.is-style-abschnitt, .is-style-abschnitt-stein, .is-style-abschnitt-dunkel {
  padding-top: clamp(56px, 7vw, 112px); padding-bottom: clamp(56px, 7vw, 112px); }
.is-style-abschnitt-stein { background: var(--wp--preset--color--stein); }
.is-style-abschnitt-dunkel { background: var(--wp--preset--color--tinte); color: #fff; }
.is-style-abschnitt-dunkel :where(h1,h2,h3,h4,a:not(.wp-element-button)) { color: #fff; }
.is-style-abschnitt-dunkel p { color: #D6D3CD; }
.is-style-abschnitt > * + *, .is-style-abschnitt-stein > * + *, .is-style-abschnitt-dunkel > * + * { margin-block-start: clamp(28px, 3vw, 48px); }
.fx-hero { padding-top: clamp(32px, 4vw, 64px) !important; }
.is-style-karte { background: #fff; border: 1px solid var(--wp--preset--color--linie); padding: 24px; }
.is-style-karte > * { margin-block: 0; }
.is-style-karte > * + * { margin-block-start: 8px; }
.is-style-karte h3 { font-size: 18px; display: flex; gap: 10px; align-items: flex-start; }
.is-style-karte h3::before { content: ""; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; background: var(--wp--preset--color--gelb);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat; background-color: var(--wp--preset--color--tinte); }
.is-style-karte p { font-size: 15px; line-height: 1.55; color: var(--wp--preset--color--grau); }
.is-style-gelb { background: var(--wp--preset--color--gelb); padding: 28px; }
.is-style-gelb > * { margin-block: 0; } .is-style-gelb > * + * { margin-block-start: 12px; }

/* ---------- Absatz Stile ---------- */
p.is-style-dachzeile { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--wp--preset--font-family--archivo);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-stretch: 110%; color: var(--wp--preset--color--grau); }
p.is-style-dachzeile::before { content: ""; flex-shrink: 0; width: 31px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'%3E%3Cpath d='M0 0h3l4 5-4 5H0l4-5z' fill='%23F5B800'/%3E%3Cpath d='M8 0h3l4 5-4 5H8l4-5z' fill='%23F5B800'/%3E%3Cpath d='M16 0h3l4 5-4 5h-3l4-5z' fill='%231F8FD0'/%3E%3C/svg%3E") center/contain no-repeat; }
.is-style-abschnitt-dunkel p.is-style-dachzeile { color: #D6D3CD; }
p.is-style-einleitung { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: inherit; max-width: 640px; }
p.fx-nummer { font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 44px; line-height: 1; font-stretch: 115%; margin: 0; }
p.fx-klein { font-size: 14px; color: var(--wp--preset--color--grau); }
.fx-schritte > .wp-block-group { border-top: 2px solid var(--wp--preset--color--tinte); padding-top: 18px; }
.fx-schritte > .wp-block-group > * { margin-block: 0; } .fx-schritte > .wp-block-group > * + * { margin-block-start: 10px; }
.fx-schritte h3 { font-size: 19px; }
.fx-schritte p:not(.fx-nummer) { font-size: 15px; color: var(--wp--preset--color--grau); }

/* ---------- Listen ---------- */
ul.is-style-haken { list-style: none; padding-left: 0; }
ul.is-style-haken li { position: relative; padding-left: 32px; margin-bottom: 12px; }
ul.is-style-haken li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat; }
ul.is-style-kreuz { list-style: none; padding-left: 0; color: var(--wp--preset--color--grau); }
ul.is-style-kreuz li { position: relative; padding-left: 32px; margin-bottom: 12px; }
ul.is-style-kreuz li::before { content: "×"; position: absolute; left: 4px; top: -3px; font-size: 22px; color: #8C877F; }

/* ---------- Bilder, Tabellen, FAQ ---------- */
.wp-block-image img { display: block; }
.wp-block-image figcaption { font-size: 14px; color: var(--wp--preset--color--grau); margin-top: 10px; text-align: left; }
.wp-block-table { background: #fff; color: var(--wp--preset--color--tinte); border: 1px solid var(--wp--preset--color--linie); overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--linie); padding: 14px 16px; text-align: left; white-space: nowrap; }
.wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--tinte); }
.wp-block-table thead th { font-family: var(--wp--preset--font-family--archivo); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--grau); }
.wp-block-table td:first-child { font-weight: 600; }
.wp-block-details { border-top: 1px solid var(--wp--preset--color--linie); padding: 4px 0; }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--wp--preset--color--linie); }
.wp-block-details summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font-size: 18px; font-weight: 600; list-style: none; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details > p { margin: 0 0 20px; color: var(--wp--preset--color--grau); max-width: 760px; }

/* ---------- Kopf und Fuß ---------- */
.fx-topbar { background: var(--wp--preset--color--tinte); color: #fff; font-size: 13px; padding-top: 8px; padding-bottom: 8px; }
.fx-topbar p { margin: 0; color: #fff; }
.fx-topbar a { color: #fff; text-decoration: none; }
.fx-topbar a:hover { text-decoration: underline; }
.fx-topbar .fx-tick::before { content: "✓ "; color: var(--wp--preset--color--gelb); font-weight: 700; }
.fx-header { border-bottom: 1px solid var(--wp--preset--color--linie); padding-top: 14px; padding-bottom: 14px; background: #fff; }
.fx-header .wp-block-site-logo img { height: 26px; width: auto; }
.fx-header .wp-block-navigation { font-size: 15px; font-weight: 500; gap: 4px 28px; }
.fx-header .wp-block-navigation-item__content { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.fx-header .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--gelb); }
.fx-header .wp-block-button__link { min-height: 46px; font-size: 13px; padding: 0 18px; }
.fx-header .wp-block-button__link::after { display: none; }
.fx-footer { background: var(--wp--preset--color--tinte); color: #fff; padding-top: clamp(56px, 7vw, 96px); padding-bottom: 32px; }
.fx-footer p, .fx-footer li { color: #D6D3CD; font-size: 15px; }
.fx-footer a { color: #D6D3CD; text-decoration: none; } .fx-footer a:hover { color: #fff; text-decoration: underline; }
.fx-footer h2 { font-size: 13px; letter-spacing: .14em; color: var(--wp--preset--color--gelb); margin-bottom: 8px; }
.fx-footer ul { list-style: none; padding: 0; margin: 0; } .fx-footer li { margin: 0 0 8px; }
.fx-footer .fx-footer-bottom { border-top: 1px solid rgba(255,255,255,.16); padding-top: 24px; font-size: 13px; }
.fx-footer .fx-footer-bottom p { font-size: 13px; color: #B5B1AA; margin: 0; }
.fx-mobile-cta { display: none; }
@media (max-width: 720px) {
  .fx-mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--wp--preset--color--linie); }
  .fx-mobile-cta a { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; text-decoration: none; font-family: var(--wp--preset--font-family--archivo); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
  .fx-mobile-cta .fx-call { width: 52px; border: 2px solid var(--wp--preset--color--tinte); color: var(--wp--preset--color--tinte); }
  .fx-mobile-cta .fx-go { flex: 1; background: var(--wp--preset--color--gelb); color: var(--wp--preset--color--tinte); }
  body { padding-bottom: 76px; }
}

/* Abstände: Überschriften und Absätze in Spalten und Gruppen */
.wp-block-column > * + *, .is-style-abschnitt > .wp-block-columns + *, .wp-block-group > .wp-block-heading + p { margin-block-start: 16px; }
.wp-block-column > .wp-block-buttons, .wp-block-column > .wp-block-table, .wp-block-column > .wp-block-image + .wp-block-heading { margin-block-start: 24px; }
.fx-main .fx-hero .wp-block-buttons { margin-block-start: 28px; }

.fx-hero > p.fx-klein { margin-bottom: 8px; }
.fx-hero p.fx-klein a { color: inherit; }
.wp-site-blocks > footer, .wp-site-blocks > header, .wp-site-blocks > main { margin-block-start: 0; }
.fx-footer h2:not(:first-child) { margin-top: 28px; }
@media (max-width: 720px) {
  .fx-header .wp-block-buttons { display: none; }
  .fx-topbar .wp-block-group > p:first-child { display: none; }
}

/* Lange Wörter in großen Überschriften: deutsche Silbentrennung statt Umbruch mitten im Wort */
h1, h2, .wp-block-heading, .fx-card-title {
  overflow-wrap: normal; word-break: normal;
  -webkit-hyphens: auto; hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
  -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4;
}
.wp-block-column h1, .fx-split h1 { font-size: clamp(34px, 4.2vw, 64px); font-stretch: 108%; }
.wp-block-column h2 { font-stretch: 106%; }
.wp-block-video video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; display: block; }
