/* ==========================================================================
   Steirisch Ursprung — Custom CSS
   Inspired by smol-11ty-starter (Stephanie Eckles) + Pico CSS tokens
   ========================================================================== */

/* --- Tokens --- */
:root {
  --color-primary: #006633;
  --color-navbar: #206f40;
  --color-secondary: #7b6852;
  --color-text: #444;
  --color-text-muted: #888;
  --color-bg: #fff;
  --color-bg-light: #f4f4f4;
  --color-bg-warm: #f8f8f8;
  --color-border: #e0e0e0;

  --font-heading: 'Josefin Sans', system-ui, sans-serif;
  --font-body: 'Crimson Text', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --max-width: 960px;
  --spacing: clamp(1rem, 5vw, 3rem);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

/* --- Base Typography --- */
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

:is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); }

:is(h2, h3):not(:first-child) { margin-top: 2em; }

a { color: var(--color-primary); text-underline-offset: 0.15em; }
a:hover { color: var(--color-secondary); }

p { margin: 0 0 1em; }

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

iframe { max-width: 100%; aspect-ratio: 16/9; height: auto; }

/* --- Topbar --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem var(--spacing);
  background: var(--color-navbar);
  font-family: var(--font-heading);
  font-size: 0.8rem;
}

.topbar a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.topbar a:hover { color: #fff; }

.topbar-cta {
  padding: 0.25em 1em;
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  transition: all 0.2s;
}

.topbar-cta:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff !important;
}

.topbar-right { margin-left: auto; }

/* --- Navbar (Split Layout) --- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navbar);
  min-height: 80px;
  position: relative;
  padding: 0 var(--spacing);
}

.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -20px;
  z-index: 10;
}

.nav-logo img {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.nav-left, .nav-right {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  gap: 0;
}

.nav-left { justify-content: flex-end; padding-right: 100px; }
.nav-right { justify-content: flex-start; padding-left: 100px; }

.nav-left > li > a,
.nav-right > li > a {
  display: block;
  padding: 30px 18px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-left > li > a:hover,
.nav-right > li > a:hover,
[aria-current="page"] { color: #fff !important; }

/* Dropdowns */
.has-children { position: relative; }

.has-children > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  z-index: 200;
}

.has-children:hover > ul { display: block; }

.has-children > ul a {
  display: block;
  padding: 0.5rem 1.5rem;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.has-children > ul a:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: absolute;
  right: var(--spacing);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.2s;
}

/* --- Green zigzag border after navbar (Original sep-green) --- */
.site-nav::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: url('/img/sep-green-bottom.png') repeat-x;
  z-index: 200;
  pointer-events: none;
}

/* --- Main Content --- */
main {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: var(--spacing);
}

/* Homepage: Hero direkt unter Navbar, kein Top-Padding */
main:has(.hero) {
  width: 100%;
  max-width: none;
  padding: 0;
}

main article > * + * {
  margin-top: 1em;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 0 var(--spacing);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 3vw, 4rem);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 0.5em;
}

.hero p {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}

.hero .btn {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.hero .btn:hover {
  background: #fff;
  color: var(--color-primary);
}

/* --- Page Header (Unterseiten mit Bild) --- */
.page-header {
  background-size: cover;
  background-position: center;
  padding: clamp(3rem, 10vw, 6rem) var(--spacing);
  text-align: center;
  color: #fff;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.page-header h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin: 0;
}

/* --- Sections (full-width backgrounds) --- */
.section-full {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: clamp(2rem, 5vw, 5rem) var(--spacing);
}

.section-full > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-dark {
  background: var(--color-primary);
  color: #fff;
}

.section-dark :is(h1,h2,h3,h4,h5,h6) { color: #fff; }

.section-warm {
  background: var(--color-bg-light);
}

/* Green decoration borders (Original sep-green PNG) */
.sep-top { border-top: 6px solid var(--color-primary); border-image: url('/img/sep-green-top.png') 6 repeat; }
.sep-bottom { border-bottom: 6px solid var(--color-primary); border-image: url('/img/sep-green-bottom.png') 6 repeat; }

/* --- Footer --- */
footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
  padding: clamp(2rem, 5vw, 3rem) var(--spacing);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

footer h5 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
footer a:hover { color: #fff; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 0.3rem; }

.footer-copy { text-align: left; }

/* --- Feature Grid (3 Spalten nach Hero, edge-to-edge) --- */
.section-full:has(.feature-grid) {
  padding: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: none;
  margin: 0;
}

.feature-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  text-decoration: none;
  color: #fff;
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.feature-card:hover img {
  transform: scale(1.05);
}

.feature-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing);
  background: rgba(0,0,0,0.35);
  transition: background 0.3s;
}

.feature-card:hover .feature-card-content {
  background: rgba(0,0,0,0.5);
}

.feature-card h3 {
  color: #fff;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.feature-card h3 span {
  font-weight: 400;
}

.feature-card p {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.feature-card:hover p {
  opacity: 1;
  transform: translateY(0);
}

/* --- Angebot Row --- */
.angebot-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.angebot-text {
  flex: 1;
  min-width: 300px;
}

.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
  .footer-copy { text-align: right; }
}

@media (max-width: 959px) {
  .site-nav { flex-wrap: wrap; min-height: auto; padding: 0.5rem var(--spacing); }

  .nav-toggle { display: block; }

  .nav-logo {
    position: relative;
    left: auto; top: auto;
    transform: none;
    padding: 0.5rem 0;
  }
  .nav-logo img { height: 60px; }

  .nav-left, .nav-right {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0;
  }

  .site-nav.open .nav-left,
  .site-nav.open .nav-right { display: flex; }

  .nav-left > li > a,
  .nav-right > li > a { padding: 0.75rem 1rem; }

  .has-children > ul {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.1);
  }

  .has-children > ul a { color: rgba(255,255,255,0.8); }
  .has-children > ul a:hover { background: rgba(255,255,255,0.1); color: #fff; }

  .has-children.open > ul { display: block; }

  .topbar { display: none; }

  .feature-grid { grid-template-columns: 1fr; }
}

/* --- Print --- */
@media print {
  .topbar, .site-nav, .nav-toggle, footer { display: none !important; }
  main { width: 100%; max-width: none; }
}
