/*
Theme Name: ph.child
Text Domain: ph
Description: Child-Theme - ph (WCAG 2.2)
Author: Mia
Author URI: https://www.bluforce.at
Template: phs
Version: 1.1.38
*/

/* Skip-Link: nicht clippen (Parent .screen-reader-text / clip-path bleibt sonst stehen).
   Stattdessen aus dem Viewport schieben; bei Fokus über dem fixed Header (z-index 20). */
a.skip-link {
	position: fixed !important;
	left: 12px;
	top: -200px;
	z-index: 2147483647 !important;
	padding: 12px 18px;
	background: #ffffff;
	color: #091b18;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none;
	border: 2px solid #910308;
	border-radius: 2px;
	white-space: nowrap;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	clip-path: none;
}
a.skip-link:focus,
a.skip-link:focus-visible,
a.skip-link.is-visible {
	top: 12px;
	outline: 3px solid #910308 !important;
	outline-offset: 3px;
}

#content {
	scroll-margin-top: 8rem;
}

/* Sichtbarer Tastaturfokus — weiß + PH-Rot, damit der Rahmen
   auf hellem UND auf rotem Hintergrund erkennbar bleibt. */
:focus-visible {
	outline: 3px solid #ffffff !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #910308 !important;
}
.tribe-events :focus-visible {
	outline: 3px solid #ffffff !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #910308 !important;
}

/* Infobox / Block B / Footer: oft overflow:hidden und CI-Rot —
   Rahmen nach innen, Farbe Weiß. */
.sub-type-infobox a:focus-visible,
.sub-type-infobox button:focus-visible,
.sub-type-block-b a:focus-visible,
.sub-type-block-b button:focus-visible,
footer a:focus-visible,
footer button:focus-visible {
	outline: 3px solid #ffffff !important;
	outline-offset: -3px;
	box-shadow: inset 0 0 0 3px #091b18, 0 0 0 3px #ffffff !important;
}

button.ab-menu-toggle,
button.ab-search-toggle {
	background: transparent;
	border: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	padding: 0;
}

/* Lupe 22×22 — gleiche Größe wie das Hamburger-Icon.
   Header-Button auf Desktop nicht extra zeigen (Suche = li.topSearch). */
button.ab-search-toggle {
	min-width: 0;
}
.head .topSearch,
.head .topSearch a {
	width: 22px !important;
	height: 22px !important;
	min-width: 0 !important;
	min-height: 0 !important;
}
.head .topSearch {
	background-size: 22px 22px;
	overflow: hidden;
}
/* Header-Suche (#search): nur schmale Viewports. Ab 768px gibt es
   den Suchpunkt im Mega-Menü; width/height:0 ließ den Button tabbar. */
@media (min-width: 768px) {
	header.head button#search.ab-search-toggle {
		display: none !important;
	}
}

/* Geschlossene Header-Suche: nicht in der Tab-Reihenfolge
   (Parent setzt nur max-height:0 / overflow:hidden). */
body:not(.ab-search-visible) header.head .ab-search-contaner {
	visibility: hidden;
	pointer-events: none;
}
body.ab-search-visible header.head .ab-search-contaner {
	visibility: visible;
	pointer-events: auto;
}


/* News-Slider: Fokusrahmen innen zeichnen — slick-list hat overflow:hidden
   und schneidet sonst den Rahmen an den Karten ab (Pfeile liegen außerhalb). */
.sub-type-news .news-item a:focus,
.sub-type-news .news-item a:focus-visible {
	outline: 3px solid #910308 !important;
	outline-offset: -3px;
	box-shadow: inset 0 0 0 3px #910308;
	position: relative;
	z-index: 3;
}
.sub-type-news .slick-slide.slick-active {
	overflow: visible;
}

/* News-Slider: gleiche Kartenhöhe in einer Reihe */
.sub-type-news .slick-track {
	display: flex !important;
	align-items: stretch;
}
.sub-type-news .slick-slide {
	display: flex !important;
	float: none;
	align-items: stretch;
}
.sub-type-news .slick-slide > div {
	display: flex !important;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
}
.sub-type-news .slick-slide .slide.news-item {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	width: 100% !important;
}
.sub-type-news .slide.news-item a,
.sub-type-news .news-item-inner {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}
.sub-type-news .news-item-inner .content {
	flex: 1 1 auto;
}
.sub-type-news .image-wrap {
	aspect-ratio: 3 / 2;
	height: auto;
	min-height: 0;
	flex: 0 0 auto;
}
.sub-type-news .slick-slider .slide img {
	min-height: 0;
	height: 100%;
	width: 100%;
	object-fit: cover;
}




/* Slider-Pfeile unter den Karten, links nebeneinander.
   Nicht auf .sub-type-calender: Flex zerlegt die Slick-Breitenberechnung
   und lässt große Lücken zwischen den Monatsspalten. */
