/*
Theme Name: Auenland TuPf
Description: Leichtes, barrierearmes, schnelles WP-Theme mit klassischem Template für volle Kontrolle.
Version: 1.0.0
Text Domain: auenland-tupf
*/

:root {
  --brand-green: #65b35b;
  --brand-green-800: #1e7b2e;
  --brand-blue: #5da2c3;
  --brand-blue-800: #0a5f91;
  --accent-green: #5fa84e;
  --accent-green-light: #bbe5b6;
  --accent-gree-medium: #b2d5ad;
  /* --bg:#caeefa;  sky */
  --bg:#9ccfe7; /* water */
  --bg-light: #e6f7ff;
  --focus: #ffbf47;
  --maxw: 1600px;
  --logo-h: 56px;
  --logo-h-sm: 40px;

  --text:#0b2630;
  --muted:#37545f;
  --shadow:0 8px 24px rgba(0,0,0,.12),0 2px 6px rgba(0,0,0,.08);
  --radius:14px;

}
/* 
@font-face {
  font-family: 'Drybrush';
  src: url('/wp-content/uploads/fonts/drybrush/drybrush-kv2wd-webfont.woff2') format('woff2'),
       url('/wp-content/uploads/fonts/drybrush/drybrush-kv2wd-webfont.woff') format('woff');
  font-weight: 100;
  font-style: normal;
  font-display: auto;
} */

::selection {
    background-color: var(--accent-green-light);
    color: black;
}

html {
  box-sizing: border-box;
  font-size: clamp(16px, 1.5vw + 0.5rem, 18px);
}
*, *::before, *::after {
  box-sizing: inherit;
}
html:focus-within {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  background: linear-gradient(180deg, var(--bg), var(--bg) 80%, var(--accent-gree-medium) 90%);
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
}
.wp-block-image img {
    box-sizing: border-box;
    height: auto;
    max-width: 100%;
    vertical-align: bottom;
    margin: auto;
    display: flex;
    border-radius: var(--radius);
    /* box-shadow: var(--shadow); */
    border: 4px solid var(--brand-green);
}

a {
  color: var(--brand-blue);
}
a:hover {
  color: var(--brand-blue-800);
}
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 1rem;
}

h1, h2 {
  font-family: 'Calibri';
  /* font-weight: 100; */
  margin-block-start: 0;
}

.page-legal h1,
.page-legal h2,
.page-legal h3,
.page-legal h4,
.page-legal h5,
.page-legal h6,
.page-legal .wp-block-heading {
  font-family: inherit;
  font-weight: 600;
}

.page-legal {
    background: #f2fbff;
}

.page-header {
    margin: auto;
    display: flex;
    justify-content: center;
    font-size: clamp(1rem, 4.2vw, 2rem);
}

h1 {
  position: relative;
  display: inline-block;
  /* color: var(--brand-green, #39b54a); */
  line-height: 1.1;
  padding-bottom: 0.3em;
  padding-top: 0.3em;
  margin-bottom: 0;
}

h1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2em;
  height: 0.4em;
  background-color: #42aa40;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M12 100 A12 12 0 0 1 12 76 C 220 36, 540 22, 988 76 A12 12 0 0 1 988 100 C 540 52, 220 148, 12 100 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M12 100 A12 12 0 0 1 12 76 C 220 36, 540 22, 988 76 A12 12 0 0 1 988 100 C 540 52, 220 148, 12 100 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
  transform: scaleX(1.06);
  transform-origin: center;
  will-change: transform;
  opacity: 0.6;
  z-index: -1; /* für hinter Text */
}

.border-blue{ border: 4px solid var(--brand-blue) }
.border-green{ border: 4px solid var(--brand-green) }

.textbox, .wp-block-image, .lx {
    margin: clamp(26px, 4vw, 47px) auto;
}

