/*
Theme Name: Musikverlag Schori Classic
Description: Nachbau des Joomla-Layouts (tp_musician) von musikverlag-schori.ch für WordPress. Bereinigt Joomla-Importreste (rn, loadmoduleid) und stellt die Seitenleiste «Aktuell» wieder her.
Version: 1.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mvs-classic
*/

/* ---------- Farben & Grundwerte (aus dem Original ausgelesen) ---------- */
:root {
	--mvs-gold: #f0bd75;
	--mvs-white: #ffffff;
	--mvs-blue: #c1ddf6;
	--mvs-footer: #37373d;
	--mvs-container: 1152px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: "Manrope", Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.7;
	color: var(--mvs-gold);
	background-color: var(--mvs-gold);
	background-size: contain;
	background-position: 0 0;
	-webkit-font-smoothing: antialiased;
}

/* Wie im Original: 30 % Schwarz über dem Goldgrund */
.mvs-wrapper {
	background: rgba(0, 0, 0, 0.3);
	min-height: 100vh;
	/* Boxed-Layout wie im Original: 1200 px breit, Schatten, seitlich heller Goldgrund */
	max-width: 1200px;
	margin: 0 auto;
	box-shadow: 0 0 10px 0 #000;
}

a { color: var(--mvs-white); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover, a:focus { color: var(--mvs-gold); }

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

strong, b { font-weight: 700; color: var(--mvs-gold); }

h1, h2, h3, h4, h5, h6 {
	font-family: "Manrope", Arial, Helvetica, sans-serif;
	font-weight: 300;
	color: var(--mvs-gold);
	line-height: 1.3;
	margin: 0 0 .6em;
}
h1 { font-size: 40px; }
h2 { font-size: 28.8px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

p { margin: 0 0 1em; }

hr {
	border: 0;
	border-top: 1px solid rgba(240, 189, 117, .5);
	margin: 1.5em 0;
}

ul { padding-left: 1.2em; }
ul li::marker { color: var(--mvs-gold); }

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

.mvs-container {
	max-width: var(--mvs-container);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Kopfbereich mit Bild, Titel und Logo ---------- */
.mvs-topbar {
	height: 179px;
	background-size: cover;
	background-position: 50% 100%;
	background-repeat: no-repeat;
	/* Wie im Original: Bild fixiert und auf die ganze Fensterfläche skaliert
	   (grösserer Ausschnitt, weicher Eindruck, Parallax beim Scrollen) */
	background-attachment: fixed;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mvs-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin: 0;
	font-size: 80px;
	font-weight: 300;
	line-height: 1.1;
	color: var(--mvs-gold);
	text-align: center;
	letter-spacing: 0;
}
.mvs-brand a { color: var(--mvs-gold); display: flex; align-items: center; gap: 20px; }
.mvs-brand a:hover { color: var(--mvs-gold); opacity: .9; }
.mvs-brand img { height: 98px; width: auto; }

/* ---------- Hauptmenü ---------- */
.mvs-navbar {
	position: relative;
	z-index: 50;
}
.mvs-navbar .mvs-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 57px;
	gap: 8px;
}
.mvs-nav ul { list-style: none; margin: 0; padding: 0; }
.mvs-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; }
.mvs-nav li { position: relative; }
.mvs-nav a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 20.8px;
	font-weight: 300;
	line-height: 37.44px;
	color: var(--mvs-white);
	white-space: nowrap;
}
.mvs-nav a:hover,
.mvs-nav .current-menu-item > a,
.mvs-nav .current_page_item > a,
.mvs-nav .current-menu-ancestor > a { color: var(--mvs-gold); }

.mvs-nav .menu-item-has-children > a::after {
	content: "";
	width: 7px; height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	margin-left: 4px;
}

/* Untermenüs: hellblau wie im Original */
.mvs-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 290px;
	background: var(--mvs-blue);
	padding: 10px 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.mvs-nav li:hover > .sub-menu,
