:root {
  --font-body: "Helvetica Neue", Helvetica, Verdana, Arial, sans-serif;
  --color-text: #222;
  --color-bg: #fff;
  --color-accent: #a29062;
  --color-accent-dark: #8e7b50;
  --color-gray: #f0f0f0;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

.firma-nav, .company-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2rem;
}

.nav-link {
  padding: 8px 16px;
  background: #f0f0f0;
  text-decoration: none;
  border-radius: 4px;
}

.page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  padding: 1rem;
}

.header-top {
  text-align: center;
  position: relative;
  margin-bottom: 1.5rem;
}

.logo-container {
  display: inline-block;
}

.logo {
  max-width: 200px;
  height: auto;
}

.language-switch {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0.5rem;
}

.lang-flag {
  padding: 0.25rem;
  border-radius: 4px;
  background: transparent;
  display: inline-block;
}

.lang-flag img {
  width: 25px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.6;
}

.lang-flag.active img {
  filter: none;
  opacity: 1;
}

.main-nav {
  text-align: center;
  margin: 1.5rem 0;
  background: var(--color-gray);
  border-radius: 8px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 10px 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.main-nav a.active,
.main-nav a:hover {
  background: var(--color-accent);
  color: #fff;
}

.nav-toggle,
.hamburger,
.mobile-menu,
.close-x {
  display: none;
}

.main-content {
  padding: 2rem 10rem;
  text-align: left;
  line-height: 1.9;
  margin-top: -3rem;
}

.main-content .inner {
  text-align: justify;
  display: inline-block;
  max-width: 800px;
}

.main-content a {
  color: var(--color-accent);
}

.main-content a:hover {
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 2px;
}

.site-footer {
  padding: 2rem 1rem 1rem;
  border-top: 1px solid #ccc;
  text-align: right;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-accent);
}

.site-footer a:hover {
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 2px;
}

.utility-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1000;
}

.font-btn,
.scroll-to-top {
  width: 45px;
  height: 45px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 45px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.font-btn:hover,
.scroll-to-top:hover {
  background: var(--color-accent-dark);
  transform: scale(1.05);
}

.img-left {
  width: 100%;
  opacity: 0.9;
  float: left;
  margin: 0 1rem 1rem 0;
}

@media (max-width: 700px) {
  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-around;
    margin: 1rem auto;
    cursor: pointer;
    padding: 0.5rem;
  }

  .hamburger span {
    height: 3px;
    background: #000;
    border-radius: 2px;
    transition: 0.3s;
  }

  .hamburger span:nth-child(1) {
    transform: translateY(-6px);
  }

  .hamburger span:nth-child(3) {
    transform: translateY(6px);
  }

  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
    text-align: center;
  }

  .nav-toggle:checked ~ .mobile-menu {
    transform: translateX(0);
  }

  .mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.5rem;
  }

  .mobile-menu a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    padding: 0.5rem 1rem;
    display: inline-block;
    border-radius: 8px;
    transition: background 0.3s;
  }

  .mobile-menu a:hover,
  .mobile-menu a.active {
    background: var(--color-accent);
    color: #fff;
  }

  .close-x {
    display: flex;
    position: fixed;
    top: 1.5rem;
    right: 6.5rem;
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    color: #fff;
  }

  .header-top {
    flex-direction: column;
    gap: 1rem;
  }

  .language-switch {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .main-content {
    padding: 1rem 1.5rem;
    margin-top: 0;
  }

  .utility-buttons {
    bottom: 20px !important;
    right: 15px !important;
    gap: 4px !important;
  }

  .font-btn,
  .scroll-to-top {
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    line-height: 40px !important;
  }
}

@media (max-width: 400px) {
  .utility-buttons {
    bottom: 80px !important;
    right: 10px !important;
  }
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 2px solid rgba(162, 144, 98, 0.6) !important;
  outline-offset: 1px !important;
}

.font-btn:focus,
.scroll-to-top:focus {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8) inset !important;
  outline: 2px solid rgba(162, 144, 98, 0.6) !important;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-accent);
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 4px;
  font-weight: bold;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
  outline: 2px solid rgba(162, 144, 98, 0.6);
}

.text-only-mode body {
  background: #fff !important;
  color: #000 !important;
}

.text-only-mode img,
.text-only-mode .logo,
.text-only-mode .lang-flag img {
  display: none !important;
}

.text-only-mode .logo::after {
  content: "Logo";
  font-weight: bold;
  font-size: 1.2em;
}

.text-only-mode .lang-flag[href*="/de/"]::after {
  content: "Deutsche Sprache";
  padding: 0.5rem 0.75rem;
  display: inline-block !important;
  color: var(--color-accent) !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  margin: 0.25rem !important;
}

.text-only-mode .lang-flag[href*="/en/"]::after {
  content: "Englische Sprache";
  padding: 0.5rem 0.75rem;
  display: inline-block !important;
  color: var(--color-accent) !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  margin: 0.25rem !important;
}

.text-only-mode .lang-flag[href*="/de/"]:hover::after,
.text-only-mode .lang-flag[href*="/de/"].active::after,
.text-only-mode .lang-flag[href*="/en/"]:hover::after,
.text-only-mode .lang-flag[href*="/en/"].active::after {
  background: var(--color-accent) !important;
  color: #fff !important;
}

.text-only-mode a {
  text-decoration: underline !important;
}
.map-fallback {
  width: 100%;
  opacity: 0.8;
  float: left;
  margin: 0 1rem 1rem 0;
  text-align: center;
}

.map-placeholder {
  position: relative;
  margin: 1rem 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.map-fallback-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

@media (max-width: 700px) {
  .map-fallback-img {
    width: 100%;
    left: 0;
    transform: none;
  }
}