.textbox {
    background: #fff;
    border-radius: var(--radius);
    padding: clamp(18px, 4vw, 28px);
    box-shadow: var(--shadow);
    scroll-margin-top: 12vh;
    --icon-size: clamp(90px, 7vw, 120px);
    --icon-gap: clamp(10px, 2.2vw, 14px);
    position: relative;
    /* padding-left: calc(clamp(18px, 4vw, 28px) + var(--icon-size) + var(--icon-gap)); */
    min-height: calc(var(--icon-size) + 2 * clamp(18px, 4vw, 28px));
    padding: 1.8em !important;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.textbox ul {
    padding-left: 1.5em;
}

.textbox li {
    padding-bottom: 0.5em;
}

.haslogo::before {
    content: "";
    background: url(/wp-content/themes/auenland-tupf/assets/img/Weblogov2.webp);
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: 50%;
    z-index: 0;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    opacity: 0.05;
    mix-blend-mode: darken;
    top: 0;
    display: block;
    background-position: 50% calc(100% - min(3em, 50%));
    pointer-events: none;
  }


.waves {
    display: block;
    z-index: 1;
    position: relative;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: .5rem .75rem;
  z-index: 10000;
}

.site-header {
  background: transparent;
  color: var(--text);
}
.nav-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem;
}
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: clamp(.4rem, 1vw, .75rem);
  text-decoration: none;
  color: inherit;
}
.brand-logo-icon, 
.brand-logo-text {
  height: var(--logo-h);
  width: auto;
  max-width: 100%;
}

.hero {
  background: 
    radial-gradient(60rem 20rem at 70% -10%, rgba(255,255,255,.15), transparent),
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(0,0,0,.05));
  padding: clamp(2rem, 6vw, 4rem) 0;
  color: #0a2a3f;
}
.hero-inner {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2.2fr 1fr;
  align-items: center;
}
.hero h1 {
  margin: .2rem 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}
.hero p {
  margin: 0 0 1rem;
}

.button,
.wp-block-button__link {
  display: inline-block;
  background: var(--brand-green);
  color: #fff;
  text-decoration: none;
  border-radius: .6rem;
  padding: .55rem .9rem;
  font-weight: 600;
  border: 2px solid var(--brand-green);
}
.button:hover,
.wp-block-button__link:hover {
  background: var(--brand-green-800);
  border-color: var(--brand-green-800);
}
.button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* .section {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
} */

.section--alt {
  background: var(--muted);
}
.entry-content {
  padding: 0;
  padding-bottom: 2rem;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline: 4px dashed var(--brand-green);
  outline-offset: 3px;
  border-radius: 12px;
}