.mvs-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mvs-nav .sub-menu a {
	font-size: 16px;
	line-height: 1.5;
	padding: 8px 20px;
	color: var(--mvs-footer);
}
.mvs-nav .sub-menu a:hover,
.mvs-nav .sub-menu .current-menu-item > a { color: #000; background: rgba(255, 255, 255, .35); }

/* Social-Icons wie im Original: Font-Awesome-Glyphen, 22 px, dunkles Blau #3a3d67 */
.mvs-social { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex-shrink: 0; }
.mvs-social a { display: inline-flex; justify-content: center; width: 28px; padding: 8px 0; color: #3a3d67; }
.mvs-social a:hover, .mvs-social a:focus { color: var(--mvs-white); }
.mvs-social svg { width: auto; height: 22px; fill: currentColor; }

.mvs-menu-toggle {
	display: none;
	background: none;
	border: 0;
	color: var(--mvs-white);
	padding: 12px;
	cursor: pointer;
}
.mvs-menu-toggle svg { width: 28px; height: 28px; fill: currentColor; }
.mvs-mobile-title { display: none; }

/* ---------- Inhalt ---------- */
.mvs-content {
	background: rgba(0, 0, 0, 0.45);
	padding: 60px 0 70px;
}
.mvs-grid {
	display: grid;
	grid-template-columns: minmax(0, 660px) 288px;
	justify-content: space-between;
	gap: 60px;
	padding: 0 35px;
}
.mvs-grid.no-sidebar { grid-template-columns: minmax(0, 1fr); }

.mvs-main h1.mvs-page-title { font-size: 40px; line-height: 1.2; margin-bottom: .8em; }
.mvs-main .entry-content > h2:first-child { margin-top: 0; }
.mvs-main figure { margin: 0 0 1em; }
.mvs-main figcaption, .wp-caption-text { font-size: 15px; color: var(--mvs-gold); }

/* ---------- Importierte Module im Inhalt (z. B. Musik hören) ---------- */
.mvs-main .schori-module { margin: 70px 0 40px; }
.mvs-main .schori-module img { display: block; margin: 0 0 14px; }
.mvs-main .schori-module table { border: 0; margin: 0; }
.mvs-main .schori-module td {
	border: 0;
	padding: 4px 0;
	vertical-align: middle;
	font-size: 18px;
}
.mvs-main .schori-module td:first-child { width: 50%; padding-right: 20px; }
.mvs-main .schori-module audio { display: block; width: 100%; max-width: 370px; height: 40px; }

/* ---------- Seitenleiste «Aktuell» ---------- */
.mvs-sidebar { font-size: 15px; }
.mvs-sidebar h2, .mvs-sidebar h3,
.mvs-main .schori-module > h2, .mvs-main .schori-module > h3,
.mvs-footer h2, .mvs-footer h3,
.mvs-below h2 {
	position: relative;
	font-size: 24px;
	padding: 6px 0 6px 17px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--mvs-blue);
}
.mvs-sidebar h2::before, .mvs-sidebar h3::before,
.mvs-main .schori-module > h2::before, .mvs-main .schori-module > h3::before,
.mvs-footer h2::before, .mvs-footer h3::before,
.mvs-below h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	width: 5px;
	height: 21px;
	background: var(--mvs-blue);
}
.mvs-sidebar .schori-module { margin-bottom: 40px; }
.mvs-sidebar img { display: block; margin: 10px 0 14px; }
.mvs-sidebar hr { border-top-color: rgba(193, 221, 246, .7); }
.mvs-sidebar audio { width: 100%; margin: 8px 0 12px; }

/* ---------- Galerien (Ersatz für Joomla-Module 349/350/351) ---------- */
.mvs-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 15px;
	align-items: start;
	margin: 10px 0 30px;
}
.mvs-gallery figure { margin: 0; }
.mvs-gallery a { display: block; overflow: hidden; box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075); }
.mvs-gallery img { display: block; width: 100%; height: auto; transition: transform .35s; }
.mvs-gallery a:hover img { transform: scale(1.04); }
.mvs-gallery figcaption { margin-top: 6px; font-size: 15px; line-height: 1.4; }

/* Lightbox */
.mvs-lightbox {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(0, 0, 0, .9);
	display: none; align-items: center; justify-content: center;
	padding: 40px;
	cursor: zoom-out;
}
.mvs-lightbox.is-open { display: flex; }
.mvs-lightbox img { max-height: 90vh; max-width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.mvs-lightbox-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; }
.mvs-lightbox-close { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; }

/* ---------- Footer ---------- */
.mvs-footer {
	background: var(--mvs-footer);
	padding: 50px 0 40px;
	font-size: 15px;
}
.mvs-footer-grid {
	display: grid;
	grid-template-columns: 5fr 4fr 3fr;
	gap: 60px;
	padding: 0 35px;
}
.mvs-footer p { margin: 0 0 .8em; }
.mvs-address { display: flex; gap: 20px; align-items: flex-start; margin-bottom: .5em; }
.mvs-address img { width: 130px; height: auto; flex: 0 0 130px; }
.mvs-footer ul { margin: 0; padding-left: 1.1em; }
.mvs-footer li { margin-bottom: .35em; }
.mvs-footer-links a { display: inline-block; margin-bottom: .9em; }

