/*
Theme Name: MPH GmbH
Theme URI: https://www.mphgmbh.de
Author: MPH GmbH
Description: Website der MPH GmbH – dunkles Design mit roten Akzenten (übernommen aus dem IONOS-Baukasten). Block-Theme, funktioniert mit WooCommerce.
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: mph
*/

/* ---------- Grundlagen ---------- */
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .15em; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group { margin-top: 0; }

/* ---------- Kopfzeile ---------- */
.mph-kopf { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--wp--preset--color--linie); }
.admin-bar .mph-kopf { top: 32px; }
@media (max-width: 782px) { .admin-bar .mph-kopf { top: 46px; } }
.mph-kopf .wp-block-site-logo img { max-height: 54px; width: auto; }
.mph-kopf .wp-block-navigation { gap: .15rem; }
.mph-kopf .wp-block-navigation .wp-block-navigation-item__content { padding: .45em .75em; white-space: nowrap; border-radius: 999px; transition: background .15s; }
.mph-kopf .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.mph-kopf .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] { background: var(--wp--preset--color--rot); color: #fff; }
.mph-kopf .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--rot-hell); }
.mph-kopf .wp-block-navigation__submenu-container { background: var(--wp--preset--color--dunkel) !important; border: 1px solid var(--wp--preset--color--linie) !important; border-radius: 8px; padding: .3em 0; }
.mph-kopf .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--schwarz) !important; color: #fff !important; }
.mph-kopf .wc-block-mini-cart__button, .mph-kopf .wc-block-customer-account a { color: #fff; }

/* ---------- Bereiche ---------- */
.mph-bereich { padding-block: clamp(3rem, 7vw, 6rem); padding-inline: var(--wp--style--root--padding-left, 1.5rem); }
.mph-hero { padding-block: clamp(3rem, 8vw, 7rem); }
.mph-rot, .mph-rot a { color: var(--wp--preset--color--rot-hell) !important; }
.mph-klein { font-size: .95rem; opacity: .9; }

/* Bild mit rotem, versetztem Rahmen (wie im Baukasten) */
.mph-rahmen { position: relative; margin: 0 1.25rem 1.25rem 0 !important; }
.mph-rahmen::after { content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; border: 0; background: var(--wp--preset--color--rot); z-index: -1; }
.mph-rahmen img { display: block; position: relative; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.mph-hero .wp-block-columns { isolation: isolate; }

/* Kennzahlen */
.mph-zahlen .wp-block-columns { border-top: 1px solid var(--wp--preset--color--linie); padding-top: 2.5rem; margin-bottom: 2.5rem; }
.mph-zahlen .wp-block-columns:last-child { margin-bottom: 0; }
.mph-zahl { font-family: var(--wp--preset--font-family--rubik); font-weight: 600; color: var(--wp--preset--color--rot-hell); line-height: 1; margin: 0; }
.mph-zahl.gross { font-size: clamp(4.5rem, 11vw, 8.5rem); }
.mph-zahl.mittel { font-size: clamp(2rem, 4vw, 3rem); }

/* Kleines rotes Etikett */
.mph-etikett { display: inline-block; background: var(--wp--preset--color--rot); color: #fff; font-size: .85rem; font-weight: 600; padding: .3em .8em; border-radius: 4px; margin-bottom: .6rem !important; }

/* Bildkarten */
.mph-karte .wp-block-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.mph-karte h3 { margin-top: 1.4rem; }

/* Wertekarten */
.mph-werte .wp-block-column { background: var(--wp--preset--color--dunkel); border-top: 4px solid var(--wp--preset--color--rot); padding: 2rem 1.6rem; border-radius: 6px; }

/* Cover-Text */
.wp-block-cover .mph-etikett { margin-inline: auto; }

/* ---------- Kontaktformular ---------- */
.mph-form { display: grid; gap: 1.1rem; }
.mph-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.mph-form input[type=text], .mph-form input[type=email], .mph-form input[type=tel], .mph-form textarea {
  width: 100%; background: transparent; color: inherit; border: 0; border-bottom: 2px solid var(--wp--preset--color--rot); padding: .55rem .1rem; font: inherit; }
.mph-form input:focus, .mph-form textarea:focus { outline: none; border-bottom-color: #fff; }
.mph-form textarea { min-height: 7rem; resize: vertical; }
.mph-form .mph-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .mph-form .mph-zeile { grid-template-columns: 1fr; } }
.mph-form .mph-einwilligung { display: flex; gap: .7rem; align-items: flex-start; font-size: .85rem; font-weight: 400; }
.mph-form .mph-einwilligung input { margin-top: .25rem; accent-color: var(--wp--preset--color--rot); }
.mph-form button { background: var(--wp--preset--color--rot); color: #fff; border: 0; border-radius: 4px; padding: .8rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer; }
.mph-form button:hover { background: var(--wp--preset--color--rot-hell); }
.mph-form .mph-hp { position: absolute; left: -9999px; }
.mph-meldung { padding: .9rem 1.1rem; border-radius: 4px; margin-bottom: 1rem; }
.mph-meldung.ok { background: #1f3d2a; color: #d4f5df; }
.mph-meldung.fehler { background: #4a1414; color: #ffd6d6; }
.mph-hinweis { font-size: .8rem; opacity: .75; margin: 0; }

/* ---------- Fußzeile ---------- */
.mph-fuss { border-top: 1px solid var(--wp--preset--color--linie); font-size: .9rem; }
.mph-fuss a { color: var(--wp--preset--color--rot-hell); }

/* ---------- Rechtstexte ---------- */
.mph-recht h2 { margin-top: 2.5rem; }
.mph-recht h3 { margin-top: 1.8rem; font-size: 1.15rem; }

/* WooCommerce auf dunklem Grund */
.woocommerce .wc-block-components-product-price, .wc-block-grid__product-price { color: #fff; }
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-blocks-components-select select { background: #fff !important; color: #151515 !important; }
.mph-mitte { text-align: center; }

/* Bild/Text-Reihen (Produkte & Services) */
.mph-mt + .mph-mt { margin-top: clamp(2rem, 5vw, 4rem); }
.mph-mt .wp-block-media-text__media img { aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; }
@media (max-width: 600px) { .mph-mt .wp-block-media-text__content { padding: 1.5rem 0 0; } }

/* Auswahlfelder im Formular */
.mph-form select { width: 100%; background: var(--wp--preset--color--dunkel); color: inherit; border: 0; border-bottom: 2px solid var(--wp--preset--color--rot); padding: .55rem .3rem; font: inherit; }

/* Metallverarbeitung */
.mph-quadrat img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.mph-rot-flaeche { color: #fff; }
.mph-rot-flaeche + .mph-kontaktbereich, .mph-rot-flaeche + * { margin-top: 0; }
.mph-balken { margin-top: 1.6rem; }
.mph-balken p { display: flex; justify-content: space-between; margin: 1rem 0 .35rem; font-weight: 600; font-size: .95rem; }
.mph-balken div { height: 8px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
.mph-balken i { display: block; height: 100%; background: var(--wp--preset--color--rot); }
.mph-schmal > * { max-width: 860px; }
.wp-block-group.mph-schmal { --wp--style--global--content-size: 860px; }
/* Etikett bündig mit dem Inhalt (nicht am Rand) */
.is-layout-constrained > .mph-etikett:not(.mph-mitte) { margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important; margin-right: auto !important; }
