/* ==========================================================================
   Just Us — Neubauernhof Dettenbach / Waldkirch
   Statische Website — Cookie-frei, datenschutzfreundlich
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --color-cream: #faf8f3;
  --color-cream-dark: #f0ebe0;
  --color-green: #4a7c59;
  --color-green-dark: #3a6347;
  --color-green-light: #5d9970;
  --color-brown: #8b6f47;
  --color-brown-dark: #6b5535;
  --color-gold: #c9a84c;
  --color-sand: #e8dcc8;
  --color-text: #2c2418;
  --color-text-light: #5a4d3e;
  --color-white: #ffffff;
  --color-wood: #3e2f1c;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container-width: 1200px;
  --section-padding: 6rem 0;
  --border-radius: 12px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-green);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
  background: rgba(250, 248, 243, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-green) !important;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav__links a {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.3rem 0;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.hero__content {
  position: relative;
  text-align: center;
  color: var(--color-white);
  padding: 2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.3rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.8rem;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.hero__cta {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  border: 2px solid var(--color-white);
  color: var(--color-white) !important;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all var(--transition);
}

.hero__cta:hover {
  background: var(--color-white);
  color: var(--color-green) !important;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ---------- Section Defaults ---------- */
.section {
  padding: var(--section-padding);
}

.section--cream {
  background-color: var(--color-cream-dark);
}

.section--green {
  background-color: var(--color-green);
  color: var(--color-white);
}

.section--wood {
  background-color: var(--color-wood);
  color: var(--color-cream);
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.section__header--light h2 {
  color: var(--color-cream);
}

.section__line {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 0 auto 1.2rem;
  border-radius: 2px;
}

.section__intro {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section--green .section__intro,
.section--wood .section__intro {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- About Section ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-green);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

.about__text p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.about__image img {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ---------- Animal Cards ---------- */
.animals__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.animal-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.animal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.animal-card__image {
  height: 260px;
  overflow: hidden;
}

.animal-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.animal-card__content {
  padding: 1.5rem;
}

.animal-card__content h3 {
  font-size: 1.3rem;
  color: var(--color-green);
  margin-bottom: 0.5rem;
}

.animal-card__content p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery__item {
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  cursor: pointer;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

/* ---------- Products ---------- */
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background var(--transition);
}

.product-card:hover {
  background: rgba(255, 255, 255, 0.18);
}

.product-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: grayscale(0);
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--color-cream);
}

.product-card p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.product-card a {
  color: var(--color-gold) !important;
}

.products__special {
  text-align: center;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  font-size: 1.05rem;
}

.products__special a {
  color: var(--color-gold) !important;
  font-weight: 600;
}

/* ---------- Catering ---------- */
.catering__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.catering__image img {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.catering__text h3 {
  font-size: 1.4rem;
  color: var(--color-green);
  margin-bottom: 0.8rem;
  margin-top: 1.5rem;
}

.catering__text h3:first-child {
  margin-top: 0;
}

.catering__text ul {
  list-style: none;
  margin-bottom: 1rem;
}

.catering__text ul li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
  color: var(--color-text-light);
}

.catering__text ul li::before {
  content: '\2022';
  color: var(--color-green);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--color-green);
  color: var(--color-white) !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  transition: all var(--transition);
  margin-top: 1rem;
}

.btn:hover {
  background: var(--color-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 124, 89, 0.3);
}

/* ---------- Hut Section ---------- */
.hut__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.hut__lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.hut__text p {
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.hut__note {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-gold);
}

.hut__phone {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-gold) !important;
}

.hut__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.hut__feature {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
}

.hut__feature strong {
  display: block;
  color: var(--color-gold);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.hut__feature span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.hut__images {
  display: grid;
  gap: 1rem;
}

.hut__images img {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ---------- Services ---------- */
.services__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.services__content h3 {
  font-size: 1.4rem;
  color: var(--color-green);
  margin-bottom: 0.8rem;
}

.services__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.service-item {
  padding: 0.6rem 1.3rem;
  background: var(--color-cream-dark);
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-brown);
}

/* ---------- Events ---------- */
.events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--color-white);
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition);
}

.event-card:hover {
  transform: translateY(-2px);
}

.event-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
  padding: 0.6rem;
  background: var(--color-green);
  border-radius: 8px;
  color: var(--color-white);
}

.event-card__day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-display);
}

.event-card__month {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.event-card__info h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.event-card__info p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.events__note {
  text-align: center;
  margin-top: 2rem;
  color: var(--color-text-light);
  font-style: italic;
}

.events__empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-light);
  font-style: italic;
  grid-column: 1 / -1;
}

/* ---------- Market Banner ---------- */
.market__banner {
  text-align: center;
  padding: 1rem 0;
}

.market__banner h2 {
  color: var(--color-cream);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.market__time {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.market__banner p:last-child {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact__info h3 {
  font-size: 1.5rem;
  color: var(--color-green);
  margin-bottom: 1rem;
}

.contact__info p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.contact__phone a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-green) !important;
  font-family: var(--font-display);
}

.contact__email {
  margin-top: -0.5rem;
}

.contact__email a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-brown) !important;
}

.contact__hours {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-cream-dark);
  border-radius: var(--border-radius);
}

.contact__hours h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brown);
  margin-bottom: 0.2rem;
  margin-top: 1rem;
}

.contact__hours h4:first-child {
  margin-top: 0;
}

.contact__hours p {
  margin-bottom: 0;
  color: var(--color-text);
  font-weight: 600;
}

.contact__map img {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.contact__directions {
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
  color: var(--color-text-light);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-gold);
}

.footer__brand p {
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer__links a:hover {
  color: var(--color-gold) !important;
}

.footer__legal {
  text-align: right;
  font-size: 0.8rem;
}

.footer__note {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

.footer__legal-links {
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

.footer__legal-links a {
  color: var(--color-sand);
  text-decoration: underline;
}

.footer__legal-links a:hover {
  color: var(--color-gold);
}

/* ---------- Navigation Solid (Subpages) ---------- */
.nav--solid {
  background: rgba(250, 248, 243, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* ---------- Legal Pages ---------- */
.legal__content {
  max-width: 800px;
  margin: 0 auto;
}

.legal__content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-green);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.legal__content h3:first-child {
  margin-top: 0;
}

.legal__content p {
  margin-bottom: 0.8rem;
  color: var(--color-text-light);
}

.legal__content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--color-text-light);
}

.legal__content ul li {
  margin-bottom: 0.3rem;
}

.legal__content a {
  color: var(--color-green);
  text-decoration: underline;
}

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

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .animals__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .events__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 0;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(250, 248, 243, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    gap: 0;
    transform: translateY(-120%);
    transition: transform 0.4s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  }

  .nav__links.active {
    transform: translateY(0);
  }

  .nav__links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .nav__links a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
  }

  /* Content grids */
  .about__grid,
  .catering__grid,
  .hut__grid,
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__image {
    order: -1;
  }

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

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

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

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .hut__features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer__legal {
    text-align: center;
  }

  /* Hero adjustments */
  .hero {
    min-height: 100svh;
  }

  .hero__image img {
    object-position: center center;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
  }

  .contact__phone a {
    font-size: 1.4rem;
  }
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