.sub-type-news .inner-slider.slick-slider,
.sub-type-slider .inner-slider.slick-slider {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.sub-type-news .inner-slider .slick-list,
.sub-type-slider .inner-slider .slick-list {
	flex: 1 0 100%;
	order: 1;
}
.sub-type-news .inner-slider .slick-prev,
.sub-type-news .inner-slider .slick-next,
.sub-type-slider .inner-slider .slick-prev,
.sub-type-slider .inner-slider .slick-next {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
	order: 2;
	margin: 12px 8px 8px 0;
}
.sub-type-news .inner-slider .slick-next,
.sub-type-slider .inner-slider .slick-next {
	order: 3;
}
.sub-type-news .inner-slider .slick-dots,
.sub-type-slider .inner-slider .slick-dots {
	order: 4;
	flex: 1 1 auto;
	width: auto !important;
	margin: 12px 0 8px;
	padding-top: 0;
	text-align: right;
}

/* Block B: Foto bleibt sichtbar, weiße Titel über halbtransparentem Overlay.
   background-color am Headline-Layer, damit Prüftools 3:1 für große Schrift rechnen. */
.sub-type-block-b .bg img {
	filter: brightness(1);
}
.sub-type-block-b .headline {
	background-color: rgba(0, 0, 0, 0.45);
}
.sub-type-block-b h3 {
	color: #ffffff;
	background-color: transparent;
	padding: 0;
	min-height: 215px;
	display: flex;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.65);
}


/* Akkordeon: ein Button statt Fake-Links; geschlossenes Panel nicht tabbar */
.accordeon-item h2.accordeon-title {
	margin: 0;
	font-size: 1.557em;
	font-weight: 700;
	padding: 0;
	display: block;
}
.accordeon-item .accordeon-toggle {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-column-gap: 15px;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding: 30px 15px;
	background: transparent;
	border: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}
.accordeon-item .accordeon-toggle .tmore {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	font-size: 0.8em;
	color: #910308;
	white-space: nowrap;
	padding-right: 15px;
}
.accordeon-item .accordeon-toggle .tmore .link {
	text-decoration: underline;
	margin-right: 10px;
}
.accordeon-item:not(.closed) .accordeon-toggle {
	color: #910308;
}
/* „Mehr Info“ nicht mit opacity:0 liegen lassen — Checker rechnen sonst ~1:1 auf Weiß. */
.accordeon-item:not(.closed) .tmore .link {
	display: none;
}

/* Platzhalter muss 4.5:1 gegen den Suchhintergrund halten. */
.ab-search-input::placeholder,
#filter-offers::placeholder {
	color: #575756;
	opacity: 1;
}
.accordeon-item.closed .accordeon-content {
	visibility: hidden;
}
.accordeon-item:not(.closed) .accordeon-content {
	visibility: visible;
}
.accordeon-content .tmore .scroll-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin: 0;
	padding: 0 15px 0 0;
	background: transparent;
	border: 0;
	font: inherit;
	font-size: 1.26em;
	font-weight: 700;
	color: #910308;
	cursor: pointer;
	text-align: right;
	white-space: nowrap;
}
@media (max-width: 767px) {
	.accordeon-item .accordeon-toggle .tmore .link {
		display: none;
	}
	.accordeon-item .accordeon-toggle {
		padding-right: 0;
	}
}

#topscroll {
	min-width: 44px;
	min-height: 44px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	position: fixed;
	right: 5%;
	bottom: 20px;
	z-index: 120;
}
body.scroll #topscroll,
#topscroll:focus,
#topscroll:focus-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
@media (max-width: 1024px) {
	#topscroll {
		bottom: 80px;
	}
}


/* Landmark: header übernimmt Banner, Logo braucht kein role=banner.
   Mega-Menü per Tastatur öffnen (:focus-within, analog zu :hover). */
header.head {
	display: block;
	margin: 0;
}
.head .wp-megamenu-wrap:focus-within {
	z-index: 9;
}
@media (min-width: 1201px) {
	.head .wp-megamenu-wrap .wpmm-nav-wrap > ul.wp-megamenu > li.wpmm_mega_menu:not(.wpmm-esc-closed):focus-within > ul.wp-megamenu-sub-menu,
	.head .wp-megamenu-wrap .wpmm-nav-wrap > ul.wp-megamenu > li.wpmm_mega_menu:not(.wpmm-esc-closed):focus-within > .wpmm-strees-row-container > ul.wp-megamenu-sub-menu,
	.head .wp-megamenu-wrap .wpmm-nav-wrap > ul.wp-megamenu > li.wpmm_mega_menu:not(.wpmm-esc-closed):focus-within > .wpmm-strees-row-and-content-container > ul.wp-megamenu-sub-menu,
	.head .wp-megamenu-wrap .wpmm-nav-wrap > ul.wp-megamenu > li.wpmm_dropdown_menu:not(.wpmm-esc-closed):focus-within > ul.wp-megamenu-sub-menu {
		display: block;
		opacity: 1;
		visibility: visible;
		z-index: 1;
		top: auto;
	}
}

