/* Auxilium Holding styles */
/* Color palette variables */
:root {
  --primary: #A7BDD7;
  --dark: #6A7381;
  --mid: #95A6BC;
  --light: #C4D0DE;
  --background: #F0F1F2;
  --text-dark: #2E3237;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--background);
  line-height: 1.6;
  /* Durch globale Background-Grafik kann der hero-Hintergrund auf allen Seiten eingebunden werden.
     Die eigentliche Farbe bleibt als Fallback erhalten. */
}

/* Globaler Hero-Hintergrund für alle Seiten
   Das Pseudo-Element sorgt dafür, dass das Hero-Bild im Hintergrund aller Seiten liegt,
   ohne den Inhalt zu überlagern. Durch die geringe Opazität bleibt die Lesbarkeit erhalten. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1100px;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Header */
.site-header {
  background-color: var(--dark);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .logo {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
  margin-right: 2rem;
}

.nav {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.nav li a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav li a.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 20;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: white;
  position: absolute;
  transition: all 0.3s;
}

.menu-toggle span {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span::before {
  top: -8px;
}

.menu-toggle span::after {
  top: 8px;
}

/* Toggle animation */
.menu-toggle.open span {
  background-color: transparent;
}

.menu-toggle.open span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-dark);
}

.btn-primary:hover {
  background-color: var(--mid);
}

/* Hero section */
.hero {
  background-size: cover;
  background-position: center;
  color: var(--text-dark);
  padding: 100px 0;
  text-align: left;
  position: relative;
}

.hero h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 600px;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Features section */
.features {
  background-color: var(--light);
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature h3 {
  font-family: 'Libre Baskerville', serif;
  color: var(--dark);
  margin-top: 0;
}

/* Footer */
.site-footer {
  background-color: var(--dark);
  color: white;
  padding: 1rem 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.footer-nav li a {
  color: white;
  text-decoration: none;
}

/* General section spacing */
.section {
  padding: 60px 0;
}

h1,
h2,
h3,
h4 {
  font-family: 'Libre Baskerville', serif;
  color: var(--dark);
  margin-top: 0;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portfolio-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.portfolio-item p {
  margin: 0;
}

/* Visueller Abschluss unter dem Footer: auf Desktop sichtbar, mobile ausgeblendet */
.footer-art {
  width: 100%;
  /* Bild des Wandgemäldes mit Rittern als Hintergrund */
  background-image: url('images/ritter-mural.jpg');
  background-repeat: no-repeat;
  background-position: center bottom;
  /* gesamte Illustration anzeigen, ohne Köpfe oder Details abzuschneiden */
  background-size: contain;
  /* ausreichende Höhe für Desktop, ändert sich bei großen Bildschirmen */
  min-height: 360px;
  max-height: 520px;
  /* Harmonischer Übergang zum Footer */
  background-color: var(--background);
  /* leichte Entsättigung und Abdunkelung für ruhigen Look */
  filter: saturate(0.6) brightness(0.95);
}

/* Language switcher */
@media (min-width: 769px) {
  .language-switcher {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    width: 140px;
    height: 46px;
    /* Matches the button/nav height */
    vertical-align: middle;
    z-index: 100;
  }

  .language-switcher a {
    display: none;
    padding: 0.8rem 1.2rem;
    color: white;
    text-decoration: none;
    background-color: var(--dark);
    min-width: 140px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    order: 2;
    /* Default order for non-active */
  }

  .language-switcher a.active-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: transparent;
    order: 1;
    /* Always at the top */
  }

  .language-switcher a.active-lang:after {
    content: ' ▼';
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 8px;
  }

  .language-switcher:hover {
    overflow: visible;
  }

  .language-switcher:hover a {
    display: block;
    /* They naturally stack in the flex column. 
       active-lang stays in flow, others overflow the 46px height. */
  }

  /* When hovering, we want the active one to look like a menu header */
  .language-switcher:hover a.active-lang {
    background-color: var(--dark);
    border-radius: 4px 4px 0 0;
    border-color: transparent;
    height: auto;
    padding: 0.8rem 1.2rem;
  }

  .language-switcher:hover a:last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
  }

  .language-switcher a:hover {
    background-color: var(--primary);
    color: white;
  }
}

/* Site Header Layout */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Tablet refinements to keep header on one line */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-header .logo {
    font-size: 1rem;
    margin-right: 0;
  }

  .main-nav {
    gap: 0.25rem;
  }

  .nav {
    gap: 0.1rem;
    flex-wrap: nowrap;
  }

  .nav li a {
    padding: 0.3rem 0.4rem;
    white-space: nowrap;
  }

  /* The contact button has .btn class with larger padding, override it here */
  .nav li a.btn {
    padding: 0.4rem 0.6rem;
  }

  .language-switcher a {
    padding: 0.3rem 0.5rem;
  }

}

@media (min-width: 1400px) {
  .footer-art {
    min-height: 420px;
  }
}

@media (max-width: 768px) {
  .footer-art {
    display: none;
  }
}

/* Forms */
form input,
form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--mid);
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background-color: white;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button {
  border: none;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark);
    flex-direction: column;
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 15;
  }

  .main-nav.active {
    max-height: 600px;
  }

  .nav {
    flex-direction: column;
    width: 100%;
  }

  .nav li {
    width: 100%;
    text-align: center;
  }

  .nav li a {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 0;
  }

  .language-switcher {
    width: 100%;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
  }

  .site-header .logo {
    margin-right: 0;
  }
}

/* Additional mobile tweaks */
@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .nav {
    align-items: flex-start;
  }

  .site-header .logo {
    font-size: 1.3rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}