/* ============================================
   APPSTAM BRAND CSS - WITH MOBILE NAVIGATION
   ============================================ */

/* CSS Custom Properties */
:root {
  --brand-orange: #FF8A35;
  --brand-red: #7F1315;
  --brand-yellow: #F7C91E;
  --brand-gray: #808080;
  --brand-light-gray: #999999;
  --text-dark: #333333;
}

/* Open Sans Font Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');

/* ============================================
   BASE STYLES & LAYOUT
   ============================================ */

/* Sticky Footer Setup */
html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}


/* Typography */
h1, h2, h3 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 800;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

p, li {
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.1rem);
}

img {
  max-width: 100%;
  height: auto;
}
/* ============================================
   NAVBAR - RESPONSIVE WITH HAMBURGER MENU
   ============================================ */

.navbar {
  background-color: white;
  border-bottom: 2px solid var(--brand-orange);
  padding: 15px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.navbar-brand {
  font-weight: 700;
  color: var(--brand-orange) !important;
  flex-shrink: 0;
}

.navbar-brand-container {
  max-width: none !important;
  min-width: auto !important;
}

.navbar .navbar-brand img {
  max-height: 50px !important;
  width: auto !important;
  height: 50px !important;
  min-height: 50px !important;  /* Zusätzlich min-height */
  object-fit: contain;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */

.navbar-desktop {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-grow: 1;
}

.navbar-nav {
  display: flex !important;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Desktop: Row direction */
.navbar-desktop .navbar-nav {
  flex-direction: row;
  gap: 30px;
}

.nav-item {
  display: inline-block;
}

.nav-link {
  font-weight: 600;
  color: var(--brand-gray) !important;
  transition: color 0.3s;
  text-decoration: none;
  display: inline-block;
  padding: 5px 10px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-orange) !important;
}

.navbar .nav-link:not([href]) {
  pointer-events: none;
  color: #d0d0d0 !important;
  cursor: default;
  user-select: none;
}

/* Language Switcher - Desktop (rechts neben Navigation) */
.navbar-desktop .language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.lang-active {
  color: var(--text-dark);
  font-weight: 700;
}

.lang-separator {
  color: var(--brand-gray);
  font-weight: 300;
}

.lang-link {
  color: var(--brand-gray);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 400;
}

.lang-link:hover {
  color: var(--brand-orange);
}
/* ============================================
   MOBILE NAVIGATION (HAMBURGER MENU)
   ============================================ */

/* Hide desktop nav on mobile */
@media (max-width: 991px) {
  .navbar-desktop {
    display: none !important;
  }
}

/* Hide mobile elements on desktop */
@media (min-width: 992px) {
  .navbar-toggler {
    display: none !important;
  }

  .navbar-collapse-mobile {
    display: none !important;
  }
}

/* Hamburger Button */
.navbar-toggler {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 1001;
  flex-shrink: 0;
}

.navbar-toggler-icon {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--brand-orange);
  position: relative;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--brand-orange);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: -10px;
}

.navbar-toggler-icon::after {
  bottom: -10px;
}

/* Hamburger Animation (X when open) */
.navbar-toggler.active .navbar-toggler-icon {
  background-color: transparent;
}

.navbar-toggler.active .navbar-toggler-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.navbar-toggler.active .navbar-toggler-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Mobile Menu (separate div below navbar) */
.navbar-collapse-mobile {
  display: none;
  position: fixed;
  top: 82px;
  left: 0;
  right: 0;
  width: 100vw;              /* Volle Viewport-Breite */
  z-index: 998;
  background-color: white;
  border-bottom: 2px solid var(--brand-orange);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  max-height: calc(100vh - 82px);
  overflow-y: auto;
  box-sizing: border-box;    /* Wichtig für Padding */
}

