@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --color-bg-main: #fcfaf6;
  /* Warm beige/off-white */
  --color-bg-card: #f4eee2;
  /* Slightly darker warm beige for containers */
  --color-bg-footer: #eae3d2;
  /* Distinct, different warm background for footer */
  --color-forest-green: #1f3b2b;
  /* Main dark forest green */
  --color-forest-medium: #3b5f43;
  /* Highlight/Medium forest green */
  --color-forest-light: #5a8563;
  /* Subtle light forest green */
  --color-light-brown: #cfa87b;
  /* Tan / camel light brown */
  --color-light-brown-hover: #b89163;
  --color-light-blue: #0284c7;
  /* Navigation links in light blue */
  --color-light-blue-hover: #0369a1;
  /* Hover light blue */
  --color-text-main: #1f2923;
  /* Dark charcoal forest green */
  --color-text-muted: #4d5750;
  /* Muted charcoal */
  --color-border: rgba(31, 59, 43, 0.08);

  --shadow-soft: 0 8px 30px rgba(31, 59, 43, 0.04);
  --shadow-hover: 0 12px 40px rgba(31, 59, 43, 0.08);

  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 400;
  min-height: 100vh;
  min-height: 100dvh;
  /* Dynamic viewport height to prevent browser bar overlapping issues */
  display: flex;
  flex-direction: column;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-forest-green);
  line-height: 1.15;
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-bg-main);
  opacity: 0.94;
  border-bottom: 1px var(--color-border);
  box-shadow: 0 2px 20px rgba(31, 59, 43, 0.03);
}

.header-container {
  max-width: 100%;
  /* space on the sides should be used by the navigation items */
  margin: 0;
  padding: 0 2rem;
  /* side spacing */
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  /* fixed height */
  min-height: 85px;
}

/* Logo Link */
.logo-link {
  display: flex;
  align-items: center;
  height: 85px;
  /* logo takes full height, making spacing below it 0 */
  padding: 0;
  margin: 0;
  max-width: 320px;
  /* logo displayed larger */
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.85;
}

.logo {
  display: block;
  height: 100%;
  max-height: 85px;
  /* logo displayed larger */
  width: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

/* Navigation items centered to logo */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Nav links in forest green to match color pattern */
.nav-link {
  color: var(--color-forest-medium) !important;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.nav-link:hover:not(.active) {
  color: var(--color-forest-green) !important;
  background-color: rgba(31, 59, 43, 0.06);
}

/* Active Highlighted - bold, matches color pattern, and disabled */
.nav-link.active {
  font-weight: 700 !important;
  color: var(--color-forest-green) !important;
  background-color: rgba(31, 59, 43, 0.08);
  /* Soft green highlight background */
  pointer-events: none;
  cursor: default;
}

/* Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

.hamburger-box {
  width: 24px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: var(--color-forest-green);
  position: absolute;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-radius: 4px;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before {
  content: "";
  top: -7px;
}

.hamburger-inner::after {
  content: "";
  bottom: -7px;
}

/* Opened menu toggle state */
.hamburger.open .hamburger-inner {
  transform: rotate(45deg);
}

.hamburger.open .hamburger-inner::before {
  opacity: 0;
}

.hamburger.open .hamburger-inner::after {
  transform: translateY(-7px) rotate(-90deg);
}

/* Main Grid Layout */
.grid-container {
  max-width: 1200px;
  width: 100%;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  flex: 1 0 auto;
}

/* Default Card-Like Title Hero (for pages without background images, like Impressum & Datenschutz) */
.hero {
  grid-column: span 2;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 2.25rem;
  color: var(--color-forest-green);
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Full-Screen Hero (fills first screen before scrolling, spans full viewport width for pages with backgrounds) */
.hero.hero-home,
.hero.hero-services,
.hero.hero-about,
.hero.hero-contact {
  grid-column: auto;
  /* reset grid span since it is outside the grid-container */
  width: 100%;
  min-height: calc(100vh - 85px);
  /* Fallback */
  min-height: calc(100dvh - 85px);
  /* Dynamic viewport height below header */
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
  background-color: transparent;
}

/* Glassmorphic/solid content card inside the hero for high text readability */
.hero-card {
  background-color: rgba(235, 223, 198, 0.6);
  /* Solid warm beige with minor opacity */
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 4rem 3rem;
  max-width: 800px;
  width: 100%;
  box-shadow: var(--shadow-hover);
  text-align: center;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-card h2 {
  font-size: 2.75rem;
  color: var(--color-forest-green);
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
}

.hero-card p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-forest-green);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.hero-cta {
  display: inline-block;
  background-color: var(--color-forest-green);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(31, 59, 43, 0.15);
  transition: all 0.2s ease;
}

.hero-cta:hover {
  background-color: var(--color-forest-medium);
  transform: translateY(-2px);
}

/* Specific background images for each page's hero */
.hero.hero-home {
  background-image: url('../images/home_desktop.png');
}

.hero.hero-services {
  background-image: url('../images/services_desktop.png');
}

.hero.hero-about {
  background-image: url('../images/about_desktop.png');
}

.hero.hero-contact {
  background-image: url('../images/contact_desktop.png');
}

/* Normal Cards (can be full-width or half-width) */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card.full-width {
  grid-column: span 2;
}

.card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-light-brown);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.card p {
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Footer (only appears at the very bottom) */
.site-footer {
  margin-top: auto;
  background-color: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 1.5rem;
}

.footer-left {
  /* can contain the CTA */
}

.footer-center {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.footer-link {
  color: var(--color-forest-medium);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
}

.footer-link:hover {
  color: var(--color-forest-green);
  background-color: rgba(31, 59, 43, 0.04);
}

.footer-link.active {
  font-weight: 700 !important;
  color: var(--color-forest-green) !important;
  background-color: rgba(31, 59, 43, 0.08);
  pointer-events: none;
  cursor: default;
}

/* Form Styles for Contact */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-forest-green);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background-color: #fff;
  color: var(--color-text-main);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-forest-medium);
}

.submit-btn {
  background-color: var(--color-forest-green);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 59, 43, 0.12);
  transition: all 0.2s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: var(--color-forest-medium);
  transform: translateY(-1px);
}

