/* ==========================================================================
   tüpass – ergänzende Gestaltung (UKT Corporate Design 2019)
   Farben und Schrift kommen aus theme.json; hier nur Layout-Details.
   ========================================================================== */

html { scroll-behavior: smooth; }
:where(h2, h3, section)[id] { scroll-margin-top: 90px; }
mark { background: #f1e790; color: inherit; padding: 0 .2em; } /* UKT Gelb: markiert offene Platzhalter */

/* ---------- Kopfbereich ---------- */
.tp-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.97);
	border-bottom: 1px solid var(--wp--preset--color--ukt-gold-zart);
}
.admin-bar .tp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tp-header { top: 0; position: relative; } }
.tp-header .wp-block-site-logo img { height: 48px; width: auto; }
.tp-header .wp-block-navigation a:hover { color: var(--wp--preset--color--ukt-gold-dunkel); }
.tp-fallback-logo img { height: 48px; width: auto; display: block; }

/* ---------- Hero ---------- */
.tp-hero h1 { color: #fff; font-weight: 400; letter-spacing: .3px; }
.tp-hero h1 strong { font-weight: 900; }
.tp-hero .tp-slogan { color: var(--wp--preset--color--ukt-gold-hell); font-size: var(--wp--preset--font-size--large); }
.tp-hero .tp-slogan::after {
	content: ""; display: block; width: 60px; height: 3px; margin: 22px auto 0;
	background: var(--wp--preset--color--ukt-gold);
}

/* ---------- Abschnitte ---------- */
.tp-section { padding-top: 84px !important; padding-bottom: 84px !important; }
.tp-alt { background: var(--wp--preset--color--ukt-cremeweiss); }
.tp-section-title::after {
	content: ""; display: block; width: 44px; height: 3px; margin: 14px auto 0;
	background: var(--wp--preset--color--ukt-gold);
}
.tp-section-title.has-text-align-left::after { margin-left: 0; }
.tp-lead { max-width: 720px; margin-left: auto !important; margin-right: auto !important; }

/* Bildreihe */
.tp-photos .wp-block-image { position: relative; margin: 0; }
.tp-photos .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.tp-photos .wp-block-image figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 16px 14px;
	color: #fff; font-weight: 700; text-align: left;
	background: linear-gradient(transparent, rgba(35,42,56,.75));
}

