/*
 * Ortho OS – Styles
 * Maße und Farben wie im bisherigen Theme (Rocco): Container 1200 px, Open Sans, Weinrot #a51a3f.
 */

/* ---------- Schriften (lokal, kein Google-Fonts-Abruf) ---------- */

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("../fonts/open-sans-300.woff2") format("woff2");
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/open-sans-regular.woff2") format("woff2");
}

/* Fontsource 5.2.7, Latin-Teilmenge, SIL Open Font License 1.1 (siehe fonts/LICENSE-OFL-open-sans-700.txt) */
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/open-sans-700.woff2") format("woff2");
}

/* ---------- Variablen ---------- */

:root {
	--color-primary: #a51a3f;
	--color-text: #444;
	--color-accent: #f7b04e;
	--color-muted: #b4bbc1;
	--color-border: #ebeff2;
	--color-footer: #444;
	--color-icon-bg: #dae0e6;
	--color-acc-title: #384e65;
	--color-acc-title-bg: #f0f2f2;
	--color-acc-text: #565151;
	--color-acc-text-bg: #f9f9f9;
	--font: "Open Sans", Arial, Tahoma, sans-serif;
	--container: 1200px;
	--gutter: 12px;
	--gap: 24px;
	--section-space: 50px;
}

/* ---------- Basis ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: var(--color-text);
	font-family: var(--font);
	font-size: 16px;
	font-weight: 400;
	line-height: 23px;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

figure {
	margin: 0;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

p {
	margin: 0 0 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 15px;
	font-weight: 300;
}

h1,
h2 {
	color: var(--color-text);
	font-size: 40px;
	line-height: 40px;
}

h3 {
	color: var(--color-primary);
	font-size: 28px;
	line-height: 30px;
}

h4 {
	color: var(--color-primary);
	font-size: 25px;
	line-height: 29px;
}

h5 {
	color: var(--color-accent);
	font-size: 25px;
	line-height: 30px;
}

h6 {
	color: var(--color-primary);
	font-size: 15px;
	line-height: 19px;
}

address {
	font-style: normal;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	top: 10px;
	left: 10px;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 10px 15px;
	clip: auto;
	background: #fff;
	color: var(--color-primary);
	font-weight: 700;
}

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

.button {
	display: inline-block;
	padding: 10px 20px;
	border: 0;
	border-radius: 3px;
	background: var(--color-primary);
	color: #fff;
	font: inherit;
	line-height: 23px;
	cursor: pointer;
}

.button:hover {
	background: #8a1534;
	color: #fff;
	text-decoration: none;
}

/* ---------- Kopfbereich ---------- */

.site-header__inner {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	min-height: 134px;
}

.site-logo {
	padding: 24px 0 25px 20px;
}

.site-logo img {
	width: auto;
	height: 85px;
}

.site-logo a:not(.custom-logo-link) {
	color: var(--color-primary);
	font-size: 22px;
	line-height: 1.2;
}

.main-nav {
	margin-bottom: 20px;
}

.main-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav__list > li {
	display: flex;
	align-items: center;
	padding-bottom: 1px;
	color: rgba(0, 0, 0, 0.2);
}

.main-nav__list > li:not(:last-child)::after {
	content: "\2022";
}

.main-nav__list a {
	display: block;
	margin: 0 13px;
	padding: 15px 0;
	color: var(--color-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 23px;
	text-transform: uppercase;
}

.main-nav__list a:hover,
.main-nav__list .current-menu-item > a,
.main-nav__list .current-menu-ancestor > a,
.main-nav__list .current_page_item > a {
	color: var(--color-primary);
	text-decoration: none;
}

/* Untermenüs (derzeit nicht genutzt, aber vorbereitet) */
.main-nav__list li {
	position: relative;
}

.main-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 13px;
	z-index: 20;
	display: none;
	min-width: 220px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--color-primary);
}

.main-nav__list li:hover > .sub-menu,
.main-nav__list li:focus-within > .sub-menu {
	display: block;
}

.main-nav__list .sub-menu a {
	margin: 0;
	padding: 10px 15px;
	color: #fff;
	font-size: 15px;
	text-transform: none;
}

.nav-toggle {
	display: none;
}

.header-search {
	position: absolute;
	top: 15px;
	right: var(--gutter);
	display: flex;
	align-items: center;
}

.header-search__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 23px;
	height: 23px;
	margin: 3px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--color-icon-bg);
	color: #fff;
	cursor: pointer;
}

.header-search__toggle:hover,
.header-search.is-open .header-search__toggle {
	background: var(--color-primary);
}

