/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  color: #333;
}

/* Header & Menü */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  color: #fff;
  z-index: 1000;
  padding: 10px 15px;
}

.menu-toggle {
  font-size: 26px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  left: 15px;
  z-index: 1001;
  color: #333;
  transition: color 0.2s ease;
}

.menu-toggle.active {
  color: #fff;
}

/* Sidebar Navigation */
#sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #222;
  transition: left 0.3s ease;
  z-index: 999;
  padding-top: 60px;
}

#sidebar.active {
  left: 0;
}

#sidebar ul {
  list-style: none;
}

#sidebar li {
  border-bottom: 1px solid #333;
}

#sidebar a {
  display: block;
  padding: 15px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}

#sidebar a:hover {
  background: #bcb5ac;
}

/* Hauptinhalt */
main {
  padding-top: 60px;
}

section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
}

#ueber p {
  text-align: justify;
  line-height: 1.8;
  margin-bottom: 1.6rem;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
}

.about-profile {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0 32px;
}

.about-photo {
  width: min(180px, 28%);
  min-width: 120px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.about-quote {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-left: 18px;
  border-left: 4px solid #c7bfb6;
}

.about-quote p {
  margin: 0;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.8;
  text-align: justify;
  overflow-wrap: break-word;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
  transition: transform 0.35s ease;
}

.reference-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 220px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f9f5f0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  text-align: center;
}

.reference-card h3,
.reference-card p {
  width: 100%;
}

.reference-card h3 {
  margin-bottom: 12px;
}

.reference-controls {
  display: none;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.reference-nav {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.reference-nav:hover,
.reference-nav:focus-visible {
  transform: scale(1.05);
  background: #f2f0ec;
}

.reference-card:hover,
.reference-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.09);
  background: #fffaf4;
}

.reference-card h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.reference-card p {
  margin-top: 0.8rem;
  color: #4d4d4d;
  line-height: 1.65;
}

/* Ensure text stays inside the card and wraps cleanly */
.reference-card {
  box-sizing: border-box;
  overflow: hidden;
}

.reference-card h3 {
  word-break: break-word;
  hyphens: auto;
}

.reference-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  hyphens: auto;
  max-height: calc(1.65em * 6);
}

@media (max-width: 1300px) {
  .reference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .reference-grid {
    display: flex;
    overflow-x: auto;
    width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 0; /* handle spacing per-card to avoid layout clipping */
    position: relative;
  }

  .reference-grid::-webkit-scrollbar {
    display: none;
  }

  .reference-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .reference-card {
    box-sizing: border-box;
    min-width: calc(100% - 40px); /* account for section horizontal padding (20px each side) */
    flex: 0 0 calc(100% - 40px);
    margin: 0 20px; /* create visual spacing between cards */
    scroll-snap-align: center;
    justify-content: center;
  }


  .reference-controls {
    display: none; /* controls removed, keep hidden */
  }
}

#datenschutz-content p {
  margin-bottom: 1.4rem;
}

#datenschutz-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

h1, h2 {
  margin-bottom: 15px;
}

/* Hero Section */
#hero {
  background: linear-gradient(135deg, #f4f4f4, #e9ecef);
  text-align: center;
  padding-top: 120px;
}

#hero h1 {
  font-size: 2rem;
}

#hero p {
  margin: 10px 0 20px;
}

/* CTA Button */
.cta {
  display: inline-block;
  padding: 12px 25px;
  background: #c7bfb6;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: transform 0.2s, background 0.2s;
}

.cta:hover {
  background: #bcb5ac;
  transform: translateY(-2px);
}

/* Leistungen Liste */
#leistungen ul {
  list-style: disc;
  padding-left: 20px;
}

/* Formular */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  padding: 12px;
  background: #c7bfb6;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #bcb5ac;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

/* Consent Banner & Einstellungen */
.consent-banner,
.consent-overlay {
  font-family: Arial, sans-serif;
}

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 17, 17, 0.98);
  color: #f5f5f5;
  padding: 18px 20px;
  z-index: 1100;
  transform: translateY(110%);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

.consent-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.consent-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1200px;
  margin: auto;
}

.consent-banner-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.consent-banner-text {
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 560px;
}

.consent-banner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.consent-banner-links a {
  color: #c7bfb6;
  text-decoration: underline;
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.consent-banner-actions button,
.consent-settings-actions button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  background: #2c2c2c;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.consent-banner-actions button.primary,
.consent-settings-actions button.primary {
  background: #c7bfb6;
  color: #111;
}

.consent-banner-actions button:hover,
.consent-settings-actions button:hover {
  transform: translateY(-1px);
  background: #a8a192;
}

.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1200;
}

.consent-overlay.active {
  display: flex;
}

.consent-settings {
  width: 100%;
  max-width: 560px;
  background: #fff;
  color: #222;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.consent-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.consent-settings-header h2 {
  font-size: 1.2rem;
}

.consent-close-button {
  border: none;
  background: transparent;
  color: #222;
  font-size: 0.95rem;
}

.consent-category {
  border-top: 1px solid #e5e5e5;
  padding: 18px 0;
}

.consent-category:first-of-type {
  border-top: none;
}

.consent-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.consent-category-title h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.consent-category-title p {
  font-size: 0.92rem;
  color: #555;
  margin: 0;
}

.consent-category input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #c7bfb6;
}

.consent-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

body.consent-open {
  overflow: hidden;
}

#cookie-settings-link {
  color: #c7bfb6;
}

#cookie-settings-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .consent-banner-actions {
    justify-content: stretch;
    width: 100%;
  }

  .consent-banner-actions button {
    width: 100%;
  }

  .consent-settings {
    padding: 18px;
  }
}

.footer-links a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Impressum Content */
#impressum-content {
  padding: 80px 20px;
  max-width: 1000px;
  margin: auto;
}

#impressum-content h1 {
  margin-bottom: 30px;
}

#impressum-content h2 {
  margin-top: 40px;
  margin-bottom: 15px;
}

#impressum-content p {
  margin-bottom: 15px;
  overflow-wrap: break-word;
}

#impressum-content a {
  color: #c7bfb6;
  text-decoration: none;
}

#impressum-content a:hover {
  text-decoration: underline;
}

/* Desktop Ansicht */
@media (min-width: 768px) {
  #sidebar {
    left: 0;
    width: 220px;
  }

  main {
    margin-left: 220px;
  }

  footer {
    margin-left: 220px;
    width: calc(100% - 220px);
  }

  .menu-toggle {
    display: none;
  }
}

li::marker {
  content: "▶ "; /* Unicode-Dreieck */
  color: #bcb5ac; /* Deine Wunschfarbe */
  font-size: 0.8em;
}