/*
Theme Name: ITOnova
Theme URI: https://www.itonova.de
Author: ITOnova
Description: Block-Theme für itonova.de im ITOnova-Design. Texte, Bilder und Abschnitte lassen sich direkt im Editor ändern.
Version: 1.1.16
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: itonova
*/

:root { --ito-radius: 10px; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--wp--preset--color--sky); outline-offset: 3px; border-radius: 4px; }

/* Überzeile im Stil der Logo-Unterzeile */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

/* Hinweis-Banner (oben gehaltener Beitrag, siehe inc/hinweis.php) */
.ito-hinweis { background: var(--wp--preset--color--accent); color: #fff; font-size: .95rem; }
.ito-hinweis p { margin: 0 auto; max-width: 1160px; padding: .6rem var(--wp--style--root--padding-right, 1.2rem) .6rem var(--wp--style--root--padding-left, 1.2rem); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3rem 1rem; text-align: center; }
.ito-hinweis-text { font-weight: 600; }
.ito-hinweis-text::before { content: "⚠ "; font-weight: 400; }
.ito-hinweis-link { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; padding: .1rem .8rem; }
.ito-hinweis-link:hover, .ito-hinweis-link:focus-visible { background: #fff; color: var(--wp--preset--color--accent); }
/* Alarm-Darstellung (Standard): roter Streifen mit Rundumleuchte statt Dreieck */
.ito-hinweis.ist-alarm { background: #B3121B; }
.ito-hinweis.ist-alarm .ito-hinweis-text { display: inline-flex; align-items: center; gap: .55rem; }
.ito-hinweis.ist-alarm .ito-hinweis-text::before { content: none; }
.ito-hinweis.ist-alarm .ito-hinweis-link:hover, .ito-hinweis.ist-alarm .ito-hinweis-link:focus-visible { color: #B3121B; }
.ito-lampe { width: 1.9em; height: 1.9em; flex: none; overflow: visible; }
.ito-lampe-strahl { transform-box: view-box; transform-origin: 16px 15px; animation: ito-lampe-drehen 1.4s linear infinite; }
.ito-lampe-schein { transform-box: view-box; transform-origin: 16px 14px; animation: ito-lampe-pulsieren 1.4s ease-in-out infinite; }
@keyframes ito-lampe-drehen { to { transform: rotate(360deg); } }
@keyframes ito-lampe-pulsieren { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: .9; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .ito-lampe-strahl, .ito-lampe-schein { animation: none; } }

/* Kopfzeile */
.ito-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .ito-header { top: var(--wp-admin--admin-bar--height, 32px); }
.ito-header .ito-logo { margin: 0; }
.ito-header .ito-logo img { height: 40px; width: auto; display: block; }
.ito-header .wp-block-navigation a { color: var(--wp--preset--color--muted); text-decoration: none; }
.ito-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }
@media (max-width: 600px) {
	.ito-header .ito-logo img { height: 30px; }
	.ito-header .ito-kundenknopf { display: none; }
}

/* Knopf-Stile */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--line); background: transparent;
	color: var(--wp--preset--color--accent);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--accent); }