.header-search__form input {
	width: 180px;
	height: 30px;
	padding: 4px 10px;
	border: 1px solid var(--color-border);
	color: var(--color-text);
	font: 13px var(--font);
}

/* Mit JavaScript ist das Feld eingeklappt und öffnet über das Lupen-Symbol */
.js .header-search__form {
	order: -1;
	width: 0;
	overflow: hidden;
	transition: width 0.2s ease;
}

.js .header-search.is-open .header-search__form {
	width: 186px;
	padding-right: 6px;
}

/* ---------- Slider ---------- */

.hero {
	position: relative;
	height: max(var(--hero-height, 500px), var(--hero-ratio, 25vw));
	margin-bottom: calc(var(--section-space) + 20px);
	overflow: hidden;
	background: #f0f2f2;
}

.hero__track {
	display: flex;
	height: 100%;
	transition: transform 0.8s ease;
}

.hero__slide {
	flex: 0 0 100%;
	height: 100%;
}

.hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__arrow {
	position: absolute;
	top: 50%;
	display: flex;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	transform: translateY(-50%);
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4));
}

.hero__arrow:hover {
	color: #fff;
}

.hero__arrow--prev {
	left: 15px;
}

.hero__arrow--next {
	right: 15px;
}

@media (prefers-reduced-motion: reduce) {
	.hero__track {
		transition: none;
	}
}

/* ---------- Abschnitte ---------- */

.site-main > .layout:first-child {
	margin-top: 30px;
}

.layout + .layout {
	margin-top: var(--section-space);
}

.site-main > .layout:last-child {
	margin-bottom: 60px;
}

.layout__title {
	margin-bottom: 35px;
	color: var(--color-text);
	font-size: 40px;
	line-height: 40px;
}

.layout__subtitle {
	color: var(--color-primary);
	font-size: 25px;
	line-height: 29px;
}

.grid {
	display: grid;
	gap: 20px var(--gap);
}

.grid--2 {
	grid-template-columns: 1fr 1fr;
}

.grid--image-left > .layout__image {
	order: -1;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 30px;
	padding-left: 20px;
}

.entry-content img {
	margin-bottom: 15px;
}

/* ---------- Ärzte & Team ---------- */

.team-feature {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px var(--gap);
	margin-bottom: 60px;
}

.team-feature:last-child {
	margin-bottom: 0;
}

.team-feature__name {
	font-size: 25px;
	line-height: 29px;
}

.team-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px var(--gap);
}

.team-card {
	text-align: center;
}

.team-card__photo img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

.team-card__name {
	margin: 10px 0 4px;
	font-size: 20px;
	line-height: 22px;
}

.team-details {
	margin-bottom: 8px;
}

/* ---------- Leistungen (Akkordeon) ---------- */

.accordion__item + .accordion__item {
	margin-top: 1px;
}

.accordion__title {
	position: relative;
	display: block;
	padding: 20px 60px 20px 20px;
	background: var(--color-acc-title-bg);
	color: var(--color-acc-title);
	font-size: 14px;
	font-weight: 300;
	line-height: 18px;
	list-style: none;
	cursor: pointer;
}

.accordion__title::-webkit-details-marker {
	display: none;
}

.accordion__title:hover {
	color: var(--color-primary);
}

.accordion__icon {
	position: absolute;
	top: 50%;
	right: 20px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border-radius: 50%;
	background: var(--color-acc-title);
}

/* Pfeil nach unten, geöffnet nach oben */
.accordion__icon::before {
	position: absolute;
	top: 4px;
	left: 6px;
	width: 6px;
	height: 6px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	content: "";
	transform: rotate(45deg);
	transition: transform 0.2s ease, top 0.2s ease;
}

.accordion__item[open] .accordion__icon::before {
	top: 7px;
	transform: rotate(225deg);
}

.accordion__content {
	padding: 25px 20px 20px;
	background: var(--color-acc-text-bg);
	color: var(--color-acc-text);
}

/* ---------- Galerie und Großansicht ---------- */

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--gap);
}

.gallery-grid__item img {
	width: 100%;
	transition: opacity 0.2s ease;
}

.gallery-grid__item:hover img {
	opacity: 0.85;
}

.lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.9);
}

.lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox img {
	max-width: 90vw;
	max-height: 85vh;
	width: auto;
}

.lightbox button {
	position: absolute;
	padding: 10px 15px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
}

.lightbox__close {
	top: 10px;
	right: 10px;
}

.lightbox__prev {
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
}

.lightbox__next {
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
}

/* ---------- Karte ---------- */

.map {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--map-height, 500px);
	padding: 20px;
	background: #e5e3df;
	text-align: center;
}

.map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.map__consent {
	max-width: 480px;
}