.wpmm-item-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.5em;
}

.fusion-privacy-bar a,
.footer-menu a {
	min-height: 24px;
	display: inline-flex;
	align-items: center;
}

@media (prefers-reduced-motion: reduce) {
	html:not(.no-reduced-motion) *,
	html:not(.no-reduced-motion) *::before,
	html:not(.no-reduced-motion) *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	a.skip-link {
		transition: none;
	}
	html:not(.no-reduced-motion) .content-wrapper:not(.noAnimate) .inview-this:not(.noAnimate),
	html:not(.no-reduced-motion) .content-wrapper:not(.noAnimate) .inview:not(.noAnimate) > :first-child {
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
		-webkit-clip-path: none !important;
	}
}

/* Infobox: Parent-Scroll-Fade setzt .inview-this auf opacity:0, bis JS
   .visible setzt. Screenreader (und Tastatur ohne Scroll) sehen den Text sonst nie. */
.sub-type-infobox .inview-this,
.sub-type-infobox .inview > :first-child {
	opacity: 1 !important;
	transform: none !important;
	clip-path: none !important;
	-webkit-clip-path: none !important;
}

/* Social-Icons: linksbündig unter Telefon- und Mailliste, weiß auf CI-Rot. */
.social-bar {
	display: none;
}
footer .footer-social {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 1.5rem;
	margin-top: 1.25rem;
	width: 100%;
	text-align: left;
}
footer .footer-social a {
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
footer .footer-social svg {
	width: 1.75rem;
	height: 1.75rem;
	color: #ffffff;
	fill: #ffffff;
}
footer .footer-social svg path {
	fill: currentColor;
}

/* Startseite Block A: Intro-Zeilen sind h3 (WCAG, eine Ebene unter h2),
   visuell aber wie die bisherigen h5 — nicht wie die großen Spalten-h3. */
.sub-type-block-a .inner > h3.h5-style {
	font-size: 1.1em;
	font-weight: bold;
	text-transform: none;
	min-height: 0;
	letter-spacing: normal;
	line-height: 1.4;
	margin: 0 0 1rem 0;
}

/* Slick infinite-Klone: Titel visuell wie h3, aber kein Heading mehr. */
.sub-type-news .news-item .slick-clone-title {
	color: #000;
	text-decoration: none;
	font-size: 1.714em;
	font-weight: bold;
	margin: 0;
	line-height: 1.3em;
}

/* TEC Monatskalender: Tabellenlayout behalten, damit th zu td gehören. */
.tribe-events table.tribe-events-calendar-month {
	display: table !important;
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	border-spacing: 0;
}
.tribe-events table.tribe-events-calendar-month thead,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__header {
	display: table-header-group !important;
}
.tribe-events table.tribe-events-calendar-month tbody,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__body {
	display: table-row-group !important;
}
.tribe-events table.tribe-events-calendar-month tr,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__week,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__header-row,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__header tr {
	display: table-row !important;
}
.tribe-events table.tribe-events-calendar-month th,
.tribe-events table.tribe-events-calendar-month td,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__header-column,
.tribe-events table.tribe-events-calendar-month .tribe-events-calendar-month__day {
	display: table-cell !important;
	width: 14.2857%;
	vertical-align: top;
	font-weight: inherit;
	text-align: inherit;
}

/* Dekorative CI-Linie, wenn eine Block-Überschrift absichtlich leer ist. */
.lineHolder .line[aria-hidden="true"] {
	position: relative;
	margin: 0 0 15px 0;
	min-height: 1.2em;
	line-height: 1;
}
.lineHolder .line[aria-hidden="true"]::after {
	content: "";
	display: block;
	margin-top: 15px;
	border-bottom: 7px solid #910308;
	height: 1px;
	width: 100%;
}

/* Fließtext-Links: nicht nur Farbe (WCAG 1.4.1, min. 3:1 zum Umfeld). */
.main-wrapper p a:not(:has(img)),
.main-wrapper li a:not(:has(img)),
.main-wrapper td a:not(:has(img)),
.main-wrapper dd a:not(:has(img)) {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* WCAG 2.5.8: Karussell-Punkte mindestens 24×24, auch mobil. */
.slick-dots li {
	width: 24px !important;
	height: 24px !important;
	margin: 0 4px !important;
}
.slick-dots li button {
	width: 24px !important;
	height: 24px !important;
	padding: 0 !important;
}
.slick-dots li button:before {
	width: 14px !important;
	height: 14px !important;
	top: 5px !important;
	left: 5px !important;
}