.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}
.site-nav .menu > li {
  margin: 0;
  display: inline-flex;
  justify-content: center;
  z-index: 1;
}
.site-nav .menu > li > a {
  display: inline-block;
  padding: .5rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-nav .menu > li > a:hover,
.site-nav .menu > li > a:focus {
  /* color: var(--brand-blue-800); */
}

.current-menu-item > a:hover,
.current-menu-item > a:focus {
  color: inherit !important;
}


.site-nav a[aria-current="page"],
.current-menu-item > a,
.current_page_item > a {
  color: var(--brand-green);
  font-weight: 600;
}
.site-nav .menu > .is-start,
.site-nav .menu > li:first-child {
  padding-right: clamp(12px, 2vw, 24px);
  border-right: 1px solid #e5e7eb;
}


@media (min-width: 901px) {
  /* Host für das Sliding-Highlight */
  .site-nav .menu {
    position: relative;
    z-index: 0;
    --u-h: 34px;    /* Default-Höhe: Pill */
  }

  /* Links über dem Highlight */
  .site-nav .menu > li > a {
    position: relative;
    z-index: 1;
  }

  /* Das Highlight (Pseudo-Element) */
  .site-nav .menu::after {
    content: "";
    position: absolute;
    left: 0;                 /* Bezug: Padding-Box der .menu */
    bottom: 3px;             /* Unterkante ausrichten */
    width: var(--u-w, 0px);  /* reale Breite -> runde Ecken bleiben sauber */
    height: var(--u-h, 34px);

    /* background: color-mix(in oklab, var(--brand-green), transparent 10%); */

    border: 4px solid color-mix(in oklab, var(--brand-green), transparent 10%);
    translate: 0 -1px;

    background: color-mix(in oklab, var(--accent-green-light), transparent 85%);

    border-radius: 17px;     /* „Pill“-Form */
    opacity: var(--u-opacity, 0);
    pointer-events: none;
    z-index: 0;

    /* Positions-Animation nur über die GPU */
    transform: translate3d(var(--u-x, 0px), 0, 0);

    /* Übergänge – auf JS-Timings abgestimmt */
    transition:
      height 120ms ease,
      transform 200ms cubic-bezier(0.2, 0.6, 0, 1),
      width 200ms cubic-bezier(0.2, 0.6, 0, 1),
      background-color 160ms ease,
      opacity 120ms ease;
    will-change: transform, width, height, opacity;
  }

  /* Dünne Unterstreichung nur bei Hover/Nicht-Navigation */
  .site-nav .menu.is-hovering:not(.is-navigating) { --u-h: 7px; }

  /* Initiales Setzen ohne Animation */
  .site-nav .menu.is-initializing::after { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav .menu::after { transition: none; }
}


.menu-item-has-children {
  position: relative;
}
.submenu-toggle {
  margin-left: .25rem;
  background: transparent;
  border: 2px solid #cbd5e1;
  color: var(--text);
  border-radius: .4rem;
  padding: .05rem .35rem;
  line-height: 1;
}
.sub-menu {
  position: absolute;
  left: 0;
  top: calc(100% + .4rem);
  min-width: 12rem;
  background: #fff;
  border-radius: .5rem;
  padding: .25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  display: none;
  z-index: 1000;
}
.sub-menu a {
  background: transparent;
  color: var(--text);
  border-radius: .35rem;
  display: block;
}
.sub-menu a:hover,
.sub-menu a:focus {
  background: var(--muted);
}
.menu-item-has-children[aria-expanded="true"] > .sub-menu {
  display: block;
}

.nav-toggle {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--text);
  border-radius: .5rem;
  padding: 0;
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle__bar {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .18s ease, opacity .12s ease, background-color .18s ease;
}
.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 5px;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Leichte Sprache toggle */

/* A11y helper */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* Bar */
.easy-lang-bar{
  bottom:auto;
  position: sticky;
  bottom: 0;
  display:flex;
  z-index:90;
  align-items:center;
  background:transparent;
}

/* Nur auf Leichte-Sprache-Seiten */
body.is-easy-page .easy-lang-bar{
  position:sticky;         /* oder fixed */
  left:0;
  right:0;
  bottom:0;
  justify-content:flex-end; /* rechts andocken */
  z-index:1000;
  pointer-events:none;      /* optional: nur Control klickbar */
  user-select: none;
}

body.is-easy-page .easy-lang-control{
  pointer-events:auto;
}

.easy-lang-inner{
  padding:.5rem 0;
  margin-right: 1em;
}

/* Control = Bubble (Grid: Icon + Panel), fährt nach links auf */
.easy-lang-control{
  box-sizing: border-box;
  display: inline-grid;
  grid-auto-flow: column;
  grid-template-columns: 44px 0fr;
  align-items: center;

  border: 2px solid #000;
  border-radius: 999px;
  background:#ffffff8a;
  backdrop-filter: blur(16px);

  /* geschlossen: Kreis über max-inline-size + min-block-size */
  max-inline-size: 56px;   /* Außenmaß Kreis */
  min-block-size: 56px;    /* Außenhöhe Kreis */

  padding: 0;              /* wichtig: sonst wird’s oval */
  overflow: clip;

  transition: max-inline-size 260ms ease, grid-template-columns 260ms ease, padding 260ms ease, background-color 260ms ease, opacity 260ms ease;
  will-change: max-inline-size, grid-template-columns, padding, background-color, opacity;

  /* margin-right: 1em; */

  opacity: 0.6;
}

.easy-lang-control[data-expanded="true"]{
  /* geöffnet: darf breit werden, bleibt rechts „angedockt“ */
  max-inline-size: min(100%, 720px);
  padding: 0 .6rem;
  grid-template-columns: 44px 1fr;
  opacity: 1;
}

/* Expander sauber quadratisch ohne Zusatzpadding */
.easy-lang-expander{
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
}

.easy-lang-expander:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
}

.easy-lang-control[data-expanded="false"] .easy-lang-expander{
  cursor: pointer;
}

/* Icon swap */
.easy-lang-icon{ display:none; }
body:not(.is-easy-page) .easy-lang-icon--off{ display:block; }
body.is-easy-page .easy-lang-icon--on{ display:block; }


.easy-lang-control[data-expanded="true"] .easy-lang-icon {
    margin-left: 0;
}
.easy-lang-icon{ 
  margin-left: 5px;
  transition: margin-left 180ms ease;
}

/* Panel (Text + Switch) */
.easy-lang-panel{
  display:inline-flex;
  align-items:center;
  /* gap:.6rem; */
  padding-left:.4rem;
  min-width:0;
  overflow:hidden;
}

.easy-lang-control[data-expanded="false"] .easy-lang-panel{
  opacity:0;
  transform:translateX(8px);
  pointer-events:none; /* nur visuell; Fokus wird via inert im JS verhindert */
}

.easy-lang-control[data-expanded="true"] .easy-lang-panel{
  opacity:1;
  transform:translateX(0);
}

body.is-easy-page .easy-lang-control[data-expanded="false"] {
  background-color: var(--accent-green-light);
}

/* Label */
.easy-lang-label{
  display:inline-block;
  white-space:nowrap;
}

/* Switch */
.easy-lang-switch{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  border:none;
  border-radius:999px;
  padding:.35rem .6rem;
  background:transparent;
  font:inherit;
  cursor:pointer;
}

.easy-lang-switch__track{
  width:44px;
  height:24px;
  background:#e5e7eb;
  border-radius:999px;
  position:relative;

  /* Animation */
  transition:background-color 180ms ease, box-shadow 180ms ease;
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.35);
}