.map__external {
	display: inline-block;
	margin-left: 15px;
}

/* ---------- Kontakt ---------- */

.phone-list {
	margin: 0 0 15px;
	padding: 0;
	list-style: none;
}

.phone-list a {
	color: inherit;
	white-space: nowrap;
}

/* ---------- Suche ---------- */

.search-form {
	display: flex;
	gap: 10px;
	max-width: 500px;
	margin-bottom: 30px;
}

.search-form__field {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ccc;
	font: inherit;
}

.search-results {
	margin: 0;
	padding: 0;
	list-style: none;
}

.search-results__item {
	padding: 20px 0;
	border-top: 1px solid var(--color-border);
}

.search-results__title {
	margin-bottom: 8px;
	font-size: 25px;
	line-height: 29px;
}

/* ---------- Fußbereich ---------- */

.site-footer {
	background: var(--color-footer);
	color: #fff;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 var(--gap);
	padding-top: 30px;
	padding-bottom: 30px;
}

.site-footer__title {
	margin-bottom: 15px;
	color: var(--color-accent);
	font-size: 25px;
	line-height: 30px;
}

.site-footer__text p {
	margin-bottom: 15px;
}

.site-footer .phone-list a {
	color: #fff;
}

.footer-nav {
	margin-top: 31px;
}

.footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav__list li + li::before {
	padding: 0 0.3em;
	content: "-";
}

.footer-nav__list a {
	color: #fff;
	font-weight: 700;
}

.site-copyright {
	padding: 19px 0;
	color: var(--color-muted);
	font-size: 13px;
	line-height: 23px;
}

/* ---------- Kleiner Desktop: Menü in eigener Zeile unter dem Logo (wie bisher) ---------- */

@media (min-width: 960px) and (max-width: 1239px) {
	:root {
		--container: 960px;
	}

	.site-header__inner {
		flex-wrap: wrap;
	}

	.site-logo {
		width: 100%;
	}

	.main-nav {
		width: 100%;
		margin-top: 60px;
	}
}

/* ---------- Tablet ---------- */

@media (max-width: 959px) {
	:root {
		--section-space: 40px;
	}

	.site-header__inner {
		flex-direction: column;
		align-items: center;
		min-height: 0;
		padding-top: 50px;
	}

	.site-logo {
		padding: 10px 0 20px;
	}

	.site-logo img {
		height: auto;
		max-height: 110px;
	}

	.nav-toggle {
		position: absolute;
		top: 12px;
		right: 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 3px;
		background: var(--color-acc-title-bg);
		cursor: pointer;
	}

	.nav-toggle__icon,
	.nav-toggle__icon::before,
	.nav-toggle__icon::after {
		display: block;
		width: 20px;
		height: 3px;
		background: var(--color-text);
		content: "";
	}

	.nav-toggle__icon {
		position: relative;
	}

	.nav-toggle__icon::before {
		position: absolute;
		top: -7px;
	}

	.nav-toggle__icon::after {
		position: absolute;
		top: 7px;
	}

	.js .main-nav {
		display: none;
	}

	.main-nav,
	.js .main-nav.is-open {
		display: block;
		width: 100%;
		margin-bottom: 0;
		border-top: 1px solid var(--color-border);
	}

	.main-nav__list {
		flex-direction: column;
	}

	.main-nav__list > li {
		display: block;
		border-bottom: 1px solid var(--color-border);
		text-align: center;
	}

	.main-nav__list > li:not(:last-child)::after {
		content: none;
	}

	.main-nav__list a {
		margin: 0;
		padding: 12px 0;
		font-size: 16px;
	}

	.main-nav__list .sub-menu {
		position: static;
		display: block;
		background: none;
	}

	.main-nav__list .sub-menu a {
		color: var(--color-text);
	}

	.header-search {
		top: 12px;
		right: auto;
		left: 20px;
		height: 44px;
	}

	.js .header-search__form {
		order: 1;
	}

	.js .header-search.is-open .header-search__form {
		padding-right: 0;
		padding-left: 6px;
	}

	.team-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Smartphone ---------- */

@media (max-width: 767px) {
	:root {
		--gutter: 20px;
	}

	h1,
	h2,
	.layout__title {
		font-size: 30px;
		line-height: 34px;
	}

	.grid--2,
	.team-feature,
	.site-footer__inner {
		grid-template-columns: 1fr;
	}

	.grid--image-left > .layout__image {
		order: 0;
	}

	.site-footer__col + .site-footer__col {
		margin-top: 30px;
	}

	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.map__external {
		display: block;
		margin: 15px 0 0;
	}
}

@media (max-width: 559px) {
	.team-grid {
		grid-template-columns: 1fr;
	}
}