.navbar-collapse-mobile.is-open {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Mobile Navigation Items */
.navbar-collapse-mobile .navbar-nav {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.navbar-collapse-mobile .nav-item {
  display: block;
  width: 100%;
}

.navbar-collapse-mobile .nav-link {
  display: block;
  padding: 18px 20px;  /* Mehr Padding */
  line-height: 1.5;     /* Fixe Line-Height */
  border-bottom: 1px solid #f0f0f0;
  color: var(--brand-gray);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.navbar-collapse-mobile .nav-link:hover {
  background-color: #f9f9f9;
  color: var(--brand-orange);
}

/* Language Switcher - Mobile */
.navbar-collapse-mobile .language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  border-top: 2px solid var(--brand-orange);
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.hero-section h1 {
  font-weight: 800;
  font-size: 3.5rem;
  margin-bottom: 30px;
}

.hero-section p {
  font-size: 1.3rem;
  color: var(--brand-gray);
  margin-bottom: 40px;
}

/* ============================================
   CONTENT BOXES (Startseite)
   ============================================ */

.content-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 5vw, 80px);
  max-width: none !important;
  width: 100% !important;
  margin: 60px auto;
  padding: 0 clamp(10px, 3vw, 20px) !important;
  box-sizing: border-box;
}

.content-boxes .box h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: 800;
}

.content-boxes .box p {
  text-align: justify;
  line-height: 1.6;
  font-size: 0.95rem;
}


@media (max-width: 768px) {
  .content-boxes {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px !important;
  }
}

/* ============================================
 INTRO SECTION (Über Uns / Services)
 ============================================ */
/* Mobile First (1 Spalte) */
.intro-section {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: Immer 1 Spalte */
  gap: 40px;
  align-items: center;
  margin: 40px 0;
}

@media (max-width: 767px) {  /* Adjust breakpoint if needed */
  .intro-section {
    width: 100vw;
    margin-left: calc(-1 * clamp(20px, 5vw, 60px));
    margin-right: calc(-1 * clamp(20px, 5vw, 60px));
    padding-left: clamp(20px, 5vw, 60px);
    padding-right: clamp(20px, 5vw, 60px);
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .intro-section > * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

@media (min-width: 768px) {
  .intro-section {
    grid-template-columns: 1fr 1fr; /* Desktop: 2 Spalten */
  }
}

.intro-text {
  text-align: justify;
}

/* ============================================
   THREE COLUMNS LAYOUT
   ============================================ */

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 60px 0;
}

.three-columns .box h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.three-columns .box p {
  text-align: justify;
}

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

/* ============================================
   FOUR GRID LAYOUT
   ============================================ */

.four-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin: 40px 0;
}

.four-grid .area {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
}

.four-grid .area h3 {
  color: var(--brand-orange);
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.four-grid .area ul {
  list-style: none;
  padding: 0;
}

.four-grid .area li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.four-grid .area li:before {
  content: "•";
  color: var(--brand-orange);
  font-weight: bold;
  position: absolute;
  left: 0;
}

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

/* ============================================
   SECTION TITLE
   ============================================ */

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 60px 0 40px 0;
  color: var(--text-dark);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  background-color: var(--brand-orange);
  border: none;
  font-weight: 600;
  padding: 12px 30px;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #e67a25;
}

/* ============================================
   VIDEO CONTAINER (YouTube Embeds)
   ============================================ */

.video-container {
  margin: 30px 0;
}

.video-container iframe {
  max-width: 800px;
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 450px;
}

@media (max-width: 800px) {
  .video-container iframe {
    height: 300px;
  }
}

/* ============================================
   IMPRINT HEADER
   ============================================ */

.imprint-header {
  text-align: left;
  max-width: 600px;
  margin: 60px 0;
}

/* ============================================
   FOOTER - STICKY FOOTER
   ============================================ */

.site-footer {
  flex-shrink: 0;
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 30px 40px;
  border-top: 2px solid var(--brand-orange);
  width: 100%;
  box-sizing: border-box;
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "links badge copyright social";
  align-items: center;
  gap: 30px;
}

.footer-links {
  grid-area: links;
  display: flex;
  gap: 40px;
}

.footer-links a {
  color: var(--brand-orange);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.8;
}

.footer-badge {
  grid-area: badge;
  text-align: center;
  justify-self: center;
}

.footer-badge img {
  max-width: 150px;
  height: auto;
}

.footer-copyright {
  grid-area: copyright;
  text-align: right;
}

.footer-copyright p {
  margin: 0;
  color: var(--brand-gray);
  font-size: 14px;
  line-height: 1.6;
}

.footer-social {
  grid-area: social;
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
}

.footer-social a:hover {
  opacity: 0.8;
}