.easy-lang-switch__thumb{
  width:18px;
  height:18px;
  background:#000;
  border-radius:999px;
  position:absolute;
  top:3px;
  left:3px;

  /* Animation */
  transition:transform 180ms cubic-bezier(.2,.85,.2,1), background-color 180ms ease;
  will-change:transform;
}

/* AN-Zustand */
.easy-lang-switch[aria-checked="true"] .easy-lang-switch__track{
  background:var(--accent-green-light);
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.45);
}
.easy-lang-switch[aria-checked="true"] .easy-lang-switch__thumb{
  transform:translateX(20px);
  background:#000; /* optional: #fff für mehr Kontrast auf Grün */
}

/* Optional: kleine Tap-Animation */
.easy-lang-switch:active .easy-lang-switch__thumb{
  transform:translateX(20px) scale(0.92);
}
.easy-lang-switch[aria-checked="false"]:active .easy-lang-switch__thumb{
  transform:scale(0.92);
}

/* Fokus */
.easy-lang-switch:focus-visible{
  outline:3px solid var(--focus, #0b5fff);
  outline-offset:2px;
  border-radius:999px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce){
  .easy-lang-control,
  .easy-lang-panel,
  .easy-lang-switch__thumb,
  .easy-lang-switch__track{
    transition:none !important;
  }
}

/* End Leichte Sprache */

/* Icons */

.icon-inline{
  vertical-align: -0.18em;
  margin-right: .35em;
}


/* Responsive */
@media (max-width: 1210px) {
    .brand-logo-text {
        display: none;
    }
}

@media (max-width: 900px) {
  .brand-logo-text {
    display: none;
  }
  .brand-logo-icon {
    height: var(--logo-h-sm);
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    padding: .4rem .8rem;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .site-nav.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
  .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .site-nav .menu > li {
    width: 100%;
  }
  .site-nav .menu > li > a {
    display: block;
    width: 100%;
    padding: .7rem 0;
  }
  /* .site-nav .menu > .is-start,
  .site-nav .menu > li:first-child {
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: .25rem;
    padding-bottom: .25rem;
  } */
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html:focus-within {
    scroll-behavior: auto;
  }
  .site-nav {
    transition: none !important;
  }
  .nav-toggle__bar {
    transition: none !important;
  }
    .site-nav .menu::after { transition: none !important; }
}