/* Mobile responsive navigation & layout */
@media (max-width: 800px) {
  body {
    overflow-x: hidden;
    /* prevents any accidental horizontal layout overflow */
  }

  .header-container {
    padding: 0 1rem;
    /* optimized padding to maximize space on side margins */
  }

  .logo-link {
    max-width: 200px;
    /* logo displayed larger but safe for 320px width when hamburger menu is present */
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    /* spans full width of viewport but leaves a clean 1rem border */
    box-sizing: border-box;
  }

  .full-width,
  .card.full-width,
  .hero.full-width {
    grid-column: span 1 !important;
    width: 100%;
    box-sizing: border-box;
  }

  .hamburger {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 85px;
    /* height of header logo container */
    left: 0;
    right: 0;
    height: auto;
    background-color: var(--color-bg-main) !important;
    opacity: 0.9;
    z-index: 1050;
    display: none;
    flex-direction: column;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 30px rgba(31, 59, 43, 0.08);
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
    width: 100%;
    gap: 1.25rem;
    box-sizing: border-box;
  }

  .nav-menu li {
    width: 100%;
    justify-content: center;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.9rem;
    font-size: 1.15rem;
  }

  /* Highlight active item inside open hamburger menu on mobile */
  .nav-menu.open .nav-link.active {
    background-color: var(--color-bg-card) !important;
    color: var(--color-forest-green) !important;
    font-weight: 700 !important;
    border: 2px solid var(--color-light-brown) !important;
    border-radius: 9999px;
    pointer-events: none;
    cursor: default;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.25rem;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .footer-right {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
  }

  .footer-link {
    padding: 0.75rem 1rem;
    /* Large mobile tap targets (min 48px height) */
    font-size: 0.95rem;
  }

  .site-footer {
    padding: 3rem 1.5rem calc(4rem + env(safe-area-inset-bottom)) 1.5rem !important;
    /* Premium safe area bottom padding */
    box-sizing: border-box;
  }

  .hero {
    min-height: auto !important;
    /* reset height for default cards on mobile */
    padding: 2.5rem 1.5rem !important;
    width: 100%;
    box-sizing: border-box;
    grid-column: span 1 !important;
    /* stacks to single column span on mobile */
  }

  /* Specific height for background heroes only on mobile */
  .hero.hero-home,
  .hero.hero-services,
  .hero.hero-about,
  .hero.hero-contact {
    min-height: calc(100vh - 85px) !important;
    min-height: calc(100dvh - 85px) !important;
    /* Dynamic viewport height on mobile portrait */
    padding: 2rem 1rem !important;
  }

  .hero-card {
    padding: 2.5rem 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .hero-card h2 {
    font-size: 2rem !important;
  }

  .hero-card p {
    font-size: 1.1rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Specific mobile background images for each page's hero */
  .hero.hero-home {
    background-image: url('../images/home_mobile.png') !important;
  }

  .hero.hero-services {
    background-image: url('../images/services_mobile.png') !important;
  }

  .hero.hero-about {
    background-image: url('../images/about_mobile.png') !important;
  }

  .hero.hero-contact {
    background-image: url('../images/contact_mobile.png') !important;
  }

  .card {
    padding: 1.75rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }
}