/*
Theme Name: orgteam
Theme URI: https://orgteam-erfurt.de/
Author: Org-Team Datensysteme GmbH
Author URI: https://orgteam-erfurt.de/
Description: Schlankes Block-Theme für orgteam Datensysteme GmbH, Erfurt. Ohne Page-Builder, vollständig im Website-Editor bearbeitbar und für die KI-gestützte Pflege (MCP Adapter) ausgelegt.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orgteam
*/

/* Ergänzende Stile – Farben, Schriften und Abstände stehen in theme.json. */

.ot-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.5rem;
}

.ot-card {
	background: var(--wp--preset--color--base);
	border-radius: 18px;
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.ot-card h3 {
	margin-top: 0;
}

.ot-card--plain {
	box-shadow: none;
	border: 1px solid var(--wp--preset--color--line);
}

.ot-number {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	color: var(--wp--preset--color--accent);
	line-height: 1;
	margin-bottom: 0.75rem;
}

.ot-hotline a {
	text-decoration: none;
	font-weight: 600;
}

.ot-muted {
	color: var(--wp--preset--color--muted);
}

.ot-header {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	background: rgba(255, 255, 255, 0.82);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Milchglas-Effekt bei geöffnetem Handy-Menü abschalten: backdrop-filter würde das Vollbild-Menü
   (position: fixed) sonst auf die Höhe des Kopfbereichs begrenzen */
.has-modal-open .ot-header {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	background: var(--wp--preset--color--base);
}

.admin-bar .ot-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ot-header {
		top: 46px;
	}
}

.ot-logo {
	margin: 0;
	flex-shrink: 0;
}

.ot-logo img {
	display: block;
	height: auto;
}

/* Apfel-Animation (assets/js/logo-animation.js). Lage und Größe passen zum Ausschnitt in bin/make-logo-animation.swift */
.ot-logo a {
	position: relative;
	display: block;
}

.ot-logo-anim {
	position: absolute;
	left: 3.62%;
	top: -6.00%;
	width: 17.29%;
	height: 79.03%;
	background-repeat: no-repeat;
	background-size: 600% 400%;
	mix-blend-mode: multiply;
	pointer-events: none;
	visibility: hidden;
}

.ot-logo-anim.is-playing {
	visibility: visible;
}

/* Menü auf die optische Mitte des Schriftzugs „orgteam“ setzen (liegt tiefer als die Bildmitte) */
.ot-header nav.wp-block-navigation {
	position: relative;
	top: 5px;
}

/* Menü direkt hinter dem Logo; auf dem Handy bleibt das Menü-Symbol rechts und braucht weniger Versatz */
@media (max-width: 599px) {
	.ot-header nav.wp-block-navigation {
		top: 3px;
		margin-left: auto;
	}
}

@media (max-width: 600px) {
	.ot-logo img {
		width: 180px !important;
	}
}

/* Häufige Fragen (core/details mit Klasse ot-faq) */
.ot-faq {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--30) 0;
}

.ot-faq + .ot-faq {
	margin-top: 0;
}

.ot-faq summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.ot-faq summary::-webkit-details-marker {
	display: none;
}

.ot-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wp--preset--color--accent);
	font-size: 1.4em;
	font-weight: 400;
	transition: transform 0.2s;
}

.ot-faq[open] summary::after {
	transform: translateY(-50%) rotate(45deg);
}

.ot-faq p {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
}

/* Videos in Beiträgen über die ganze Fensterbreite, höchstens so hoch wie das Fenster (assets/js/video-autoplay.js startet sie beim Hineinscrollen) */
.single-post main {
	overflow-x: clip;
}

/* !important, weil das constrained-Layout von WordPress Breite und Ränder sonst mit !important festlegt */
.single-post .wp-block-post-content .wp-block-video {
	width: 100vw;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

.single-post .wp-block-video video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 100svh;
	object-fit: cover;
}

.single-post .wp-block-video figcaption {
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 var(--wp--preset--spacing--40);
}

/* Handy-Menü (Vollbild): Menüpunkte zentriert und groß */
.ot-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.ot-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center;
	text-align: center;
}

.ot-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.4rem;
	padding-top: var(--wp--preset--spacing--40);
}

.ot-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Menüpunkt „News“: Schriftzug wie dunkles gebürstetes Metall, über das alle paar Sekunden ein blauer Lichtreflex (orgteam Blau) mit Leuchten wandert */
.ot-shine .wp-block-navigation-item__label {
	background-image:
		linear-gradient(110deg, transparent 32%, rgba(0, 102, 204, 0.6) 42%, rgba(110, 175, 255, 1) 50%, rgba(0, 102, 204, 0.6) 58%, transparent 68%),
		linear-gradient(180deg, #6e6e73 0%, #1d1d1f 45%, #48484a 70%, #1d1d1f 100%);
	background-size: 250% 100%, 100% 100%;
	background-repeat: no-repeat;
	background-position: 150% 0, 0 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: ot-shine 9.6s ease-in-out 1.5s infinite;
}

.ot-shine a:hover .wp-block-navigation-item__label,
.ot-shine a:focus-visible .wp-block-navigation-item__label {
	animation-duration: 4s;
	animation-delay: 0s;
}

@keyframes ot-shine {
	0% {
		background-position: 150% 0, 0 0;
		filter: drop-shadow(0 0 0 rgba(0, 102, 204, 0)) drop-shadow(0 0 0 rgba(110, 175, 255, 0));
	}
	/* Mitte des Durchlaufs: Das Metall wirft blaues Licht zurück */
	31% {
		filter: drop-shadow(0 0 4px rgba(0, 102, 204, 0.85)) drop-shadow(0 0 12px rgba(110, 175, 255, 0.7));
	}
	62.5%,
	100% {
		background-position: -50% 0, 0 0;
		filter: drop-shadow(0 0 0 rgba(0, 102, 204, 0)) drop-shadow(0 0 0 rgba(110, 175, 255, 0));
	}
}

@media (prefers-reduced-motion: reduce) {
	.ot-shine .wp-block-navigation-item__label {
		animation: none;
	}
}

/* Telefonnummern nie umbrechen */
a[href^="tel:"] {
	white-space: nowrap;
}

/* Bezeichnungen im Fußbereich wie mit Tabulator ausrichten (Telefon, Fax …, Mo, Di–Fr …) */
.ot-label {
	display: inline-block;
	min-width: 5em;
	color: var(--wp--preset--color--muted);
}

.ot-footer a {
	color: inherit;
}

.ot-footer-bottom {
	border-top: 1px solid var(--wp--preset--color--line);
}

.ot-columns-equal > .wp-block-column {
	display: flex;
	flex-direction: column;
}

.ot-checklist {
	list-style: none;
	padding-left: 0;
}

.ot-checklist li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.4rem;
}

.ot-checklist li::before {
	content: "";
	position: absolute;
	left: 0.15rem;
	top: 0.45em;
	width: 0.45rem;
	height: 0.8rem;
	border: solid var(--wp--preset--color--accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Vollbreite Abschnitte direkt aneinanderfügen */
.wp-block-post-content > .alignfull + .alignfull,
main > .alignfull + .alignfull {
	margin-block-start: 0;
}

/* Gleich hohe Karten im Raster */
.is-layout-grid > .ot-card {
	height: auto;
}

/* Häufige Fragen */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.9rem 0;
}

.wp-block-details summary {
	font-weight: 600;
	cursor: pointer;
}

.wp-block-details[open] summary {
	margin-bottom: 0.5rem;
}
