/*
Theme Name: Die Maltante
Description: Theme für die Malkurse der Maltante. Kurse werden im Menü „Kurse“ gepflegt, vergangene Termine verschwinden automatisch.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: die-maltante
*/

.wp-site-blocks > *, .wp-site-blocks > main > * { margin-block: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

.m-kante { position: relative; }
.m-kante::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -27px; height: 28px;
  background: inherit;
  -webkit-mask: url(assets/kante.svg) center / 1600px 28px repeat-x;
  mask: url(assets/kante.svg) center / 1600px 28px repeat-x;
}
/* Aufeinanderfolgende Kanten versetzt, damit sie nicht gleich aussehen. */
.m-band.m-kante::before { -webkit-mask-position: -520px 0; mask-position: -520px 0; }
.m-kontakt.m-kante::before { -webkit-mask-position: -1100px 0; mask-position: -1100px 0; }

/* Kopf */
header.wp-block-template-part { position: sticky; top: 0; z-index: 20; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 0; } }
.m-kopf {
  background: var(--wp--preset--color--petrol);
  padding: 14px clamp(16px, 5vw, 64px);
  color: #fff;
}
.m-kopf .m-logo { margin: 0; }
.m-kopf .m-logo img { width: clamp(150px, 18vw, 200px); height: auto; display: block; }
.m-kopf a { color: #fff; text-decoration: none; font-weight: 600; }
.m-kopf a:hover { color: var(--wp--preset--color--mint); }

/* Startbild */
.m-hero.wp-block-cover { padding: clamp(32px, 6vw, 72px) clamp(16px, 5vw, 64px) clamp(64px, 9vw, 104px); align-items: flex-end; justify-content: center; }
.m-hero .wp-block-cover__background {
  background: linear-gradient(to top, rgba(15, 76, 69, .9), rgba(15, 76, 69, .5) 60%, rgba(15, 76, 69, .08)) !important;
  opacity: 1 !important;
}
.m-hero .wp-block-cover__inner-container { width: min(100%, 860px); margin: 0 auto; text-align: center; }
.m-hero .wp-block-image { margin: 0 auto; }
.m-hero .wp-block-image img { display: block; width: 100%; height: auto; }
.m-hero .m-schrift-gross { width: min(100%, 760px); }
.m-hero .m-schrift-klein { width: min(62%, 430px); margin-top: 14px; }
.m-hero .m-unterzeile { margin: 28px 0 0; font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; color: #fff; }

/* Kurse */
.m-kurse { background: var(--wp--preset--color--creme); padding: clamp(64px, 9vw, 112px) clamp(16px, 5vw, 64px); }
.m-kurse h2 { margin: 0 0 clamp(28px, 4vw, 48px); }
.m-kursliste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}
.m-kurs { background: #fff; display: flex; flex-direction: column; box-shadow: 0 16px 40px rgba(15, 76, 69, .12); }
.m-kurs__bild { position: relative; }
.m-kurs__bild img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.m-kurs__datum {
  position: absolute; left: clamp(16px, 3vw, 28px); bottom: -28px;
  width: 104px; padding: 10px 8px 12px;
  background: var(--wp--preset--color--rot); color: #fff;
  text-align: center; line-height: 1.1;
  rotate: -3deg;
}
.m-kurs__tag { display: block; font-size: .875rem; font-weight: 600; }
.m-kurs__zahl { display: block; font-size: 2.75rem; font-weight: 800; line-height: 1; margin: 2px 0; }
.m-kurs__monat { display: block; font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.m-kurs__text { padding: 48px clamp(20px, 3vw, 32px) clamp(24px, 3vw, 32px); }
.m-kurs__text h3 { margin: 0 0 10px; color: var(--wp--preset--color--petrol); font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.m-kurs__beschreibung p { margin: 0 0 20px; }
.m-kurs dl { margin: 0 0 24px; border-top: 1px solid var(--wp--preset--color--mint); }
.m-kurs dl div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--mint); }
.m-kurs dt { font-weight: 700; color: var(--wp--preset--color--petrol); }
.m-kurs dd { margin: 0; }
.m-kurs__preis { font-weight: 800; }
.m-knopf {
  display: inline-block; padding: 13px 28px;
  background: var(--wp--preset--color--rot); color: #fff !important;
  font-weight: 700; text-decoration: none;
  border-radius: 3px 16px 4px 14px;
  transition: background-color .15s;
}
.m-knopf:hover { background: #a31016; }
.m-keine-kurse { font-size: 1.25rem; }
.m-kurs { scroll-margin-top: 100px; }
.m-kurs__plaetze { margin: -8px 0 20px; font-weight: 700; color: var(--wp--preset--color--petrol); }
.m-kurs__plaetze--voll { color: var(--wp--preset--color--rot); }

/* Buchung */
.m-meldung { margin: 0 0 20px; padding: 12px 16px; border-left: 5px solid; font-weight: 600; }
.m-meldung--ok { background: var(--wp--preset--color--mint); border-color: var(--wp--preset--color--petrol); color: var(--wp--preset--color--petrol); }
.m-meldung--fehler { background: #fde3e3; border-color: var(--wp--preset--color--rot); color: #7d0e12; }
.m-buchen summary { list-style: none; cursor: pointer; }
.m-buchen summary::-webkit-details-marker { display: none; }
.m-buchen[open] summary { display: none; }
.m-buchen__form p { margin: 0 0 14px; }
.m-buchen__form label { display: block; font-weight: 700; color: var(--wp--preset--color--petrol); margin-bottom: 4px; }
.m-buchen__form label span { font-weight: 400; color: var(--wp--preset--color--tinte); }
.m-buchen__form input[type="text"], .m-buchen__form input[type="email"], .m-buchen__form input[type="tel"],
.m-buchen__form select, .m-buchen__form textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  font: inherit; font-size: 1rem; color: inherit; background: #fff;
  border: 2px solid var(--wp--preset--color--mint); border-radius: 3px;
}
.m-buchen__form select { width: auto; min-width: 90px; }
.m-buchen__form :is(input, select, textarea):focus { outline: none; border-color: var(--wp--preset--color--petrol); }
.m-buchen__zustimmung label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: inherit; font-size: .9375rem; line-height: 1.45; }
.m-buchen__zustimmung input { margin-top: 4px; accent-color: var(--wp--preset--color--petrol); flex: none; }
.m-buchen__hinweis { font-size: .9375rem; }
.m-buchen__form button.m-knopf { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.m-buchen__honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Farbband */
.m-band {
  background: var(--wp--preset--color--rot);
  color: #fff;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 5vw, 64px);
  text-align: center;
}
.m-band p { margin: 0; font-size: clamp(1.75rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }

/* Kontakt */
.m-kontakt {
  background: var(--wp--preset--color--petrol);
  color: #fff;
  padding: clamp(64px, 9vw, 112px) clamp(16px, 5vw, 64px);
  scroll-margin-top: 60px;
}
.m-kontakt__innen { align-items: center; gap: clamp(32px, 6vw, 72px); margin: 0 auto; }
.m-kontakt .wp-block-column:first-child { flex-basis: 280px !important; flex-grow: 0; }
.m-kontakt .m-portrait { margin: 0; }
.m-kontakt .m-portrait img { display: block; width: 100%; height: auto; border: 8px solid #fff; rotate: -3deg; }
.m-kontakt h2 { color: #fff; margin: 0 0 12px; }
.m-kontakt p { margin: 0 0 8px; }
.m-kontakt .m-weg { font-size: clamp(1.125rem, 2.4vw, 1.5rem); font-weight: 600; overflow-wrap: anywhere; }
.m-kontakt a { color: var(--wp--preset--color--mint); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.m-kontakt a:hover { color: #fff; }

/* Fuss */
.m-fuss {
  background: var(--wp--preset--color--tinte);
  color: #fff;
  padding: 24px clamp(16px, 5vw, 64px);
  font-size: 1rem;
}
.m-fuss p { margin: 0; }
.m-fuss a { color: #fff; }

/* Einfache Seiten */
.m-seite { padding: clamp(40px, 6vw, 72px) clamp(16px, 5vw, 64px) clamp(64px, 8vw, 96px); min-height: 60vh; }
.m-seite .wp-block-post-title { margin-bottom: 32px; }
mark.m-fehlt { background: #fde9a8; color: inherit; padding: 0 4px; }

@media (max-width: 781px) {
  .m-kontakt .wp-block-column:first-child { flex-basis: auto !important; max-width: 220px; }
  .m-kurs dl div { grid-template-columns: 64px 1fr; }
}