/* Kursliste */
.tp-list { border-top: 1px solid var(--wp--preset--color--ukt-gold-hell); }
.tp-item {
	display: grid; grid-template-columns: 220px 1fr; column-gap: 24px; row-gap: 0;
	padding: 22px 0; border-bottom: 1px solid var(--wp--preset--color--ukt-gold-hell);
	margin-top: 0 !important;
}
.tp-item > * { margin: 0 !important; }
.tp-item > .tp-kicker { grid-column: 1; grid-row: 1; }
.tp-item > h3 { grid-column: 1; grid-row: 2; font-size: 1.08rem; }
.tp-item > p:not(.tp-kicker):not(.tp-more) { grid-column: 2; grid-row: 1 / span 2; }
.tp-item > .tp-more { grid-column: 2; grid-row: 3; margin-top: 6px !important; font-weight: 700; font-size: .95rem; }
.tp-more a { color: var(--wp--preset--color--ukt-gold-dunkel); text-decoration: none; }
.tp-more a:hover { text-decoration: underline; }
.tp-kicker {
	color: var(--wp--preset--color--ukt-gold-dunkel) !important;
	font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

/* Aufzählung: „Black small squares“ in UKT Gold (CD-Vorgabe) */
.entry-content ul:not(.wp-block-navigation__container),
ul.tp-squares { list-style: none; padding-left: 0; }
.entry-content ul:not(.wp-block-navigation__container) > li,
ul.tp-squares > li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.entry-content ul:not(.wp-block-navigation__container) > li::before,
ul.tp-squares > li::before {
	content: "\25AA"; position: absolute; left: 0; top: -1px;
	color: var(--wp--preset--color--ukt-gold); font-size: 1.2em;
}

/* Rechtstexte (Impressum, Datenschutz) */
.tp-legal h2 { font-size: 1.2rem; margin-top: 2.2em; }
.tp-legal h3 { font-size: 1rem; margin-top: 1.4em; }
.tp-page-title::after {
	content: ""; display: block; width: 44px; height: 3px; margin-top: 14px;
	background: var(--wp--preset--color--ukt-gold);
}

/* ---------- Kontaktformular ---------- */
.tp-form { display: grid; gap: 14px; }
.tp-form label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; color: var(--wp--preset--color--ukt-blau-dunkel); }
.tp-form input[type=text], .tp-form input[type=email], .tp-form input[type=tel], .tp-form textarea {
	width: 100%; padding: 10px 12px; font: inherit; color: var(--wp--preset--color--ukt-blau-dunkel);
	border: 1px solid var(--wp--preset--color--ukt-gold-hell); background: #fff; border-radius: 0;
}
.tp-form input:focus, .tp-form textarea:focus { outline: 2px solid var(--wp--preset--color--ukt-gold); outline-offset: 0; border-color: var(--wp--preset--color--ukt-gold); }
.tp-form textarea { min-height: 150px; resize: vertical; }
.tp-form .tp-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--wp--preset--color--ukt-blau); }
.tp-form .tp-check input { margin-top: 5px; }
.tp-form .tp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tp-form button {
	justify-self: start; cursor: pointer; font: inherit; font-weight: 700; letter-spacing: .03em;
	padding: .7em 1.6em; border: 2px solid var(--wp--preset--color--ukt-gold); background: transparent;
	color: var(--wp--preset--color--ukt-blau-dunkel);
}
.tp-form button:hover, .tp-form button:focus { background: var(--wp--preset--color--ukt-gold); }
.tp-form-msg { padding: 12px 16px; border-left: 4px solid; margin-bottom: 8px; }
.tp-form-msg.is-ok { border-color: var(--wp--preset--color--ukt-petrol); background: #d6e3de; }
.tp-form-msg.is-error { border-color: #c00d47; background: #f7f5f2; }
.tp-required { color: var(--wp--preset--color--ukt-gold-dunkel); }

/* ---------- Fußbereich ---------- */
.tp-footer { border-top: 4px solid var(--wp--preset--color--ukt-gold); }
.tp-footer, .tp-footer p { color: var(--wp--preset--color--ukt-gold-hell) !important; font-size: .9rem; }
.tp-footer a, .tp-footer a:visited { color: var(--wp--preset--color--ukt-gold-zart) !important; text-decoration: none; }
.tp-footer a:hover, .tp-footer a:focus { color: #fff !important; text-decoration: underline; }

/* ---------- Mobil ---------- */
@media (max-width: 781px) {
	.tp-item { grid-template-columns: 1fr; }
	.tp-item > .tp-kicker, .tp-item > h3, .tp-item > p:not(.tp-kicker), .tp-item > .tp-more { grid-column: 1; grid-row: auto; }
	.tp-item > p:not(.tp-kicker) { margin-top: 6px !important; }
	.tp-section { padding-top: 60px !important; padding-bottom: 60px !important; }
}

/* Volle-Breite-Abschnitte direkt aneinander, ohne Abstand dazwischen */
.wp-block-post-content > .alignfull { margin-top: 0 !important; margin-bottom: 0 !important; }
main.wp-block-group { margin-top: 0 !important; }
footer.wp-block-template-part { margin-top: 0 !important; }

/* Fußzeile: links Copyright, rechts Links mit Abstand statt Trennzeichen */
.tp-footer-links a { margin-left: 22px; }
.tp-footer-links a:first-child { margin-left: 0; }
@media (max-width: 600px) { .tp-footer .alignwide { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* ---------- Kopfbereich auf dem Handy: mehr Luft ---------- */
@media (max-width: 781px) {
	.tp-header { padding-left: 20px !important; padding-right: 20px !important; }
	.tp-header > .alignwide { padding-top: 12px !important; padding-bottom: 12px !important; }
	.tp-header .wp-block-site-logo img, .tp-fallback-logo img { height: 40px; }
	.tp-header .wp-block-navigation__responsive-container-open { padding: 8px; margin-right: -8px; }
	.tp-header .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
}
/* Aufgeklapptes Handy-Menü */
.tp-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px 24px 40px !important;
	background: #fff;
}
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { top: 4px; right: 0; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 56px !important; align-items: stretch !important; }
.tp-header .is-menu-open .wp-block-navigation__container { gap: 0 !important; width: 100%; align-items: stretch !important; }
.tp-header .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--wp--preset--color--ukt-gold-zart); }
.tp-header .is-menu-open .wp-block-navigation-item:first-child { border-top: 1px solid var(--wp--preset--color--ukt-gold-zart); }
.tp-header .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 16px 4px !important; font-size: 1.1rem; }

/* ---------- Unterseiten: Seitenkopf ---------- */
.tp-pagehead { padding-top: 80px !important; padding-bottom: 72px !important; }
.tp-pagehead h1 { color: #fff; margin-top: .2em; }
.tp-pagehead .tp-lead { color: var(--wp--preset--color--ukt-gold-zart) !important; font-size: var(--wp--preset--font-size--large); line-height: 1.5; }
.tp-pagehead .tp-kicker { color: var(--wp--preset--color--ukt-gold) !important; }
.tp-pagehead .tp-lead::before {
	content: ""; display: block; width: 60px; height: 3px; margin: 0 auto 22px;
	background: var(--wp--preset--color--ukt-gold);
}
.tp-section .tp-kicker + .tp-section-title { margin-top: 4px !important; }
.tp-section ul.tp-squares { margin-top: 1.4em; }
.tp-item h3 a { color: inherit; text-decoration: none; }
.tp-item h3 a:hover { color: var(--wp--preset--color--ukt-gold-dunkel); text-decoration: underline; }
@media (max-width: 781px) { .tp-pagehead { padding-top: 56px !important; padding-bottom: 48px !important; } }

/* ---------- Untermenü ---------- */
.tp-header .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--ukt-gold-zart) !important;
	border-top: 3px solid var(--wp--preset--color--ukt-gold) !important;
	padding: 6px 0 !important; min-width: 260px !important; background: #fff;
}
.tp-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 10px 18px !important; }
.tp-header .is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; padding: 0 !important; min-width: 0 !important; }
.tp-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border-bottom: 0; }
.tp-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child { border-top: 0; }
.tp-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 4px 8px 20px !important; font-size: 1rem; color: var(--wp--preset--color--ukt-blau); }

