/*
Theme Name: Schwarzatalhospiz
Description: Theme für das Schwarzatalhospiz Katzhütte – Nachbau des bisherigen TYPO3-Layouts (Petrol/Gelbgrün, Inhalt + Teaser-Sidebar).
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: schwarzatalhospiz
*/

@font-face {
	font-family: "droid_sans";
	src: url("assets/fonts/droidsans-webfont.woff2") format("woff2"), url("assets/fonts/droidsans-webfont.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "droid_sansbold";
	src: url("assets/fonts/droidsans-bold-webfont.woff2") format("woff2"), url("assets/fonts/droidsans-bold-webfont.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--sh-primary: #39898f;
	--sh-primary-dark: #2a666b;
	--sh-secondary: #dada2a;
	--sh-secondary-dark: #b2b21f;
	--sh-text: #666;
	--sh-light: #f3f6f6;
	--sh-container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: "droid_sans", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--sh-text);
	background: #fff;
}

img { max-width: 100%; height: auto; }

a { color: var(--sh-primary); }
a:hover, a:focus { color: var(--sh-primary-dark); }

h1, h2, h3, h4, h5, h6 {
	margin: 1.5rem 0 .9375rem;
	font-family: "droid_sansbold", Arial, sans-serif;
	font-weight: normal;
	line-height: 1.3;
	color: #555;
	scroll-margin-top: 1rem;
}
h1 { font-size: 1.4375rem; color: var(--sh-primary); }
h2 { font-size: 1.1875rem; }
h3 { font-size: 1rem; }
.entry-content > :first-child { margin-top: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: .5rem; left: .5rem; z-index: 1000;
	padding: .5rem 1rem; background: #fff; color: var(--sh-primary);
}

.container {
	width: 100%;
	max-width: var(--sh-container);
	margin: 0 auto;
	padding: 0 15px;
}

/* ---------- Header ---------- */
.site-header__image {
	background-repeat: no-repeat;
	background-position: top center;
	background-size: cover;
	min-height: 240px;
}
.is-front .site-header__image { min-height: 442px; }
.site-header__brand { padding-top: 20px; }
.site-header__brand img { width: 155px; display: block; }
@media (min-width: 992px) {
	.site-header__brand { padding-top: 40px; }
}
@media (max-width: 575px) {
	.site-header__image, .is-front .site-header__image {
		min-height: 120px;
		background-image: linear-gradient(to bottom, #f4f2f3 0%, #eae6e5 100%) !important;
	}
	.site-header__brand { padding: 10px 0; }
	.site-header__brand img { width: auto; max-height: 90px; }
}

/* ---------- Navigation ---------- */
.site-nav { background: var(--sh-primary); }
.site-nav .container { display: flex; align-items: center; flex-wrap: wrap; }
.site-nav__toggle {
	display: none;
	background: none; border: 0; color: #fff;
	font: inherit; text-transform: uppercase;
	padding: .75rem 0; cursor: pointer;
}
.site-nav__toggle-icon { display: inline-block; width: 1.25rem; margin-left: .5rem; vertical-align: middle; }
.site-nav__toggle-icon span { display: block; height: 2px; background: #fff; margin: 4px 0; }
.menu-primary, .menu-primary ul { list-style: none; margin: 0; padding: 0; }
.menu-primary { display: flex; flex-wrap: wrap; flex: 1; }
.menu-primary > li { position: relative; }
.menu-primary a {
	display: block;
	padding: .625rem 1rem;
	color: #fff;
	text-decoration: none;
	text-transform: uppercase;
}
.menu-primary > li > a:hover,
.menu-primary > li:focus-within > a,
.menu-primary > li.current-menu-item > a,
.menu-primary > li.current-menu-ancestor > a,
.menu-primary > li.current-menu-parent > a { background: var(--sh-secondary); color: #fff; }
.menu-primary .sub-menu {
	display: none;
	position: absolute; left: 0; top: 100%; z-index: 50;
	min-width: 260px;
	background: var(--sh-primary);
}
.menu-primary .sub-menu a { text-transform: none; }
.menu-primary .sub-menu a:hover,
.menu-primary .sub-menu .current-menu-item > a { background: var(--sh-secondary); }
.menu-primary > li:hover > .sub-menu,
.menu-primary > li:focus-within > .sub-menu { display: block; }

.site-search { display: flex; margin-left: auto; padding: .4rem 0; }
.site-search input[type="search"] {
	border: 0; padding: .35rem .6rem; font: inherit; font-size: .9rem; width: 12rem;
}
.site-search button {
	border: 0; background: var(--sh-secondary); color: #fff; padding: .35rem .75rem; cursor: pointer; font: inherit; font-size: .9rem;
}

@media (max-width: 1199px) {
	.site-nav__toggle { display: block; }
	.menu-primary { display: none; flex-direction: column; flex-basis: 100%; }
	.site-nav.is-open .menu-primary { display: flex; }
	.menu-primary .sub-menu { display: block; position: static; min-width: 0; }
	.menu-primary .sub-menu a { padding-left: 2rem; }
	.site-search { flex-basis: 100%; display: none; padding-bottom: .75rem; }
	.site-nav.is-open .site-search { display: flex; }
	.site-search input[type="search"] { flex: 1; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
	font-size: .75rem;
	margin: 1.25rem 0;
	padding: 0;
	list-style: none;
	display: flex; flex-wrap: wrap;
}
.breadcrumb li + li::before { content: "›"; padding: 0 .4rem; }
.breadcrumb a { color: var(--sh-text); }

/* ---------- Layout ---------- */
.site-main { padding-bottom: 60px; }
.is-front .site-main { padding-top: 1.5rem; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 30px; }
.layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 991px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Content ---------- */
.entry-content ul { padding-left: 1.25rem; }
.entry-content .wp-block-image figcaption { font-size: .85rem; }
.entry-content .wp-block-separator {
	border: 0; border-top: 1px solid #dcdcdc; margin: 2rem 0; opacity: 1;
}
.entry-content .wp-block-media-text { margin: 1rem 0; }
.entry-content .wp-block-media-text .wp-block-media-text__content { padding: 0 0 0 1.5rem; }
.entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { padding: 0 1.5rem 0 0; }
@media (max-width: 600px) {
	.entry-content .wp-block-media-text .wp-block-media-text__content,
	.entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { padding: 1rem 0 0; }
}

.wp-block-button__link,
.btn {
	display: inline-block;
	background: var(--sh-primary);
	color: #fff;
	border-radius: 0;
	padding: .5rem 1rem;
	text-decoration: none;
	border: 1px solid var(--sh-primary);
}
.wp-block-button__link::before,
.btn::before { content: "›"; margin-right: .4rem; }
.wp-block-button__link:hover,
.btn:hover { background: var(--sh-primary-dark); color: #fff; }

/* Akkordeon (core/details) */
.entry-content .wp-block-details {
	border: 1px solid #dcdcdc;
	margin: 0 0 -1px;
	padding: 0;
}
.entry-content .wp-block-details summary {
	cursor: pointer;
	padding: .75rem 1rem;
	font-family: "droid_sansbold", Arial, sans-serif;
	color: #fff;
	background: var(--sh-primary);
	list-style: none;
}
.entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content .wp-block-details summary::after { content: "+"; float: right; }
.entry-content .wp-block-details[open] summary::after { content: "–"; }
.entry-content .wp-block-details[open] summary { background: var(--sh-secondary); }
.entry-content .wp-block-details > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.entry-content .wp-block-details > :last-child { margin-bottom: 1rem; }
.entry-content .wp-block-details + :not(.wp-block-details) { margin-top: 2rem; }

.entry-content .wp-block-file { margin: 1rem 0; }
.entry-content .wp-block-file a:first-child::before { content: "\1F4C4"; margin-right: .4rem; }

.entry-content .sh-logos .wp-block-image { text-align: center; }
.entry-content .sh-logos img { max-height: 150px; width: auto; }

/* ---------- Sidebar / Teaser ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.teaser { background: var(--sh-primary); color: #fff; }
.teaser img { display: block; width: 100%; }
.teaser__body { padding: 1.25rem; }
.teaser__body p { margin: 0 0 1rem; }
.teaser .btn { background: #fff; border-color: #fff; color: var(--sh-primary); }
.teaser .btn:hover { background: #e6e6e6; color: var(--sh-primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sh-primary); color: #fff; padding: 30px 0 20px; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.125rem; margin-top: 0; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
@media (max-width: 767px) { .site-footer__grid { grid-template-columns: 1fr; } }
.menu-footer { list-style: none; margin: 0; padding: 0; }
.menu-footer li { margin-bottom: .35rem; }
.menu-footer li::before { content: "›"; margin-right: .4rem; }
.site-footer__copy { margin-top: 1.5rem; font-size: .8rem; opacity: .85; }

/* ---------- Search results ---------- */
.search-result { margin-bottom: 1.5rem; }
.search-result h2 { margin-bottom: .25rem; }

.sh-subheader {
	font-family: "droid_sansbold", Arial, sans-serif;
	font-size: 1.1875rem;
	color: var(--sh-secondary-dark);
	margin-top: -.5rem;
}
