/* =========================================================
   Biohof Feldfuchse - statische Webseite
   Farben & Schrift orientieren sich am Original
   ========================================================= */

@font-face {
  font-display: swap;
  font-family: 'Akaya Kanadaka';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/akaya-kanadaka-v16-latin-regular.woff2') format('woff2'),
       url('../fonts/akaya-kanadaka-v16-latin-regular.ttf') format('truetype');
}

:root {
  --contrast: #222222;
  --contrast-2: #575760;
  --contrast-3: #b2b2be;
  --base: #f0f0f0;
  --base-2: #f7f8f9;
  --base-3: #ffffff;
  --accent: #1e73be;
  --green-dark: #1e7631;   /* global-color-8 */
  --green-light: #94ba1c;  /* global-color-9 */
  --brown: #76472a;        /* global-color-10 */
  --grunge: url('../images/subtle_grunge.webp');
  --container: 1920px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Akaya Kanadaka', Georgia, serif;
  font-size: 23px;
  line-height: 1.45;
  color: var(--contrast);
  background-color: var(--base);
  background-image: var(--grunge);
  background-attachment: fixed;
  background-position: bottom;
}

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

a { color: var(--green-dark); text-decoration: underline; }
a:hover, a:focus { color: var(--brown); }

h1, h2, h3, h4, h5 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 48px; }
h2 { font-size: 37px; color: var(--brown); }
h3 { font-weight: bold; font-size: 28px; color: var(--brown); }
h4 { font-weight: bold; font-size: 26px; color: var(--brown); }

p  { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }

/* ===================== Header ===================== */
.site-header {
  background-color: var(--green-light);
  background-image: var(--grunge);
  background-attachment: fixed;
  text-align: center;
  padding: 30px 20px;
}
.site-header .main-title {
  margin: 0;
  text-transform: uppercase;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 1px;
}
.site-header .main-title a {
  color: var(--green-dark);
  text-decoration: none;
}
.site-header .main-title a:hover { color: var(--brown); }
.site-header .site-description {
  margin: .15em 0 0;
  font-size: 35px;
  color: var(--base-3);
}

/* ===================== Navigation ===================== */
.main-navigation {
  background-color: var(--brown);
  background-image: var(--grunge);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 56px;
}
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.main-navigation a {
  display: block;
  padding: 18px 22px;
  font-size: 25px;
  color: var(--base-2);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.main-navigation a:hover,
.main-navigation li.current > a {
  color: var(--brown);
  background-color: var(--base);
  background-image: var(--grunge);
}
.nav-search {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.nav-search a {
  padding: 8px 12px;
  color: var(--base-2);
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  text-decoration: none;
}
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--base-2);
  border: 0;
  font-family: inherit;
  font-size: 22px;
  padding: 14px 20px;
  cursor: pointer;
}

/* ===================== Page Content ===================== */
.site-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
}
.inside-article {
  background-color: var(--base);
  background-image: var(--grunge);
  padding: 40px;
}
.entry-content > * + * { margin-top: 1em; }

/* ===================== Home/Page Layout ===================== */
.page-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
@media (max-width: 992px) {
  .page-grid { grid-template-columns: 1fr; }
}

/* Slider (CSS-only fade) */
.slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
  margin-bottom: 30px;
}
.slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: slideShow 18s infinite;
}
.slider .slide:nth-child(1) { animation-delay: 0s; }
.slider .slide:nth-child(2) { animation-delay: 6s; }
.slider .slide:nth-child(3) { animation-delay: 12s; }
@keyframes slideShow {
  0%, 28%   { opacity: 1; }
  33%, 95%  { opacity: 0; }
  100%      { opacity: 1; }
}

/* Image grid */
.image-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 1em;
}
.image-grid-2 figure {
  margin: 0;
  background: #000;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.image-grid-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.image-grid-2 figure:hover img { transform: scale(1.04); }
.image-grid-2 figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .55em .8em;
  color: #fff;
  font-size: .85em;
  background: linear-gradient(0deg, rgba(0,0,0,.6), transparent);
}

