/*
Theme Name: Ständla
Description: Theme für Ständla – Plattform für Flohmärkte, Kerwa und Märkte. Fei einfach organisiert. Keine externen Schriften, keine Fremddienste, mobil zuerst, barrierearm.
Version: 0.9.0
Author: Markus Hirn
Requires at least: 6.4
Requires PHP: 8.2
Text Domain: staendla-theme
*/

:root {
	--c-akzent: #047857; --c-akzent-dunkel: #064e3b; --c-akzent-hell: #dcf5e9;
	--c-warm: #d9480f; --c-text: #17211b; --c-muted: #4e5c54; --c-rand: #d6ddd8;
	--c-bg: #ffffff; --c-bg2: #f4f6f5;
	--radius: 14px; --max: 66rem;
	--font: "Archivo STDL", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-titel: "Archivo STDL", "Arial Narrow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.05rem; line-height: 1.6; color: var(--c-text); background: var(--c-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--c-akzent); }
a:hover { color: var(--c-akzent-dunkel); }
:focus-visible { outline: 3px solid #34d399; outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-titel); font-stretch: 87.5%; line-height: 1.12; letter-spacing: -.005em; margin: 1.4em 0 .5em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-top: .3em; font-weight: 800; }
h2 { font-size: 1.45rem; }
code { background: var(--c-bg2); padding: .1em .35em; border-radius: 4px; font-size: .9em; word-break: break-all; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-akzent); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Kopf */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--c-rand); }
.site-header__in { max-width: var(--max); margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.site-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--c-text); font-family: var(--font-titel); font-stretch: 87.5%; font-weight: 800; font-size: 1.35rem; }
.site-brand img { height: 36px; width: auto; }
/* Wortmarke Ständla */
.marke__symbol { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.marke { display: inline-flex; flex-direction: column; line-height: 1; }
.marke__wort { font-family: var(--font-titel); font-stretch: 87.5%; font-weight: 800; font-size: 1.6rem; color: var(--c-akzent-dunkel); }
.marke__zeile { font-size: .66rem; font-weight: 600; color: var(--c-muted); margin-top: .2rem; white-space: nowrap; }
@media (max-width: 1100px) { .marke__zeile { display: none; } }
@media (max-width: 480px) { .site-konto--gast .site-konto__cta { display: none; } }
.hero__marke { margin: 0 0 .6rem; font-family: var(--font-titel); font-stretch: 87.5%; font-weight: 800; font-size: 1.3rem; color: #fff; }
.hero__marke span { font-family: var(--font); font-stretch: normal; font-weight: 500; font-size: .95rem; color: #ecfdf5; }
.hero__slogan { display: block; margin-top: .5rem; color: #fff1e8; font-weight: 700; }
.site-brand__mark { width: 36px; height: 32px; border-radius: 8px; background: var(--c-akzent); display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 2px var(--c-akzent), inset 0 0 0 3.5px rgba(255,255,255,.9); }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .6rem; border-radius: 8px; text-decoration: none; color: var(--c-text); font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--c-akzent-hell); color: var(--c-akzent-dunkel); }
.site-nav .nav-cta > a { background: var(--c-akzent); color: #fff; }
.site-nav .nav-cta > a:hover { background: var(--c-akzent-dunkel); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--c-rand); border-radius: 8px; padding: .5rem .7rem; font: inherit; font-weight: 600; min-height: 44px; cursor: pointer; color: var(--c-text); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Kontobereich rechts, abgesetzt von der Inhaltsnavigation */
.site-konto { position: relative; display: flex; align-items: center; gap: .4rem; padding-left: 1rem; border-left: 1px solid var(--c-rand); flex: none; }
.site-konto__login { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .7rem; border-radius: 8px; text-decoration: none; color: var(--c-text); font-weight: 600; }
.site-konto__login:hover { background: var(--c-akzent-hell); color: var(--c-akzent-dunkel); }
.site-konto__cta { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; text-decoration: none; background: var(--c-akzent); color: #fff; font-weight: 700; }
.site-konto__cta:hover { background: var(--c-akzent-dunkel); color: #fff; }
.site-konto__knopf { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .25rem .6rem .25rem .3rem; border: 1px solid var(--c-rand); border-radius: 999px; background: #fff; font: inherit; font-weight: 600; color: var(--c-text); cursor: pointer; max-width: 15rem; }
.site-konto__knopf:hover, .site-konto__knopf[aria-expanded="true"], .site-konto__knopf.is-aktiv { border-color: var(--c-akzent); background: var(--c-akzent-hell); }
.site-konto__kreis { width: 34px; height: 34px; border-radius: 50%; background: var(--c-akzent); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800; letter-spacing: .02em; flex: none; }
.site-konto__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-konto__pfeil { flex: none; color: var(--c-muted); }
.site-konto__menue { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 15rem; background: #fff; border: 1px solid var(--c-rand); border-radius: 12px; box-shadow: 0 12px 32px rgba(23,33,27,.14); padding: .5rem; z-index: 60; }
.site-konto__wer { margin: .2rem .6rem .5rem; font-size: .88rem; color: var(--c-muted); line-height: 1.35; }
.site-konto__wer strong { color: var(--c-text); word-break: break-word; }
.site-konto__menue ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-rand); padding-top: .3rem; }
.site-konto__menue a { display: flex; align-items: center; min-height: 42px; padding: .3rem .6rem; border-radius: 8px; text-decoration: none; color: var(--c-text); font-weight: 600; }
.site-konto__menue a:hover, .site-konto__menue a:focus-visible { background: var(--c-akzent-hell); color: var(--c-akzent-dunkel); }
.site-konto__menue .site-konto__ab { margin-top: .3rem; border-top: 1px solid var(--c-rand); border-radius: 0 0 8px 8px; color: var(--c-muted); font-weight: 500; }
@media (max-width: 960px) {
	.nav-toggle { display: inline-block; order: 3; }
	.site-konto { order: 2; margin-left: auto; padding-left: 0; border-left: 0; }
	.site-nav { display: none; width: 100%; margin: 0; order: 4; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-header__in { flex-wrap: wrap; gap: .5rem; }
	.site-konto__name, .site-konto__pfeil { display: none; }
	.site-konto__knopf { padding: .25rem; }
	.site-konto--gast .site-konto__login { padding: .4rem .5rem; }
}
@media (max-width: 400px) { .site-brand > span:last-child { font-size: 1.15rem; } .site-konto__cta { padding: .4rem .8rem; } }

/* Inhalt */
.site-main { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem 3rem; }
.entry-header .entry-meta { color: var(--c-muted); font-size: .95rem; }
.hero { position: relative; background: var(--c-akzent); color: #fff; border-radius: var(--radius); padding: 2.2rem 1.8rem 2rem; margin: .8rem 0 1.6rem; overflow: hidden; }
.hero__bild { position: absolute; right: 0; top: 0; height: 100%; width: 44%; pointer-events: none; }
.hero__inhalt { position: relative; max-width: 58%; }
@media (max-width: 760px) { .hero__bild { opacity: .13; width: 100%; } .hero__inhalt { max-width: none; } }
.hero h1 { margin: 0 0 .6rem; color: #fff; max-width: 15ch; }
.hero p { margin: 0 0 1.3rem; font-size: 1.15rem; color: #dcf5e9; max-width: 38rem; }
.hero .stdl-btn { background: #fff; color: var(--c-akzent) !important; border-color: #fff; }
.hero .stdl-btn:hover { background: #dcf5e9; border-color: #dcf5e9; }
.hero .stdl-btn--sekundaer { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.8); }
.hero .stdl-btn--sekundaer:hover { background: rgba(255,255,255,.12); }
.hero .stdl-btn { margin-right: .4rem; }
.vorteile { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin: 1.4rem 0; padding: 0; list-style: none; }
.vorteile li { border-top: 3px solid var(--c-akzent); padding: .9rem .2rem; }
.vorteile strong { display: block; margin-bottom: .2rem; }
.vorteile svg { width: 28px; height: 28px; color: var(--c-akzent); margin-bottom: .4rem; }

/* Plugin-Elemente an das Theme angleichen */
.stdl { max-width: none; }
.stdl-map { border-radius: var(--radius); }
.stdl-liste > li { padding: .9rem .2rem; }
.stdl-karte-item a { font-size: 1.1rem; }

/* Fuß */
.site-footer { border-top: 1px solid var(--c-rand); background: var(--c-bg2); margin-top: 2rem; }
.site-footer__in { max-width: var(--max); margin: 0 auto; padding: 1.6rem 1rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; font-size: .95rem; color: var(--c-muted); }
.site-footer ul { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer a { color: var(--c-muted); }
.site-footer a:hover { color: var(--c-akzent-dunkel); }
.site-footer__herz { flex-basis: 100%; text-align: center; font-size: .9rem; color: var(--c-muted); padding-top: .8rem; border-top: 1px solid var(--c-rand); }
.site-footer__herz .herz { color: #d1242f; font-size: 1.05em; display: inline-block; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .site-footer__herz:hover .herz { animation: stdlt-puls .8s ease-in-out 2; } }
@keyframes stdlt-puls { 50% { transform: scale(1.25); } }

/* Standardinhalte */
.entry-content > *:first-child { margin-top: 0; }
.wp-block-image { margin: 1rem 0; }
.page-links, .post-navigation { margin: 1rem 0; }
@media print { .site-header, .site-footer, .nav-toggle { display: none; } }