.footer-social svg {
  width: 24px;
  height: 24px;
  transition: opacity 0.3s;
}

/* Mobile Footer Layout */
@media (max-width: 768px) {
  .footer-content-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "links"
      "badge"
      "copyright"
      "social";
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-copyright {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* ============================================
   MAIN CONTENT PADDING (für Unterseiten)
   ============================================ */
main.content {
  flex: 1 0 auto;
  overflow-x: hidden;  /* WIEDER EINFÜGEN */
  padding: 40px clamp(20px, 5vw, 60px);
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Startseite: Kein Padding (haben eigene Container) */
main.content .content-boxes {
  margin-left: calc(-1 * clamp(20px, 5vw, 60px));
  margin-right: calc(-1 * clamp(20px, 5vw, 60px));
  padding: 0 clamp(20px, 5vw, 60px);
}

/* ============================================
   STARTSEITE LOGO (Content, nicht Navbar)
   ============================================ */

/* Desktop: Logo mittelgroß, zentriert */
main.content img[src="/img/appstam-logo-transparent.png"] {
  max-width: 400px;
  width: 70%;
  height: auto;
  display: block;
  margin: 40px auto;
}

/* Mobile: Logo volle Breite */
@media (max-width: 768px) {
  main.content img[src="/img/appstam-logo-transparent.png"] {
    max-width: 100%;
  }
}

/* Überschriften auf Mobile: Box-Modell und Umbruch erzwingen */
main.content h1,
main.content h2,
main.content h3 {
  /* Zwingt die Box, 100% der Elternelements-Breite zu sein */
  max-width: 100%;

  /* Stellt sicher, dass Padding/Border in die Breite eingerechnet wird */
  box-sizing: border-box;

  /* Stellt den Umbruch sicher */
  word-wrap: break-word;
  overflow-wrap: break-word;

  /* Zusätzlich: Verhindert Margin-Overflow */
  margin-left: 0;
  margin-right: 0;
}

/* Mobile: page-columns und alle Container auf volle Breite zwingen */
@media (max-width: 768px) {
  article.page-columns,
  .page-columns,
  main.content article {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: calc(-1 * clamp(20px, 5vw, 60px)) !important;
    padding-left: clamp(20px, 5vw, 60px) !important;
    padding-right: clamp(20px, 5vw, 60px) !important;
    box-sizing: border-box !important;
  }
}

/* ============================================
   TYPOGRAFIE: Blocksatz (Global: Desktop & Mobile)
   ============================================ */

/* Erzwingt Blocksatz auf ALLEN Geräten gemäß Anforderung.
   Fügt Silbentrennung hinzu, um "Gassen" auf Mobile zu minimieren.
*/
.content-boxes p,
.intro-text p,
.intro-section p,
main.content p {
  text-align: justify;
  hyphens: auto; /* WICHTIG für Blocksatz auf Mobile */
}

/* ============================================
   CONTACT FORM STYLES
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 40px 0;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-orange);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
/* DSGVO Checkbox Styling */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.checkbox-group label {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}
.checkbox-group a {
  color: var(--brand-orange);
  text-decoration: underline;
}
.checkbox-group a:hover {
  color: var(--brand-red);
}
/* Submit Button */
.submit-button {
  background-color: var(--brand-orange);
  color: white;
  border: none;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  font-family: 'Open Sans', sans-serif;
}
.submit-button:hover {
  background-color: #e67a25;
  transform: translateY(-2px);
}
.submit-button:active {
  transform: translateY(0);
}
/* Mobile Responsiveness */
@media (max-width: 768px) {
  .contact-form {
    margin: 30px 0;
  }
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  .submit-button {
    width: 100%;
    padding: 16px;
  }
}
/* ============================================
   P4.1 - FORMULAR (Honeypot Fix)
   ============================================ */

/* Stellt sicher, dass die Honeypot-Falle für Menschen unsichtbar ist */
input[name="_honeypot"] {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* ============================================
   P4.1 - FORMULAR (HR-Styling)
   ============================================ */

/* Stellt den korrekten Abstand für die <hr> auf der Kontaktseite
   sicher, ohne inline-styles (CSP-konform).
*/
.contact-form ~ hr {
  margin: 40px 0;
}