/* ---------- Kursseiten: Bild neben dem Text ---------- */
.tp-kursreihe { gap: 48px !important; align-items: center !important; margin-top: 2em !important; }
.tp-kursbild { margin: 0 !important; }
.tp-kursbild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tp-kursreihe .wp-block-buttons { margin-top: 1.4em; }
@media (max-width: 781px) {
	.tp-kursreihe { gap: 24px !important; }
	.tp-bild-rechts > .wp-block-column:last-child { order: -1; } /* auf dem Handy immer erst das Bild */
}

/* ---------- Bildreihe „Simulation“: Bilder als Links ---------- */
.tp-photos .wp-block-image a { display: block; overflow: hidden; }
.tp-photos .wp-block-image a img { transition: transform .35s ease, opacity .35s ease; }
.tp-photos .wp-block-image a:hover img, .tp-photos .wp-block-image a:focus img { transform: scale(1.04); opacity: .92; }
.tp-photos .wp-block-image a:focus-visible { outline: 3px solid var(--wp--preset--color--ukt-gold); outline-offset: 3px; }
.tp-photos .wp-block-image figcaption { pointer-events: none; } /* Klick auf die Beschriftung öffnet ebenfalls den Link */
.tp-photos .wp-block-image:has(a) figcaption::after { content: " →"; }