.wp-block-button.is-style-hell > .wp-block-button__link { background: #fff; color: var(--wp--preset--color--accent); }
.wp-block-button.is-style-hell > .wp-block-button__link:hover { background: var(--wp--preset--color--accent-soft); }
.wp-block-button.is-style-umriss-hell > .wp-block-button__link { background: transparent; border: 2px solid rgba(255, 255, 255, .6); color: #fff; }
.wp-block-button.is-style-umriss-hell > .wp-block-button__link:hover { border-color: #fff; }

/* Startbereich */
.ito-hero .wp-block-cover__inner-container { width: 100%; }
.ito-hero .is-style-eyebrow { color: var(--wp--preset--color--sky); }
.ito-hero h1 { color: #fff; }
.ito-hero .ito-lead { color: #D6E6F4; max-width: 34em; }

/* Kundenbereich-Kasten */
.ito-panel {
	background: #fff; color: var(--wp--preset--color--ink);
	border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.ito-panel .is-style-eyebrow { color: var(--wp--preset--color--muted); }
.ito-port {
	position: relative; border-top: 1px solid var(--wp--preset--color--line);
	padding: .85rem .6rem; margin-inline: -.6rem; border-radius: 8px; transition: background-color .15s;
}
/* Ganze Zeile klickbar: der Link spannt sich über die ganze Zeile */
.ito-port a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ito-port:hover { background: #EEF4FA; }
.ito-port:hover + .ito-port, .ito-port:hover { border-top-color: transparent; }
.ito-port:has(a:focus-visible) { outline: 3px solid var(--wp--preset--color--sky); outline-offset: 0; }
.ito-port a:focus-visible { outline: 0; }
.ito-port:first-of-type { border-top: 0; }
.ito-port p { margin: 0; }
.ito-port-title { font-weight: 700; display: flex; align-items: center; gap: .7rem; }
.ito-port-title::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #2E9E5B; box-shadow: 0 0 0 3px rgba(46, 158, 91, .2); }
.ito-port-sub { color: var(--wp--preset--color--muted); font-size: .88rem; padding-left: 1.3rem; }
.ito-port a { font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--wp--preset--color--accent); }

/* Partner-Leiste */
.ito-trust { border-bottom: 1px solid var(--wp--preset--color--line); font-size: .92rem; color: var(--wp--preset--color--muted); }
.ito-trust p { margin: 0; }
.ito-trust strong { color: var(--wp--preset--color--accent); }
.ito-trust .ito-trust-link { color: inherit; text-decoration: none; }
.ito-trust .ito-trust-link span { color: var(--wp--preset--color--accent); font-weight: 700; display: inline-block; transition: transform .15s ease; }
.ito-trust .ito-trust-link:hover, .ito-trust .ito-trust-link:focus-visible { color: var(--wp--preset--color--accent); text-decoration: underline; text-underline-offset: 3px; }
.ito-trust .ito-trust-link:hover span { transform: translateX(3px); }

/* Karten */
.ito-card {
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ito-radius);
	transition: border-color .2s, transform .2s;
}
.ito-card:hover { border-color: var(--wp--preset--color--accent); transform: translateY(-2px); }
.ito-card p { color: var(--wp--preset--color--muted); }
.ito-card .is-style-eyebrow { font-size: .72rem; letter-spacing: .18em; }
.ito-card .ito-more { margin-top: auto; font-weight: 700; font-size: .92rem; }
.ito-card .ito-more a { text-decoration: none; color: var(--wp--preset--color--accent); }
.ito-card.is-feature { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); }
.ito-card.is-feature h3, .ito-card.is-feature .ito-more a { color: #fff; }
.ito-card.is-feature p { color: #D3E3F2; }
.ito-card.is-feature .is-style-eyebrow { color: var(--wp--preset--color--sky); }
.ito-grid > .ito-card { display: flex; flex-direction: column; }

/* Angebotsleiste */
.ito-offer { background: var(--wp--preset--color--accent-soft); border-radius: var(--ito-radius); }
.ito-offer p { color: var(--wp--preset--color--muted); margin: 0; }
.ito-offer h3 { margin: 0; }
.ito-badge {
	font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase;
	background: var(--wp--preset--color--accent); color: #fff !important; padding: .4rem .7rem; border-radius: 6px; white-space: nowrap;
}

/* Ablauf */
.ito-step { border-top: 3px solid var(--wp--preset--color--accent); padding-top: 1.1rem; }
.ito-step p { color: var(--wp--preset--color--muted); }

/* Beitrags-Karten */
.ito-posts .wp-block-post { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ito-radius); overflow: hidden; display: flex; flex-direction: column; }
.ito-posts .wp-block-post-featured-image { margin: 0; }
.ito-posts .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.ito-posts .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.ito-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.ito-posts .ito-post-body { padding: 1.1rem 1.2rem 1.3rem; }
.ito-posts .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: .95rem; }
.ito-noimg { aspect-ratio: 16/9; background: #0B3C66 var(--ito-berge) center/cover; }

/* Kontaktbereich */
.ito-contact .is-style-eyebrow { color: var(--wp--preset--color--sky); }
.ito-contact p { color: var(--wp--preset--color--deep-muted); }
.ito-contact h2, .ito-contact strong { color: var(--wp--preset--color--deep-ink); }
.ito-contact .ito-direct p { color: var(--wp--preset--color--deep-ink); margin: 0; }
.ito-contact .ito-direct a { color: var(--wp--preset--color--deep-ink); }
.ito-avatar img { border-radius: 50%; border: 2px solid var(--wp--preset--color--sky); }

/* Fußzeile */
.ito-footer { font-size: .9rem; color: var(--wp--preset--color--deep-muted); border-top: 1px solid rgba(234, 242, 250, .12); }
.ito-footer p { margin: 0; }
.ito-footer a { color: var(--wp--preset--color--deep-ink); }
.ito-footer .ito-logo img { height: 30px; width: auto; display: block; }

/* Unterseiten-Kopf */
.ito-pagehead { background: var(--wp--preset--color--deep); color: #fff; }
.ito-pagehead h1 { color: #fff; }
.ito-pagehead .is-style-eyebrow { color: var(--wp--preset--color--sky); }
.ito-pagehead p { color: var(--wp--preset--color--deep-muted); }

/* Beitrag */
.ito-article .wp-block-post-content img { border-radius: var(--ito-radius); }

/* Notrufzeile über der Kopfzeile */
.ito-notruf { background: var(--wp--preset--color--deep); color: var(--wp--preset--color--deep-muted); font-size: .85rem; }
.ito-notruf p { margin: 0 auto; padding-block: .35rem; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .3rem 1.1rem; }
.ito-notruf a { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ito-notruf a:hover { text-decoration: underline; }
.ito-notruf-tel::before { content: "☎ "; font-weight: 400; }
.ito-chat-oeffnen { border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: .1rem .7rem; }
@media (max-width: 600px) {
	.ito-notruf p { justify-content: space-between; }
	.ito-notruf-frage { display: none; }
}

/* Pauschale statt Stundensatz */
.ito-flatrate-text { max-width: 44em; color: var(--wp--preset--color--muted); font-size: 1.08rem; }
.ito-flatrate-bilder h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.ito-flatrate-bilder img { width: 100%; height: auto; display: block; }
.ito-motto {
	font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem);
	color: var(--wp--preset--color--accent); margin-top: var(--wp--preset--spacing--40);
}
.ito-checks { list-style: none; padding-left: 0; display: grid; gap: .45rem; }
.ito-checks li { padding-left: 1.7rem; position: relative; }
.ito-checks li::before { content: "✓"; position: absolute; left: 0; color: #2E9E5B; font-weight: 700; }
.ito-preis { max-width: 46em; background: #fff; border: 1px solid var(--wp--preset--color--line); border-left: 4px solid var(--wp--preset--color--accent); border-radius: var(--ito-radius); padding: 1rem 1.2rem; color: var(--wp--preset--color--muted); }
.ito-preis strong { color: var(--wp--preset--color--ink, inherit); }
.ito-umfang .ito-info { height: 100%; }
.ito-umfang .ito-info h3 { margin-bottom: .9rem; }
.ito-punkte { list-style: none; padding-left: 0; display: grid; gap: .45rem; }
.ito-punkte li { padding-left: 1.7rem; position: relative; }
.ito-punkte li::before { content: "–"; position: absolute; left: .2rem; color: var(--wp--preset--color--muted); font-weight: 700; }
main > .wp-block-post-content .ito-faq, .entry-content > .ito-faq { margin-top: 1rem; }
.ito-flatrate .ito-more a, .ito-reach .ito-more a { font-weight: 700; text-decoration: none; color: var(--wp--preset--color--accent); }

/* Erreichbarkeit */
.ito-info { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ito-radius); }
.ito-info h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.ito-info p { color: var(--wp--preset--color--muted); margin: 0; }

/* Häufige Fragen */
.ito-faq .wp-block-details { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ito-radius); padding: .9rem 1.2rem; margin: 0; }
.ito-faq .wp-block-details summary { font-weight: 700; cursor: pointer; }
.ito-faq .wp-block-details[open] summary { color: var(--wp--preset--color--accent); margin-bottom: .5rem; }
.ito-faq .wp-block-details p { color: var(--wp--preset--color--muted); margin: 0; }

/* Kundenstimmen */
.ito-stimme { background: #fff; border: 1px solid var(--wp--preset--color--line); border-left: 4px solid var(--wp--preset--color--accent); border-radius: var(--ito-radius); padding: 1.3rem 1.4rem; margin: 0; }
.ito-stimme p { font-size: 1.05rem; }
.ito-stimme cite { color: var(--wp--preset--color--muted); font-style: normal; font-size: .9rem; }

/* Werdegang auf „Über uns“ */
.ito-werdegang { border-left: 3px solid var(--wp--preset--color--line); padding-left: 1.2rem; }
.ito-werdegang li { margin-bottom: .5rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Abschnitte ohne Lücken aneinanderreihen */
.wp-site-blocks > * { margin-block-start: 0; }
.ito-landing > .alignfull, .ito-landing > .alignfull + * { margin-block-start: 0; }

/* Beitragsbild im einzelnen Beitrag: höchstens 360px hoch, Seitenverhältnis bleibt, nichts wird abgeschnitten. */
.ito-article .wp-block-post-featured-image { text-align: center; }
.ito-article .wp-block-post-featured-image img { width: auto; max-width: 100%; max-height: 360px; height: auto; object-fit: contain; margin-inline: auto; }

/* Eigener Chat-Knopf: 3CX wird erst nach Klick geladen (keine Cookies, kein Browserspeicher vorher). */
.ito-chat-knopf {
	position: fixed; right: 20px; bottom: 20px; z-index: 9999;
	width: 60px; height: 60px; border: 0; border-radius: 50%; padding: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--accent, #004B87); color: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, .2), 0 6px 20px rgba(0, 0, 0, .19);
	transition: transform .15s ease;
}
.ito-chat-knopf:hover { transform: scale(1.06); }
.ito-chat-knopf:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--wp--preset--color--accent, #004B87); }
.ito-chat-knopf.ist-ladend { opacity: .6; cursor: progress; }
@media (max-width: 600px) {
	.ito-chat-knopf { right: 12px; bottom: 12px; width: 52px; height: 52px; transition: transform .15s ease, opacity .2s ease, visibility .2s; }
	.ito-ganz-oben .ito-chat-knopf:not(.ist-ladend) { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Am Handy weniger Leerraum zwischen den Abschnitten */
@media (max-width: 600px) {
	:root:root { --wp--preset--spacing--60: 1.75rem; --wp--preset--spacing--50: 1.25rem; }
	.ito-landing > * { margin-block-start: 0; }
}