.mvs-bottombar {
	background: var(--mvs-blue);
	padding: 14px 0;
	font-size: 14px;
}
.mvs-bottombar a { color: var(--mvs-white); padding-left: 35px; }
.mvs-bottombar a:hover { color: var(--mvs-footer); }

/* Zurück-nach-oben-Knopf */
.mvs-backtotop {
	position: fixed;
	right: 22px; bottom: 22px;
	width: 46px; height: 46px;
	border-radius: 50%;
	border: 0;
	background: var(--mvs-gold);
	color: var(--mvs-footer);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	cursor: pointer;
	opacity: 0; visibility: hidden;
	transition: opacity .25s, visibility .25s;
	z-index: 90;
}
.mvs-backtotop.is-visible { opacity: 1; visibility: visible; }
.mvs-backtotop svg { width: 18px; height: 18px; fill: currentColor; }

/* WordPress-Standardklassen */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-image { margin: 0 0 1em; }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(240, 189, 117, .35); text-align: left; vertical-align: top; }

/* ---------- Tablet ---------- */
@media (min-width: 992px) {
	.mvs-navbar .mvs-container { flex-wrap: nowrap; }
	.mvs-nav > ul { flex-wrap: nowrap; }
	.mvs-nav > ul > li > a { padding-left: clamp(9px, 1.2vw, 16px); padding-right: clamp(9px, 1.2vw, 16px); }
}

@media (max-width: 1100px) {
	.mvs-brand { font-size: 60px; }
	.mvs-brand img { height: 76px; }
	.mvs-nav a { font-size: 18px; padding: 8px 11px; }
	.mvs-grid { gap: 40px; padding: 0; }
	.mvs-footer-grid { gap: 40px; padding: 0; }
	.mvs-bottombar a { padding-left: 0; }
}

/* ---------- Mobil: wie im Original wird das Kopfbild ausgeblendet ---------- */
@media (max-width: 991px) {
	.mvs-topbar { display: none; }
	.mvs-navbar .mvs-container { justify-content: space-between; flex-wrap: wrap; }
	.mvs-navbar .mvs-container { padding: 0 12px 0 16px; gap: 0; }
	.mvs-mobile-title {
		display: flex; align-items: center; gap: 8px;
		flex: 1 1 auto; min-width: 0;
		font-size: 21px; line-height: 1.2; color: var(--mvs-gold); padding: 8px 0;
	}
	.mvs-mobile-title img { height: 40px; width: auto; }
	.mvs-menu-toggle { display: inline-flex; order: 3; }
	.mvs-social { order: 2; margin-left: auto; }
	.mvs-nav { display: none; order: 4; width: 100%; }
	.mvs-nav.is-open { display: block; }
	.mvs-nav > ul { flex-direction: column; padding-bottom: 12px; }
	.mvs-nav a { font-size: 18px; padding: 6px 4px; }
	.mvs-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; background: transparent; padding: 0 0 0 18px; min-width: 0;
	}
	.mvs-nav .sub-menu a { color: var(--mvs-white); font-size: 16px; padding: 4px; }
	.mvs-nav .sub-menu a:hover { background: none; color: var(--mvs-gold); }
	.mvs-nav .menu-item-has-children > a::after { display: none; }
	.mvs-grid, .mvs-grid.no-sidebar { grid-template-columns: minmax(0, 1fr); }
	.mvs-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.mvs-content { padding: 35px 0 45px; }
}

@media (max-width: 560px) {
	.mvs-main .schori-module td { display: block; width: 100% !important; padding: 2px 0; }
	.mvs-main .schori-module tr { display: block; margin-bottom: 12px; }
	.mvs-main h1.mvs-page-title { font-size: 30px; }
	.mvs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	h2 { font-size: 24px; }
	.mvs-address { flex-direction: column; }
}

/* Dunkle Audio-Player wie im Original (Chrome/Edge/Firefox) */
.mvs-main audio, .mvs-sidebar audio { color-scheme: dark; }

/* ---------- Wisch-Galerien (Anlässe) ----------
   WordPress filtert beim Speichern overflow-x, scroll-snap und scrollbar-* aus
   den Inline-Styles. Hier werden sie wiederhergestellt, erkannt an der Struktur
   aus dem Original: Zeile > Zelle > Bild mit height:100%. */
