/*
Theme Name: Pro Dalmazi
Theme URI: https://dalmazipark.ch
Author: Verein Pro Dalmazi
Description: Block-Theme für den Verein Pro Dalmazi – Freiraum im Dalmazipark / Schwanenmätteli, Bern. Petrol aus dem Logo, Aare-Türkis, Herbstlaub-Akzent und die Slackline als Leitmotiv. Mit eigenen Formularen (Kontakt, Mitgliedschaft) ohne Plugin.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prodalmazi
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
img { height: auto; }
a { text-underline-offset: 3px; }
:where(.wp-site-blocks) > main { margin-block-start: 0; }

/* ---------- Logo (Kopf- und Fusszeile) ---------- */
.pd-logo { display: inline-flex; align-items: center; gap: .45em; text-decoration: none !important; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--display); font-size: 1.7rem; line-height: 1; }
.pd-logo__pro { background: var(--wp--preset--color--teal); color: #fff; font-weight: 700; padding: .18em .45em .14em; }
.pd-logo__name { font-weight: 500; }
.pd-footer .pd-logo { color: #fff; }

/* ---------- Kopfzeile ---------- */
.pd-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .pd-header { top: var(--wp-admin--admin-bar--height, 32px); }
.pd-header .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); }
.pd-header .current-menu-item > .wp-block-navigation-item__content,
.pd-header .wp-block-navigation-item__content[aria-current="page"] { color: var(--wp--preset--color--teal); box-shadow: inset 0 -2px 0 var(--wp--preset--color--teal); }
.pd-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper); }

/* ---------- Block-Stil: Kicker (Absatz) ---------- */
.is-style-kicker {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: .9rem;
	color: var(--wp--preset--color--teal);
	margin-bottom: .25rem !important;
}
.has-teal-background-color .is-style-kicker,
.wp-block-cover .is-style-kicker { color: var(--wp--preset--color--aare); }

/* ---------- Block-Stil: Claim (Absatz) ---------- */
.is-style-claim {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.7rem;
	line-height: 1.2;
	color: var(--wp--preset--color--teal);
	border-left: 6px solid var(--wp--preset--color--leaf);
	padding-left: 1rem;
}

