/* ATRE – template responsive (2026) */
@font-face { font-family: "Pontano Sans"; src: url("../Fonts/pontano-sans.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cookie"; src: url("../Fonts/cookie.woff2") format("woff2"); font-display: swap; }

:root {
  --green: #2f9a1e;
  --green-dark: #1f7412;
  --green-light: #85b304;
  --green-tint: #f1f8ec;
  --text: #2b3327;
  --muted: #5d6857;
  --bg: #fbfcf9;
  --card: #ffffff;
  --line: #dfe7d8;
  --radius: 10px;
  --sidebar: 270px;
  --font: "Pontano Sans", "Helvetica Neue", 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.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-underline-offset: 2px; }
a:hover { color: var(--green); }
::selection { background: var(--green-light); color: #fff; }

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- layout ---------- */
.site { min-height: 100vh; }
.sidebar { background: var(--green); color: #fff; }
.sidebar a { color: #fff; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 120px; }
.address { font-size: .82rem; line-height: 1.45; opacity: .92; margin: 0; }
.address strong { display: block; }
.address + .address { margin-top: .6rem; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .55rem .9rem; border-radius: 6px; text-decoration: none; font-size: 1.02rem; line-height: 1.3; }
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.14); color: #fff; }
.nav .active > a { background: #fff; color: var(--green-dark); font-weight: 700; }
.nav .sub { padding-left: .9rem; margin: .15rem 0 .3rem; border-left: 2px solid rgba(255,255,255,.35); margin-left: .9rem; }
.nav .sub a { font-size: .93rem; padding: .4rem .7rem; }

.main { padding: 1rem; }
.content { max-width: 860px; margin: 0 auto; }

.menu-toggle { display: none; }

/* mobile & tablet: top bar */
@media (max-width: 1023px) {
  .sidebar { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  .sidebar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .5rem 1rem; }
  .brand img { width: 112px; }
  .sidebar .address { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: .45rem .8rem; font: inherit; font-size: .95rem; cursor: pointer; }
  .menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 18px; height: 2px; background: #fff; position: relative; transition: transform .2s; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { flex-basis: 100%; display: none; padding: .5rem 0 .75rem; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav.open { display: block; }
  .no-js .nav { display: block; }
  .no-js .menu-toggle { display: none; }
}

/* desktop: fixed left sidebar like the original */
@media (min-width: 1024px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); overflow-y: auto; }
  .sidebar-inner { padding: 1.5rem 1.25rem 2rem; }
  .brand { margin-bottom: .9rem; }
  .brand img { width: 194px; }
  .sidebar .address { margin-bottom: 0; }
  .nav { margin-top: 1.5rem; }
  .main { margin-left: var(--sidebar); padding: 2rem 2.5rem 3rem; }
}

/* ---------- page header ---------- */
.banner { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: var(--line); aspect-ratio: 751 / 272; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3, h4 { color: var(--green-dark); line-height: 1.25; margin: 1.6em 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); text-align: center; color: var(--green); margin-top: 0; font-weight: 400; }
h1::after { content: ""; display: block; width: 64px; height: 3px; background: var(--green-light); margin: .6rem auto 0; border-radius: 2px; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.ce { margin-bottom: 2rem; }
.ce > :first-child { margin-top: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.content ul:not([class]) li::marker { color: var(--green); }

/* text + image */
.textpic img { margin: 0 auto 1.25rem; border-radius: var(--radius); }
.textpic.center { text-align: center; }

/* ---------- gallery ---------- */
.gallery { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .9rem; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 343 / 200; background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: .35rem; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(10,20,8,.88); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 6px; margin: auto; }
.lightbox .lb-bar { display: flex; justify-content: center; gap: .5rem; margin-top: .6rem; }
.lightbox button { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; font: inherit; padding: .35rem .9rem; cursor: pointer; }

/* ---------- news ---------- */
.news-list { display: grid; gap: 1rem; }
.news-item { display: grid; grid-template-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.news-item:hover { box-shadow: 0 6px 20px rgba(31,116,18,.12); transform: translateY(-2px); color: inherit; }
.news-item .thumb { aspect-ratio: 4/3; background: var(--green-tint); }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .body { padding: 1rem 1.15rem; }
.news-item h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.news-item p { margin: 0; color: var(--muted); font-size: .97rem; }
.news-item .more { display: inline-block; margin-top: .5rem; color: var(--green-dark); font-weight: 700; }
@media (min-width: 640px) { .news-item { grid-template-columns: 220px 1fr; } .news-item .thumb { aspect-ratio: auto; min-height: 165px; } }
.news-detail .date { color: var(--muted); text-align: center; margin-top: -.5rem; }
.back { display: inline-block; margin-top: 1.5rem; }

/* ---------- map, tables, forms ---------- */
.map { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--green-tint); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
td, th { padding: .5rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

.form { display: grid; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.form input, .form select, .form textarea { width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #c9d4c0; border-radius: 6px; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--green-light); border-color: var(--green); }
@media (min-width: 640px) { .form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }
.btn, .form button[type=submit] { display: inline-block; background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: .7rem 1.4rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover, .form button[type=submit]:hover { background: var(--green-dark); color: #fff; }
.info { background: var(--green-tint); border-left: 4px solid var(--green); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- footer ---------- */
.footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
@media (min-width: 1024px) { .footer .addr { display: none; } }

@media print { .sidebar, .menu-toggle, .footer { display: none !important; } .main { margin: 0 !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- TYPO3 markup ---------- */
.frame { margin-bottom: 2rem; }
.frame > :first-child, .ce-bodytext > :first-child { margin-top: 0; }
.ce-textpic .single, .ce-textpic .gallery { margin-bottom: 1.25rem; }
figure.single { margin: 0 auto 1.25rem; text-align: center; }
figure.single img { margin: 0 auto; border-radius: var(--radius); }
.frame-type-text, .frame-type-textmedia { text-align: inherit; }
.frame-type-textmedia .ce-textpic:has(figure.single) { text-align: center; }

.frame-type-form_formframework form { display: grid; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.frame-type-form_formframework .row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .frame-type-form_formframework .row { grid-template-columns: 1fr 1fr; } }
.frame-type-form_formframework .row > * { width: auto; max-width: none; padding: 0; }
.frame-type-form_formframework label { display: block; font-weight: 700; margin-bottom: .3rem; }
.frame-type-form_formframework .required { color: #b3261e; }
.frame-type-form_formframework .form-control, .frame-type-form_formframework .form-select { width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #c9d4c0; border-radius: 6px; background: #fff; }
.frame-type-form_formframework .form-control:focus, .frame-type-form_formframework .form-select:focus { outline: 2px solid var(--green-light); border-color: var(--green); }
.frame-type-form_formframework .form-text, .frame-type-form_formframework .help-block { font-size: .88rem; color: var(--muted); }
.frame-type-form_formframework .error .form-control { border-color: #b3261e; }
.frame-type-form_formframework .error .help-block, .frame-type-form_formframework .invalid-feedback { color: #b3261e; }
.frame-type-form_formframework .btn-primary { display: inline-block; background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: .7rem 1.6rem; font: inherit; font-weight: 700; cursor: pointer; }
.frame-type-form_formframework .btn-primary:hover { background: var(--green-dark); }
.frame-type-form_formframework .actions nav, .frame-type-form_formframework .form-navigation { display: flex; justify-content: flex-end; }