.entry-content div:has(> div > img[style*="height: 100%"]) {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #c1ddf6 #eee;
	max-width: 100%;
}
.entry-content div:has(> div > img[style*="height: 100%"]) > div { scroll-snap-align: center; }
.entry-content div:has(> div > div > img[style*="height: 100%"]) { min-width: 0; }
.entry-content div:has(> div > img[style*="height: 100%"]) + p {
	margin: 4px 0 0;
	font-size: .8em;
	color: #c1ddf6;
	text-align: center;
}

/* Zitatblock neben der Galerie wie im Original */
.entry-content blockquote {
	margin: 0;
	padding-left: 16px;
	border-left: 4px solid var(--mvs-blue);
	font-style: italic;
}
.entry-content blockquote p {
	font-size: 18px;
	font-weight: 500;
	color: var(--mvs-gold) !important;
}

/* Auf schmalen Bildschirmen Zitat und Galerie untereinander */
@media (max-width: 700px) {
	.entry-content div:has(> blockquote):has(img[style*="height: 100%"]) { flex-direction: column; }
	.entry-content div:has(> blockquote):has(img[style*="height: 100%"]) > * { width: 100%; }
	.entry-content div:has(> div > img[style*="height: 100%"]) > div { height: 220px !important; }
}

/* ---------- Kontaktformular wie im Original ---------- */
.contact-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 30px;
	margin-top: 40px;
	font-family: Verdana, Geneva, sans-serif;
}
.contact-form label {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	color: #c59b60;
	font-size: 16px;
	font-weight: 400;
}
.contact-form label:has(:required)::after { content: "*"; color: #d73e31; order: 1; }
.contact-form label > input,
.contact-form label > textarea { order: 2; flex: 0 0 100%; margin-top: 8px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
	width: 100%;
	padding: 12px;
	background: #c59b60;
	color: #1f180e;
	border: 1px solid #5c481d;
	border-radius: 3px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 16px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.contact-form textarea { min-height: 124px; resize: vertical; }
.contact-form ::placeholder { color: rgba(31, 24, 14, .44); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--mvs-blue); outline-offset: 1px; }
.contact-form label:has(textarea) { grid-column: 1 / -1; }
/* Spam-Falle (Honeypot) unsichtbar lassen */
.contact-form div:has(input[name="schori_company"]),
.contact-form label:has(input[name="schori_company"]) {
	position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden;
}
.contact-form button,
.contact-form input[type="submit"] {
	grid-column: 1 / 2;
	justify-self: start;
	min-width: 148px;
	padding: 12px 22px;
	background: #c59b60;
	color: #1f180e;
	border: 0;
	border-radius: 3px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 16px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.contact-form button:hover,
.contact-form input[type="submit"]:hover { background: var(--mvs-gold); }
@media (max-width: 560px) {
	.contact-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Fritz Schori: Ehrenmedaille, Fotoreihe, Bilder-Slider ---------- */
.mvs-sidebar .mvs-extra p { margin-bottom: 20px; }
.mvs-sidebar .mvs-extra a.mvs-lb { display: block; margin-bottom: 30px; }
.mvs-sidebar .mvs-extra img { margin: 0; width: 100%; height: auto; }
.mvs-below { padding: 0 35px; margin-top: 100px; }
.mvs-below figure { margin: 0; }
.mvs-below a.mvs-lb { display: block; overflow: hidden; }
.mvs-below img { display: block; width: 100%; height: auto; transition: transform .35s; }
.mvs-below a.mvs-lb:hover img { transform: scale(1.03); }
.mvs-photorow {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	align-items: start;
	margin-bottom: 70px;
}
.mvs-paintings h2 { margin-bottom: 40px; }
.mvs-paintings-sub { margin-bottom: 20px; }
.mvs-slider-track {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}
.mvs-slider-track::-webkit-scrollbar { display: none; }
.mvs-slider-track figure { flex: 0 0 calc((100% - 80px) / 3); scroll-snap-align: start; }
.mvs-slider-dots { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.mvs-slider-dots button {
	width: 14px; height: 14px; padding: 0; border-radius: 50%;
	border: 1px solid var(--mvs-blue); background: transparent; cursor: pointer;
}
.mvs-slider-dots button.is-active { background: var(--mvs-gold); border-color: var(--mvs-gold); }
@media (max-width: 1100px) { .mvs-below { padding: 0; } }
@media (max-width: 991px) {
	.mvs-below { margin-top: 50px; }
	.mvs-slider-track { gap: 20px; }
	.mvs-slider-track figure { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 560px) {
	.mvs-photorow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.mvs-slider-track figure { flex-basis: 100%; }
}
