/*
Theme Name: it64 H+S Montagen
Theme URI: https://www.h-s-montagen.ch
Author: it64 GmbH
Description: Schlankes Theme für H+S Montagen GmbH. Nachbau des bisherigen Auftritts (Kopf mit Logo und orangem Menü, dunkle Fusszeile), Inhalte im Standard-Editor. Schrift PT Sans (SIL Open Font License) lokal eingebunden.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: it64-hsm
*/

/* ---------- Grundlagen ---------- */
:root {
	--hsm-text: #747474;
	--hsm-dunkel: #333333;
	--hsm-akzent: #e9a825;
	--hsm-orange: #ed7d31;
	--hsm-hover: #0071bc;
	--hsm-zeile: 1100px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--hsm-text);
	font-family: "PT Sans", Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.38;
	font-weight: 400;
}
img { max-width: 100%; height: auto; }
a { color: var(--hsm-dunkel); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--hsm-akzent); }
p { margin: 0 0 20px; }
strong, b { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { color: var(--hsm-dunkel); font-weight: 700; font-family: "PT Sans", Arial, Helvetica, sans-serif; }
h1 { font-size: 34px; line-height: 1.41; margin: .67em 0; }
h2 { font-size: 18px; line-height: 1.5; margin: 0 0 1.1em; }
h3 { font-size: 16px; line-height: 1.5; margin: 1em 0; }
h4 { font-size: 13px; line-height: 1.54; margin: 1.33em 0; }
h5 { font-size: 12px; line-height: 1.5; margin: 1.67em 0; }
h6 { font-size: 11px; line-height: 1.55; margin: 2.33em 0; }
/* Wie bisher (eigenes CSS der Website): Zwischentitel H2 im Inhalt sind weiss. */
.post-content h2 { color: #fff; }
.post-content h3.has-medium-font-size, .post-content h3[style*="font-size"] { line-height: 1.5; margin: 20px 0; }
.post-content ul, .post-content ol { margin: 16px 0; }
.post-content iframe { max-width: 100%; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.hsm-sprung:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 10px; top: 10px; z-index: 100000; background: #fff; padding: 10px 15px; }

.hsm-zeile { max-width: var(--hsm-zeile); margin: 0 auto; }

/* ---------- Kopf ---------- */
.hsm-kopf { background: #fff; padding: 30px; }
.hsm-kopf-innen { display: flex; align-items: flex-start; justify-content: space-between; }
.hsm-logo { display: block; line-height: 0; }
.hsm-logo-bild { display: block; width: 300px; height: auto; max-width: 100%; }
.hsm-mobil-icons { display: none; }
.hsm-icon { background: none; border: 0; padding: 0; margin: 0 0 0 20px; color: #dadada; cursor: pointer; line-height: 0; }
.hsm-icon:hover { color: var(--hsm-akzent); }
.hsm-icon svg { display: block; }

/* ---------- Hauptmenü (Desktop) ---------- */
.hsm-nav { background: #fff; padding: 15px 30px; position: sticky; top: 0; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.hsm-nav.ist-fixiert { background: rgba(255, 255, 255, .97); }
.hsm-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.hsm-menu > li { position: relative; padding: 0 15px 0 0; }
.hsm-menu > li > a {
	display: block; height: 43px; line-height: 39px; padding: 0 10px;
	font-size: 18px; font-weight: 400; color: #fff; white-space: nowrap;
	background: var(--hsm-orange); border: 2px solid var(--hsm-orange);
	transition: none;
}
.hsm-menu > li > a:hover, .hsm-menu > li:hover > a { color: var(--hsm-hover); }
.hsm-menu > li.current-menu-item > a, .hsm-menu > li.current_page_item > a,
.hsm-menu > li.current-menu-ancestor > a, .hsm-menu > li.current-menu-parent > a,
.hsm-menu > li.current_page_ancestor > a { font-weight: 700; color: #fff; }
.hsm-menu .sub-menu, .hsm-menu .children {
	list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: 100%; width: 180px; z-index: 60;
	background: #f2efef; border-top: 3px solid var(--hsm-akzent); box-shadow: 1px 1px 30px rgba(0, 0, 0, .06);
	visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility .2s ease;
}
.hsm-menu li:hover > .sub-menu, .hsm-menu li:focus-within > .sub-menu,
.hsm-menu li:hover > .children, .hsm-menu li:focus-within > .children { visibility: visible; opacity: 1; }
.hsm-menu .sub-menu li, .hsm-menu .children li { position: relative; }
.hsm-menu .sub-menu a, .hsm-menu .children a {
	display: block; padding: 7px 20px; font-size: 16px; line-height: 22.08px; color: #fff;
	background: darkgrey; border-bottom: 1px solid #bfbfbf;
}
.hsm-menu .sub-menu a:hover, .hsm-menu .children a:hover { color: #fff; background: #9a9a9a; }
.hsm-menu .sub-menu .sub-menu { left: 100%; top: -3px; }

/* ---------- Handymenü + Suche ---------- */
.hsm-mobilnav[hidden], .hsm-suche[hidden] { display: none !important; }
.hsm-mobilnav { margin: 0 -30px; }
.hsm-mobilmenu, .hsm-mobilmenu ul { list-style: none; margin: 0; padding: 0; }
.hsm-mobilmenu li { position: relative; font-size: 12px; }
.hsm-mobilmenu a {
	display: block; height: 35px; line-height: 35px; padding: 0 12px 0 30px; color: #333; font-size: 12px;
	background: #f9f9f9; border-bottom: 1px solid #dadada; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hsm-mobilmenu { box-shadow: 0 -1px 0 #e5e5e5; }
.hsm-mobilmenu li.current-menu-item > a, .hsm-mobilmenu li.current_page_item > a, .hsm-mobilmenu a:hover { background: #f6f6f6; color: #333; }
.hsm-mobilmenu .sub-menu a, .hsm-mobilmenu .children a { padding-left: 39px; }
.hsm-mobilmenu .sub-menu, .hsm-mobilmenu .children { display: none; }
.hsm-mobilmenu li.ist-offen > .sub-menu, .hsm-mobilmenu li.ist-offen > .children { display: block; }
.hsm-unter-knopf {
	position: absolute; right: 0; top: 0; width: 50px; height: 35px; padding: 0 35px 0 0; border: 0; background: none;
	color: #333; cursor: pointer; display: flex; align-items: center; justify-content: flex-end;
}
.hsm-unter-knopf svg { transition: transform .2s ease; width: 12px; height: 12px; flex: none; }
.hsm-unter-knopf[aria-expanded="true"] svg { transform: rotate(180deg); }
.hsm-suche { padding: 15px 0 0; }
.hsm-suche form { display: flex; gap: 8px; }
.hsm-suche input[type="search"] { flex: 1; height: 33px; padding: 0 10px; border: 1px solid #d2d2d2; background: #fff; color: #333; font: inherit; }
.hsm-suche input[type="submit"] { height: 33px; padding: 0 15px; border: 0; background: var(--hsm-akzent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Inhalt ---------- */
.hsm-main { background: #fff; padding: 55px 30px 40px; }
.home .hsm-main { padding: 0 0 55px; }
.hsm-startseite .post-content > *:last-child { margin-bottom: 0; }
.post-content::after { content: ""; display: table; clear: both; }
.post-content .wp-block-image, .post-content figure { max-width: 100%; }
.post-content .wp-block-columns { margin-bottom: 28px; }
.post-content figcaption { color: var(--hsm-text); }
.post-content .wp-block-image figcaption { font-size: 16px; line-height: 1.38; margin: 8px 0 16px; }
.post-content .has-small-font-size { line-height: 1.38; }
.post-content .has-medium-font-size { line-height: 1.38; }
.post-content table { border-collapse: collapse; }
.wp-block-separator { border: 0; border-top: 1px solid #e0dede; }
.hsm-abstand { height: 1px; }

/* Bildwechsler (Galerie-Stil «Bildwechsler»), wie die bisherige Diashow oben auf den Hausseiten */
.wp-block-gallery.is-style-it64-bildwechsel {
	display: grid !important; position: relative; margin: 0 0 30px !important; gap: 0 !important;
	grid-template-columns: 1fr; overflow: hidden;
}
.wp-block-gallery.is-style-it64-bildwechsel > figure.wp-block-image {
	grid-area: 1 / 1; width: 100% !important; margin: 0 !important; opacity: 0; visibility: hidden;
	transition: opacity .6s ease, visibility 0s linear .6s; z-index: 1; align-self: start;
}
.wp-block-gallery.is-style-it64-bildwechsel > figure.wp-block-image.ist-aktiv,
.wp-block-gallery.is-style-it64-bildwechsel:not(.ist-bereit) > figure.wp-block-image:first-child {
	opacity: 1; visibility: visible; transition: opacity .6s ease; z-index: 2;
}
.wp-block-gallery.is-style-it64-bildwechsel > figure.wp-block-image img {
	width: 100% !important; height: auto !important; object-fit: initial !important; display: block; flex: none !important;
}
.wp-block-gallery.is-style-it64-bildwechsel > figure.wp-block-image figcaption { display: none; }
.post-content .hsm-punkte, .hsm-punkte { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 0; list-style: none; text-align: center; line-height: 22.08px; z-index: 5; }
.hsm-punkte li { display: inline-block; margin: 0 6px; width: 11px; height: 11px; vertical-align: middle; line-height: 0; }
.hsm-punkte button {
	display: block; width: 11px; height: 11px; padding: 0; border: 0; border-radius: 20px; cursor: pointer;
	background: rgba(0, 0, 0, .5); box-shadow: inset 0 0 3px rgba(0, 0, 0, .3); text-indent: -9999px; overflow: hidden;
}
.hsm-punkte button:hover { background: rgba(0, 0, 0, .7); }
.hsm-punkte button.ist-aktiv { background: rgba(0, 0, 0, .9); }
.hsm-pfeil {
	position: absolute; top: 50%; margin-top: -20px; width: 30px; height: 30px; z-index: 5; border: 0; padding: 0; cursor: pointer;
	background: rgba(0, 0, 0, .5); color: #fff; opacity: 0; transition: opacity .3s ease; display: flex; align-items: center; justify-content: center;
}
.hsm-pfeil.zurueck { left: 0; }
.hsm-pfeil.weiter { right: 0; }
.wp-block-gallery.is-style-it64-bildwechsel:hover .hsm-pfeil { opacity: .8; }
.hsm-pfeil:hover { opacity: 1 !important; }

/* Grossansicht (Lightbox) */
.hsm-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .85); display: flex; align-items: center; justify-content: center; }
.hsm-lightbox[hidden] { display: none; }
.hsm-lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); box-shadow: 0 0 25px rgba(0, 0, 0, .5); background: #fff; }
.hsm-lightbox button { position: absolute; background: rgba(0, 0, 0, .4); color: #fff; border: 0; width: 44px; height: 44px; font-size: 26px; line-height: 44px; cursor: pointer; padding: 0; }
.hsm-lightbox .lb-zu { top: 12px; right: 12px; }
.hsm-lightbox .lb-zurueck { left: 12px; top: 50%; margin-top: -22px; }
.hsm-lightbox .lb-weiter { right: 12px; top: 50%; margin-top: -22px; }
@media (max-width: 800px) { .hsm-lightbox img { max-width: calc(100vw - 20px); } }

/* ---------- Formulare (Contact Form 7, wie bisher) ---------- */
#responsive-form { max-width: 1100px; margin: 0 auto; width: 100%; }
.form-row { width: 100%; }
.column-half, .column-full, .column-viertel { float: left; position: relative; padding: .65rem; width: 100%; }
.clearfix::after { content: ""; display: table; clear: both; }
@media only screen and (min-width: 48em) {
	.column-half { width: 50%; }
	.column-viertel { width: 25%; }
}
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form input[type="url"],
.wpcf7-form input[type="number"], .wpcf7-form input[type="date"], .wpcf7-form select, .wpcf7-form textarea,
.hsm-main input[type="text"], .hsm-main input[type="search"], .hsm-main select, .hsm-main textarea {
	background: #e9eaee; border: 0; border-radius: 0; color: #747474; font-family: "PT Sans", Arial, Helvetica, sans-serif; font-size: 16px;
}
.wpcf7-form .wpcf7-text, .wpcf7-form .wpcf7-email, .wpcf7-form .wpcf7-number, .wpcf7-form .wpcf7-date, .wpcf7-form .wpcf7-quiz, .wpcf7-form .wpcf7-tel, .wpcf7-form .wpcf7-url {
	display: inline-block; width: 100%; height: 40px; min-height: 40px; padding: 8px 15px; margin: 0 1% 0 0; vertical-align: middle;
}
.wpcf7-form select { height: 40px; padding: 0 10px; width: 100%; }
.wpcf7-form textarea { display: inline-block; width: 100%; height: 150px; padding: 8px 11px; margin: 0; vertical-align: middle; resize: vertical; }
.wpcf7-form input:focus, .wpcf7-form textarea:focus, .wpcf7-form select:focus { outline: 1px solid #d2d2d2; }
.wpcf7-form input[type="submit"], .wpcf7-form button[type="submit"] {
	display: inline-block; height: 32px; padding: 5px 15px; border: 1px solid var(--hsm-akzent); border-radius: 0;
	background: var(--hsm-akzent); color: #fff; font-family: "PT Sans", Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 700;
	line-height: normal; text-transform: uppercase; cursor: pointer; vertical-align: middle; transition: background .2s ease;
}
.wpcf7-form input[type="submit"]:hover, .wpcf7-form button[type="submit"]:hover { background: #d6ad5a; border-color: #d6ad5a; }
.wpcf7-form input[type="file"] { font-size: 16px; }

/* ---------- Fusszeile ---------- */
.hsm-fuss-widgets { background: #363839; border-top: 12px solid #e9eaee; padding: 43px 30px 40px; color: #8c8989; }
.hsm-fuss-spalten { display: flex; gap: 30px; }
.hsm-fuss-spalte { flex: 1 1 0; min-width: 0; }
.hsm-widget { margin: 0 0 50px; }
.hsm-widget:last-child { margin-bottom: 0; }
.hsm-widget p { margin: 16px 0; }
.hsm-widget > :first-child { margin-top: 0; }
.hsm-fuss h2, .hsm-fuss .hsm-widget-titel { color: #fff; font-size: 18px; line-height: 27px; font-weight: 700; margin: 0 0 19.8px; }
.hsm-fuss a { color: #bfbfbf; }
.hsm-fuss a:hover { color: #1e73be; }
.hsm-copyright { background: #282a2b; border-top: 1px solid #4b4c4d; padding: 18px 30px 16px; }
.hsm-copyright-text { font-size: 12px; line-height: 1.38; color: #8c8989; }
.hsm-copyright a { color: #bfbfbf; }

/* ---------- Handy / Tablet (wie bisher ab 800 px) ---------- */
@media (max-width: 800px) {
	.hsm-kopf { padding: 20px 30px; }
	.hsm-logo { max-width: 75%; }
	.hsm-logo-bild { width: auto; max-width: 100%; }
	.hsm-mobil-icons { display: flex; flex: 0 0 auto; }
	.hsm-nav { position: static; padding: 15px 30px; }
	.hsm-nav .hsm-menu { display: none; }
	h1 { font-size: 24px; line-height: 1.38233; margin: .67em 0; }
	/* wie bisher: Überschriften im Startseiten-Slider auf dem Handy 24 px */
	.ls-wp-container h1 { font-size: 24px !important; line-height: 33px !important; }
	.hsm-main article { margin-bottom: 50px; }
	.hsm-fuss-spalten { display: block; }
	.hsm-fuss-spalte { margin-bottom: 50px; }
	.hsm-copyright-text { text-align: center; }
}
