/* ============================================================
   Dorfladen Erschwil – Stylesheet
   ============================================================ */

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Lustria";
  src: url("../fonts/Lustria-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --green: #98c048;
  --green-dark: #74a02c;
  --green-deep: #33491a;
  --blue: #4a6a9e;
  --blue-deep: #3b5480;
  --yellow: #f2e434;
  --ink: #2d2b26;
  --muted: #676259;
  --paper: #faf9f4;
  --card: #ffffff;
  --line: #e6e2d8;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(45, 43, 38, 0.07);
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); }
a:hover { color: var(--green-deep); }

h1, h2, h3 {
  font-family: "Lustria", Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}
/* Markenstreifen in den Prima-Farben (Grün/Gelb/Blau) */
.site-header::after {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(180deg,
    var(--green) 0 44%,
    var(--yellow) 44% 72%,
    var(--blue) 72% 100%);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 150px;
  height: 42px;
  border-radius: 8px;
  background: url("../images/prima_logo.png") 0 50% / auto 100% no-repeat;
  flex: none;
}
@media (max-width: 380px) {
  .brand-name small { display: none; }
}
.brand-name {
  font-family: "Lustria", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.15;
}
.brand-name small {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
  border: 0;
  background: none;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:hover { background: #f0ecdf; color: var(--ink); }
.site-nav a[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }
  .site-nav a { padding: 0.7rem 0.85rem; border-radius: 10px; }
}

/* ---------- Hero (Startseite) ---------- */

.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  background: var(--green-deep) url("../images/header_new.jpg") center top / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 26, 10, 0.15) 0%, rgba(20, 26, 10, 0.72) 100%);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 5rem;
  padding-bottom: 3rem;
  color: #fff;
}
.hero h1 {
  color: #fff;
  margin-bottom: 0.3em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  max-width: 34em;
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff !important; box-shadow: 0 3px 12px rgba(0,0,0,0.25); }
.btn-primary:hover { background: var(--green-dark); }
.btn-yellow { background: var(--yellow); color: var(--ink) !important; box-shadow: 0 3px 12px rgba(0,0,0,0.25); }
.btn-yellow:hover { background: #fbef62; }
.btn-ghost { background: rgba(255,255,255,0.14); color: #fff !important; border: 1.5px solid rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.26); }
.btn-outline { border: 2px solid var(--green-dark); color: var(--green-deep) !important; }
.btn-outline:hover { background: var(--green); border-color: var(--green); color: #fff !important; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Prima-Banner (Original-Logo, volle Breite) */
.prima-banner {
  display: block;
  width: 100%;
}

/* Statusbadge offen/geschlossen */
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  margin-bottom: 1rem;
}
.open-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa0a6;
}
.open-badge.is-open::before { background: #43a047; }
.open-badge.is-closed::before { background: #e05656; }

/* ---------- Seitenkopf (Unterseiten) ---------- */

.page-head {
  background: linear-gradient(120deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 3rem 0 2.4rem;
  border-bottom: 5px solid var(--yellow);
}
.page-head h1 { color: #fff; margin: 0; }
.page-head p { margin: 0.6rem 0 0; max-width: 42em; font-size: 1.1rem; }

/* ---------- Abschnitte ---------- */

.section { padding: 3.5rem 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.lead { font-size: 1.15rem; max-width: 46em; }

/* Angebot-Checkliste */
.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.6rem 2rem;
}
.checklist li {
  position: relative;
  padding-left: 2rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: var(--green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4 10-11"/></svg>') center / 62% no-repeat;
}

/* Kartenraster */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card .btn { margin-top: 0.75rem; }

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(45, 43, 38, 0.13);
}
a.card .card-more { color: var(--green-dark); font-weight: 700; }

/* Öffnungszeiten */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.hours-table th { font-weight: 700; white-space: nowrap; padding-right: 1.5rem; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }

.hours-note { margin-top: 1rem; color: var(--muted); font-size: 0.92rem; }
.hours-details { margin-top: 0.6rem; font-size: 0.92rem; }
.hours-details summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.hours-details summary::-webkit-details-marker { display: none; }
.hours-details summary::after { content: "+"; font-size: 1.1rem; }
.hours-details[open] summary::after { content: "–"; }
.hours-details summary:hover { color: var(--green-deep); }
.hours-details ul { margin: 0.6rem 0 0; padding-left: 1.2rem; color: var(--muted); columns: 2; column-gap: 1.5rem; }
.hours-details li { padding: 0.1rem 0; break-inside: avoid; }
@media (max-width: 480px) { .hours-details ul { columns: 1; } }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 0.3rem 0; }
.contact-list strong { display: inline-block; min-width: 4.2em; }

/* Zweispalter */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Seitenbild (z.B. Prima-Fahnen) */
.side-photo {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 820px) { .side-photo { max-height: 320px; } }

/* Galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.gallery a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery a:hover img { transform: scale(1.04); }

/* Lightbox */
dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
}
dialog.lightbox::backdrop { background: rgba(15, 18, 8, 0.85); }
dialog.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  width: auto;
  margin: 0 auto;
  border-radius: 10px;
}
dialog.lightbox button {
  position: absolute;
  top: -0.4rem;
  right: 0;
  transform: translateY(-100%);
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.4rem;
}

/* Postagentur */
.post-flag { border-left: 6px solid #fc0; }
.post-logo { max-width: 190px; margin-bottom: 1rem; }

/* Facebook / CTA-Banner */
.cta-banner {
  background: linear-gradient(120deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: var(--radius);
  color: #fff;
  padding: 2rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-banner h2, .cta-banner p { color: #fff; margin: 0; }
.cta-banner p { opacity: 0.92; }
.cta-banner .btn { background: #fff; color: var(--green-deep) !important; }
.cta-banner .btn:hover { background: var(--yellow); }

/* Fakten (Über uns) */
.fact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.fact-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.7rem;
}

.highlight-box {
  background: #fdf8d9;
  border: 1px solid #efe197;
  border-radius: var(--radius);
  padding: 1.5rem;
}
.highlight-box h3 { margin-top: 0; }

/* Downloads / Dokumente */
.doc-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.doc-list li { margin-bottom: 0.45rem; }
.doc-list a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.doc-list a:hover { border-color: var(--green); background: #f6faec; }
.doc-list a::before {
  content: "PDF";
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--green-dark);
  border-radius: 5px;
  padding: 0.15rem 0.4rem;
}
.doc-list .doc-note { color: var(--muted); font-size: 0.9rem; }

details.year {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
  padding: 0 1.25rem;
}
details.year summary {
  cursor: pointer;
  font-family: "Lustria", Georgia, serif;
  font-size: 1.15rem;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.year summary::-webkit-details-marker { display: none; }
details.year summary::after {
  content: "+";
  font-family: "Lato", sans-serif;
  font-size: 1.4rem;
  color: var(--green-dark);
}
details.year[open] summary::after { content: "–"; }
details.year .doc-list { margin: 0 0 1.25rem; }

/* Textseiten (Impressum, DSG) */
.prose { max-width: 46em; }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h2:first-of-type { margin-top: 1em; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue-deep);
  color: #dde6f3;
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  font-size: 0.95rem;
  border-top: 5px solid var(--yellow);
  box-shadow: 0 -11px 0 var(--green);
}
.site-footer a { color: #c3d5ef; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.site-footer h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.7em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.15rem 0; }
.footer-hours td, .footer-hours th {
  border: 0;
  padding: 0.15rem 0;
  color: #dde6f3;
  font-weight: 400;
  font-size: 0.95rem;
  text-align: left;
  vertical-align: top;
}
.footer-hours th { padding-right: 1.2rem; font-weight: 700; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: #a8bcd9;
}

/* ---------- Kleinkram ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