/* ===================== Right Side Boxes ===================== */
.side-box {
  background-color: var(--green-dark);
  background-image: var(--grunge);
  color: var(--base-3);
  padding: 1.4em 1.6em;
  margin-bottom: 14px;
  text-align: center;
  position: relative;
}
.side-box h3 { color: var(--base-3); margin-bottom: .4em; }
.side-box.brown   { background-color: var(--brown);   color: var(--base-3); }
.side-box.brown h3 { color: var(--base-3); }
.side-box.light   { background-color: var(--base-2); color: var(--brown); }
.side-box.light h3 { color: var(--brown); }

.side-box.with-tip { padding-bottom: 2em; }
.side-box.with-tip::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 20px solid currentColor;
  color: inherit;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .65em 1.2em;
  border-radius: 4px;
  background: var(--green-light);
  color: var(--brown);
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--base); color: var(--brown); }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.btn.outline { background: transparent; color: var(--base-3); border: 2px solid var(--base-3); }
.btn.outline:hover { background: var(--base-3); color: var(--brown); }

/* Opening-hours pill */
.hours-pill {
  display: flex;
  align-items: center;
  gap: .6em;
  background-color: var(--base-2);
  color: var(--brown);
  padding: .9em 1.2em;
  margin-bottom: 14px;
  border-radius: 3px;
  border-left: 6px solid var(--green-light);
}
.hours-pill svg { width: 1.4em; height: 1.4em; flex-shrink: 0; fill: var(--brown); }

/* Checklist */
ul.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
ul.checklist li {
  padding-left: 1.6em;
  position: relative;
  margin-bottom: .35em;
}
ul.checklist li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--green-light);
  font-weight: bold;
}

/* ===================== Above-Footer Info Bar ===================== */
.info-bar {
  background-color: var(--green-dark);
  background-image: var(--grunge);
  color: var(--base-3);
  padding: 50px 0;
}
.info-bar h3 { color: var(--base); }
.info-bar-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .info-bar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .info-bar-grid { grid-template-columns: 1fr; } }

.info-bar p { color: var(--base-3); }

.social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--green-light);
  color: var(--brown);
  border-radius: 4px;
  text-decoration: none;
}
.social a:hover { background: var(--base); }
.social svg { width: 22px; height: 22px; fill: currentColor; }

.map-embed {
  width: 100%; height: 340px;
  border: 0;
  background: #ccc;
}

.cert-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 10px 0 18px;
}
.cert-row img {
  height: 70px;
  width: auto;
  background: #fff;
  padding: 4px;
  border-radius: 4px;
}
.cert-row a { display: inline-block; }
.cert-row .logo-bauernhof { height: 28px; padding: 0; background: transparent; }

/* ===================== Footer ===================== */
.site-footer {
  background-color: var(--brown);
  background-image: var(--grunge);
  color: var(--base-3);
  padding: 30px 20px 60px;
  text-align: center;
  font-size: 20px;
}
.site-footer a { color: var(--base-3); }
.site-footer a:hover { color: var(--green-light); }

/* ===================== Back to top ===================== */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  background: rgba(0,0,0,.4);
  color: #fff;
  border-radius: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 200;
  transition: background .2s ease;
}
.back-to-top:hover { background: rgba(0,0,0,.7); color: #fff; }
.back-to-top.visible { display: inline-flex; }

/* ===================== Tables (for special content) ===================== */
table.simple {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
table.simple th, table.simple td {
  border: 1px solid var(--contrast-3);
  padding: .55em .7em;
  text-align: left;
}
table.simple th { background: var(--base-2); }

/* ===================== Mobile ===================== */
@media (max-width: 768px) {
  body { font-size: 20px; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
  h4 { font-size: 22px; }
  .site-header { padding: 22px 16px; }
  .site-header .main-title { font-size: 32px; }
  .site-header .site-description { font-size: 22px; }
  .inside-article { padding: 24px; }
  .nav-inner { justify-content: space-between; flex-wrap: wrap; }
  .menu-toggle { display: inline-block; }
  .main-navigation ul {
    flex-direction: column;
    width: 100%;
    display: none;
  }
  .main-navigation.is-open ul { display: flex; }
  .main-navigation a { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.15); }
  .nav-search { display: none; }
}
