/* =========================================
   LAYOUT & NAVIGATION
   - Hero-Bereich (Startseite)
   - Topbar/Menu (fixed)
   - Logo & Hamburger-Menu
   - Container & Page-Content
   ========================================= */

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  color: #fff;
  background-image: url("../bilder/hero-katze-weiss-portrait-1920x1080.webp");
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity 400ms ease-out;
  width: 100%;
  margin: 0;
  padding: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* --- Topbar & Navigation --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  z-index: 20;
  padding: 20px;
  gap: 12px;
  background: rgba(0, 0, 0, 0);
  color: #fff;
  transition:
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

/* Pseudo-Elemente immer vorhanden, aber anfangs unsichtbar */
.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0;
  z-index: 1;
  transition: opacity 600ms ease-in-out;
}

.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(175, 208, 194, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  z-index: 2;
  transition: opacity 600ms ease-in-out;
}

/* Default links are white for transparent state */
.topbar .menu a {
  color: #fff;
}

/* Topbar bleibt transparent für Hintergrundbild, verdeckt aber scrollenden Inhalt */
.topbar.solid {
  background: transparent;
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.topbar.solid::before {
  opacity: 0.4;
}

.topbar.solid::after {
  opacity: 1;
}

.topbar.solid .menu a {
  color: #fff;
}

/* Damit der Seiteninhalt nicht unter das Menü rutscht - nur für Seiten ohne Hero */
body {
  padding-top: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Abstand für Seiteninhalte wenn kein Hero vorhanden ist */
.page-content {
  padding-top: 100px;
}

/* Menü rechts */
.menu {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
  order: 1;
  position: relative;
  z-index: 3;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.menu a:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Logo links */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  order: 0;
  position: relative;
  z-index: 3;
}

.logo img {
  max-height: 100px;
  height: auto;
  border-radius: 6px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-home .logo img {
  opacity: 0;
}

.page-home .topbar.solid .logo img {
  opacity: 1;
}

/* Hamburger / mobile menu */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
}
.menu-toggle .hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
  transition: background 0.25s ease;
}
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    top 0.25s ease,
    opacity 0.25s ease;
}
.menu-toggle .hamburger::before {
  top: -7px;
}
.menu-toggle .hamburger::after {
  top: 7px;
}

/* Animated cross when active */
.menu-toggle.active .hamburger {
  background: transparent;
}
.menu-toggle.active .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-content {
  z-index: 2;
  text-align: left;
  padding: 2rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.hero-content .hero-logo {
  height: 170px; /* Höhe anpassen nach Bedarf */
  width: auto;
  max-width: 100%; /* Verhindert Überlauf auf schmalen Bildschirmen */
  display: block;
  margin-bottom: 0.5rem;
  object-fit: contain;
  object-position: left center;
}
.hero-content h1 {
  font-family: "PinotGrigio", sans-serif;
  font-size: 2.6rem;
  margin: 0 0 0.5rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.hero-content .subtitle {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.95;
}

/* --- Global Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  position: relative;
  z-index: 0;
  padding-top: 100px;
  flex: 1;
}

/* Homepage hat keinen padding-top, da Hero vorhanden */
body.page-home .container {
  padding-top: 0;
}