/* ---------- Hero (Cover) ---------- */
.pd-hero .wp-block-cover__inner-container > h1,
.pd-hero .wp-block-cover__inner-container > p:not(.is-style-kicker) { margin-left: max(0px, calc((100% - 1180px) / 2)) !important; }
.pd-hero h1 { max-width: 14ch; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.pd-hero h1 em { font-style: normal; color: var(--wp--preset--color--aare); }
.pd-hero .is-style-kicker { text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.pd-hero p:not(.is-style-kicker) { max-width: 46ch; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: inherit; border-color: currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(127,127,127,.12); color: inherit; }

/* ---------- Block-Stil: Slackline (Trennlinie) ---------- */
.wp-block-separator.is-style-slackline {
	border: 0 !important;
	height: 48px;
	max-width: none !important;
	width: 100% !important;
	opacity: 1;
	background: var(--wp--preset--color--teal) !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q600 46 1200 6' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q600 46 1200 6' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ---------- Block-Stil: Presse-Liste (Liste) ----------
   Eintrag:  <strong>Okt · Der Bund</strong> <a>Titel</a> <code>Dalmazi</code> <em>Kolumne</em>  */
.is-style-press { list-style: none; padding: 0 !important; margin: 0; }
.is-style-press li { position: relative; padding: .5rem 0 .5rem 11.5rem; border-bottom: 1px solid var(--wp--preset--color--line); line-height: 1.35; }
.is-style-press li:last-child { border-bottom: 0; }
.is-style-press li strong { position: absolute; left: 0; top: .55rem; width: 11rem; font-weight: 400; font-size: .9rem; color: var(--wp--preset--color--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-style-press li a { color: var(--wp--preset--color--ink); text-decoration: none; }
.is-style-press li a:hover { color: var(--wp--preset--color--teal); text-decoration: underline; }
.is-style-press code, .is-style-press em,
.pd-tag {
	display: inline-block; margin-left: .35rem; font-family: var(--wp--preset--font-family--body); font-style: normal;
	font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
	padding: .05rem .4rem; border-radius: 2px; vertical-align: .12em;
	background: var(--wp--preset--color--aare-light); color: var(--wp--preset--color--teal-dark);
}
.is-style-press code, .pd-tag--dalmazi { background: var(--wp--preset--color--leaf); color: var(--wp--preset--color--ink); }

/* Jahresblock im Medienspiegel */
.pd-year { border-top: 2px solid var(--wp--preset--color--ink); padding-top: .6rem; margin-top: var(--wp--preset--spacing--40) !important; }
.pd-year > .wp-block-column:first-child { flex: 0 0 auto !important; min-width: 5.5rem; }
.pd-year h3 { color: var(--wp--preset--color--leaf); margin: 0; white-space: nowrap; font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.6rem) !important; line-height: 1; }

/* ---------- Block-Stil: Linkliste (Liste) ----------
   Eintrag:  <a>Titel</a> Quelle · Datum  */
.is-style-links { list-style: none; padding: 0 !important; margin: 0; font-size: 1rem; color: var(--wp--preset--color--muted); }
.is-style-links li { padding: .45rem 0; border-bottom: 1px solid var(--wp--preset--color--line); line-height: 1.35; font-size: .88rem; }
.is-style-links li a { display: block; font-size: 1rem; font-weight: 600; color: var(--wp--preset--color--ink); text-decoration: none; }
.is-style-links li a:hover { color: var(--wp--preset--color--teal); }

/* ---------- Block-Stil: Dokumentkarte (Gruppe) ---------- */
.is-style-doc { position: relative; border: 1px solid var(--wp--preset--color--line); border-radius: 4px; transition: border-color .15s, transform .15s; }
.is-style-doc:hover { border-color: var(--wp--preset--color--teal); transform: translateY(-2px); }
.is-style-doc > * { margin: 0 !important; }
.is-style-doc > * + * { margin-top: .3rem !important; }
.is-style-doc a { color: inherit; text-decoration: none; }
.is-style-doc a::after { content: ""; position: absolute; inset: 0; }
.is-style-doc .pd-doc-type { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--leaf); }
.is-style-doc.has-teal-background-color .pd-doc-type { color: var(--wp--preset--color--aare); }

/* ---------- Block-Stil: Logowand (Gruppe) ---------- */
.is-style-logos .wp-block-image { margin: 0; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 4px; aspect-ratio: 3 / 2; display: grid !important; place-items: center; padding: 1rem; }
.is-style-logos .wp-block-image img { max-height: 70px; width: auto !important; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .2s, opacity .2s; }
.is-style-logos .wp-block-image a:hover img { filter: none; opacity: 1; }

/* ---------- Vorstand ---------- */
.pd-person img { width: 180px !important; height: 180px !important; border-radius: 50% !important; object-fit: cover; border: 6px solid var(--wp--preset--color--aare-light); }
.pd-person .wp-block-image { margin-inline: auto; }

/* ---------- Icons in «Was im Park passiert» ---------- */
.pd-icon svg { width: 40px; height: 40px; color: var(--wp--preset--color--teal); display: block; }

/* ---------- Galerie ---------- */
.wp-block-gallery.pd-gallery .wp-block-image img { aspect-ratio: 1; object-fit: cover; }

/* ---------- Formulare ---------- */
.pd-form { scroll-margin-top: 110px; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 4px; padding: clamp(1.25rem, 4vw, 2.5rem); }
.pd-form h3 { margin-top: 0; }
.pd-form .pd-field { margin-top: 1rem; }
.pd-form label, .pd-form legend { display: block; font-weight: 600; margin-bottom: .3rem; }
.pd-form .pd-req { color: var(--wp--preset--color--leaf); }
.pd-form input[type=text], .pd-form input[type=email], .pd-form input[type=tel], .pd-form textarea, .pd-form select {
	width: 100%; box-sizing: border-box; padding: .7rem .8rem; border: 1px solid var(--wp--preset--color--line); border-radius: 4px;
	font: inherit; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink);
}
.pd-form input:focus, .pd-form textarea:focus, .pd-form select:focus { outline: 2px solid var(--wp--preset--color--teal); outline-offset: 1px; background: #fff; }
.pd-form fieldset { border: 0; padding: 0; margin: 1rem 0 0; }
.pd-form .pd-choices { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.pd-form .pd-choices label, .pd-form .pd-consent label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.pd-form input[type=radio], .pd-form input[type=checkbox] { accent-color: var(--wp--preset--color--teal); width: 1.1rem; height: 1.1rem; margin-top: .25rem; flex: none; }
.pd-form .pd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.pd-form .pd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pd-form .pd-consent { margin-top: 1.2rem; font-size: .95rem; }
.pd-form button {
	margin-top: 1.4rem; cursor: pointer; border: 2px solid var(--wp--preset--color--leaf); border-radius: 4px;
	background: var(--wp--preset--color--leaf); color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; padding: .75rem 1.4rem;
}
.pd-form button:hover { background: #f09b52; }
.pd-notice { padding: .9rem 1.1rem; border-radius: 4px; margin-bottom: 1rem; font-weight: 600; }
.pd-notice--ok { background: var(--wp--preset--color--aare-light); color: var(--wp--preset--color--teal-dark); }
.pd-notice--error { background: #fbe3d0; color: #7a3b0c; }

/* ---------- Fusszeile ---------- */
.pd-footer { color: #cfd8d6; font-size: 1rem; }
.pd-footer a { color: #fff; }
.pd-footer h4 { color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: 1.05rem; }
.pd-footer ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
.pd-footer .pd-footer-bottom { border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.is-style-press li { padding-left: 0; }
	.is-style-press li strong { position: static; display: block; width: auto; }
	.pd-form .pd-row { grid-template-columns: 1fr; }
	.pd-logo { font-size: 1.4rem; }
}
