.hero {
  padding: 0;
  background-color: var(--color-text-light);
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-container::before {
  content: "";
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right top;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 852 454' fill='none'><path d='M8 0C8 106 24.8 246.1 152 178.5C279.2 110.9 269.5 253.667 277.5 298.5C287.167 385.833 407.892 459.372 558 443.5C723.5 426 859.667 246.833 905 195.5' stroke='%23009699' stroke-width='10'/></svg>");
}

.hero-content {
  flex: 1;
  max-width: 450px;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  color: var(--color-text-dark);
  margin-bottom: 20px;
}

.hero-content h1 .highlight-italic {
  display: inline-block;
  background-color: var(--color-secondary, #E0F2F2);
  color: var(--color-primary, #008080);
  font-weight: bold;
  font-style: italic;
  margin: .2em 0;
  padding: .2em .3em;
  border-radius: 2em;
}

.hero-content .subline {
  font-weight: 300;
  font-size: 32px;
  line-height: 1;
  color: var(--color-text-dark);
}

.hero-image-area {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
  position: relative;
}

.hero-image {
  width: 88%;
  height: auto;
  aspect-ratio: 677/399;
  object-fit: cover;
  display: block;
  clip-path: url(#hero-oval-clip);
  -webkit-clip-path: url(#hero-oval-clip);
  transition: clip-path 0.5s;
  background: var(--color-background-section);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.hero-curve-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}


.hero.hero--services .hero-container {
  display: flex;
  align-items: center;
}

.hero.hero--services .hero-image-area {
  order: 1;
  margin-right: 0;
  justify-content: flex-start;
  padding: 2em;
}

.hero.hero--services .hero-content {
  order: 2;
  flex: 0 0 50%;
  margin-left: 0;
  max-width: 400px;
}

.hero.hero--services .hero-container {
  gap: 0;
}

.hero.hero--services .hero-container::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 852 454' fill='none'><g transform='scale(-1,1) skewX(-10)' transform-origin='426 227'><path d='M8 0C8 106 24.8 246.1 152 178.5C279.2 110.9 269.5 253.667 277.5 298.5C287.167 385.833 407.892 459.372 558 443.5C723.5 426 859.667 246.833 905 195.5' stroke='%23009699' stroke-width='10'/></g></svg>");
  background-position: left;
}

@media (max-width: 900px) {
  .hero.hero--services .hero-container {
    flex-direction: column;
    gap: 1.25rem;
  }

  .hero.hero--services .hero-content,
  .hero.hero--services .hero-image-area {
    order: initial;
    margin: 0;
  }
}

.hero--services .hero-image {
  width: 100%;
  -webkit-clip-path: url(#hero-oval-clip);
  clip-path: url(#hero-oval-clip);
  transform: translateX(-15%) rotate(-10deg);
}

/* ===== Hero Startseite: responsive für <1024px ===== */
@media (max-width: 1023px) {
  .hero {
    padding: 24px 0;
  }

  .hero-container {
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
  }

  /* Deko-Form: vollbreit, zentriert, leicht transparent */
  .hero-container::before {
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-position: center top;
    background-size: cover;
    /* Form dehnt sich über ganze Breite */
    opacity: .15;
  }

  .hero-content {
    order: 1;
    max-width: 680px;
    width: 100%;
    padding: 0 16px;
    text-align: left;
  }

  .hero-content h1 {
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.1;
    margin-bottom: 14px;
    text-align: center;
  }

  .hero-content .subline {
    font-size: clamp(18px, 4vw, 24px);
    line-height: 1.3;
    text-align: center;
  }

  .hero-image-area {
    order: 2;
    width: 100%;
    padding: 0 16px;
    justify-content: center;
    min-height: 0;
  }

  .hero-image {
    width: 100%;
    height: auto;
    clip-path: ellipse(48% 42% at 50% 50%);
    transform: rotate(-8deg);
  }
}

/* ===== Extra Kompakt für <640px ===== */
@media (max-width: 640px) {
  .hero {
    padding: 20px 0;
  }

  .hero-container::before {
    opacity: .1;
    background-size: 140% auto;
  }

  .hero-content {
    padding: 0 12px;
  }

  .hero-image-area {
    padding: 0 12px;
  }

  .hero-content h1 {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 10px;
  }

  .hero-content .subline {
    font-size: clamp(16px, 4vw, 20px);
  }
}


/*--------------------------------------------------------------
# Competence Section ("Nahbar und kompetent")
--------------------------------------------------------------*/
.competence {
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.competence-background-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.competence .container.competence-content {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  padding-bottom: 100px;
}

.competence h2 {
  font-family: var(--font-secondary);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-text-dark);
  text-align: left;
  margin-bottom: 10px;
}

.competence .section-subtitle {
  font-family: var(--font-primary);
  font-size: 20px;
  color: var(--color-text-dark);
  margin-bottom: 30px;
}

.competence-text {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-text-dark);
  max-width: 620px;
  margin-bottom: 50px;
}

.arguments-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.argument-item {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.argument-number {
  background-color: var(--color-tertiary);
  color: var(--color-text-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
}

.argument-content {
  margin-bottom: auto;
}

.argument-content h3 {
  color: var(--color-primary);
  margin-bottom: 8px;
}

.argument-content p {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-dark);
}

@media (max-width: 480px) {
  .competence .container.competence-content {
    padding-bottom: 2em;
  }
  .arguments-row {
    flex-direction: column;
    gap: 24px;
  }
  .argument-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .argument-number {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  .argument-content {
    margin-bottom: 0;
  }
  .argument-content h3 {
    margin: 4px 0 8px 0;
  }
}

@media (min-width: 481px) and (max-width: 900px) {
  .competence .container.competence-content {
    padding-bottom: 2em;
  }
  .arguments-row {
    flex-direction: column;
    gap: 28px;
  }
  .argument-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: flex-start;
    column-gap: 16px;
  }
  .argument-number {
    width: 56px;
    height: 56px;
    font-size: 24px;
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .argument-content {
    margin: 0;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 6px;
  }
  .argument-content h3 {
    margin: 0;
  }
}

@media (min-width: 901px) {
  .arguments-row {
    flex-direction: row;
  }
  .argument-item {
    flex-direction: row;
    align-items: center;
  }
}



/*--------------------------------------------------------------
# Services Slider Section
--------------------------------------------------------------*/
.services-slider {
  padding: 80px 0;
  background-color: var(--color-text-light);
  /* Weißer oder sehr heller Hintergrund für die Sektion */
}

.services-slider .container h2 {
  /* Container für die Überschrift, damit sie nicht mitscrollt */
  font-family: var(--font-secondary);
  font-size: 48px;
  /* Wie "Nahbar und kompetent" */
  font-weight: 700;
  color: var(--color-text-dark);
  text-align: left;
  /* oder center, je nach Gesamtlayout */
  margin-bottom: 10px;
}

.services-slider .container .section-subtitle {
  /* Container für Untertitel */
  font-family: var(--font-primary);
  font-size: 20px;
  color: var(--color-text-dark);
  margin-bottom: 40px;
  /* Mehr Abstand zum Slider */
  text-align: left;
  /* oder center */
}

.slider-container {
  overflow-x: auto;
  /* Ermöglicht horizontales Scrollen */
  /* Optional: für "weicheres" Scrollen auf Touch-Geräten */
  -webkit-overflow-scrolling: touch;
  /* Versteckt die Standard-Scrollbar, wenn gewünscht, aber nicht ideal für Accessibility */
  /* scrollbar-width: none; /* Firefox */
  /* &::-webkit-scrollbar { display: none; } /* Chrome, Safari, Opera */
  padding: 0 0 0 5%;
  /* Platz für eventuelle Schatten oder Scrollbar, die nicht überdeckt */
}

.slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--spacing-2xl);
  padding-left: calc((100vw - var(--container-max-width)) / 2 + 15px);
  padding-right: calc((100vw - var(--container-max-width)) / 2 + 15px);
  /* Sorgt für Padding am Ende des Sliders */
  /* Wenn .container padding hat, muss das hier berücksichtigt werden.
       Alternative: .slider-container innerhalb von .container platzieren,
       aber dann muss die Überschrift außerhalb des scrollbaren Bereichs sein.
       Aktuelle Lösung: Slider-Container ist volle Breite, Track hat Padding.
    */
}

/* Wenn der Slider-Container innerhalb des Hauptcontainers sein soll: */
/*
.services-slider .container {
    position: relative; // Für absolute Positionierung von Controls später
}
.slider-container {
    max-width: var(--container-max-width); // Begrenzt auf Containerbreite
    margin: 0 auto; // Zentriert
    overflow-x: auto;
}
.slider-track {
    display: flex;
    gap: 30px;
    padding: 0 10px; // Kleines Padding, damit Karten nicht am Rand kleben
}
*/


.service-card {
  background-color: var(--color-secondary);
  /* Heller Türkis-Ton, wie #E0F2F2 */
  border-radius: 20px;
  /* Abgerundete Ecken */
  padding: 30px 25px;
  min-width: 300px;
  /* Mindestbreite der Karte, damit sie nicht zu schmal wird */
  max-width: 340px;
  /* Maximale Breite */
  flex: 0 0 auto;
  /* Verhindert, dass Karten schrumpfen/wachsen und behalten ihre Breite */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-icon svg {
  max-height: 100%;
  width: auto;
  /* SVG skaliert proportional */
}


.service-card h3 {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 24px;
  /* Größerer Titel für die Karte */
  color: var(--color-text-dark);
  margin-bottom: 15px;
  text-align: left;
}

.service-card .service-description {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
  /* Sorgt dafür, dass der Textbereich wächst und der Button unten bleibt */
}

.service-card ul {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-dark);
  margin-bottom: 25px;
  padding-left: 20px;
  /* Einrückung für Bullet Points */
  list-style: disc;
  /* Standard Bullet Points */
  flex-grow: 1;
  /* Sorgt dafür, dass die Liste wächst */
}

.service-card ul li {
  margin-bottom: 8px;
}

.btn-service {
  background-color: var(--primary-color);
  color: var(--color-text-light);
  padding: 12px 25px;
  border-radius: 25px;
  /* Stärker abgerundet */
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  align-self: flex-start;
  /* Button linksbündig */
  transition: background-color 0.3s ease;
  margin-top: auto;
  /* Drückt den Button nach unten, wenn Inhalte unterschiedlich hoch sind */
}

.btn-service:hover {
  background-color: #006666;
  /* Dunkleres Türkis */
}

/* Anpassung für Slider-Padding auf sehr kleinen Bildschirmen */
@media (max-width: calc(var(--container-max-width) + 40px)) {

  /* Wenn Viewport kleiner als Container + Padding */
  .slider-track {
    padding-left: 20px;
    /* Standard-Padding für mobile Geräte */
    padding-right: 20px;
  }
}

/* Responsivität für Service Karten (Anpassung der Breite) */
@media (max-width: 768px) {
  .service-card {
    min-width: 280px;
    /* Etwas schmaler auf Mobilgeräten */
    /* Wenn die Karten untereinander gestapelt werden sollen, statt zu scrollen:
        .slider-track { flex-wrap: wrap; justify-content: center; }
        .service-card { min-width: 80%; margin-bottom: 20px; }
        */
  }

  .services-slider .container h2 {
    font-size: 36px;
  }

  .services-slider .container .section-subtitle {
    font-size: 18px;
  }
}


/*--------------------------------------------------------------
# Gutenberg Edits
--------------------------------------------------------------*/

.wp-block-group {
  margin: 4em auto;
}

.wp-block-group .container p,
.wp-block-group .container h2 {
  max-width: var(--container-md);
  margin-left: 0;
}

.wp-block-group .wp-block-image img {
  aspect-ratio: 3/1;
  object-fit: cover;
  width: 100%;
}

/*--------------------------------------------------------------
# Kontaktbox
--------------------------------------------------------------*/

.kontaktbox {
  margin-top: 4rem;
  background-color: var(--color-quaternary);
}

.kontaktbox.grid {
  gap: 0;
}

.kontaktbox.grid>.col-md-5 {
  height: 100%;
}

.kontaktbox section {
  width: 100%;
  padding: clamp(16px, 4vw, 40px);
}

@media (min-width: 768px) {
  .kontaktbox .bildbox {
    height: 100%;
    width: 100%;
  }
}

.kontaktbox .bildbox img,
.kontaktbox img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right;
}

.kontaktbox h2,
.kontaktbox p {
  color: var(--color-text-body, #333);
}

.kontaktbox p {
  margin: 0 0 1.25rem 0;
  color: var(--body, #1d1d1b);
  opacity: .9;
}

.kontaktliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 400px;
}

.kontaktlink {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  background: var(--white, #fff);
  color: var(--body, #1d1d1b);
  border-radius: 9999px;
  padding: 14px 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
  border: 1px solid rgba(0, 0, 0, .06);
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

.kontaktlink strong {
  font-weight: 700;
  white-space: nowrap;
}

.kontaktlink span {
  justify-self: end;
  font-weight: 500;
  opacity: .9;
  overflow-wrap: anywhere;
}

.kontaktlink[role="button"] span[aria-hidden="true"] {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: var(--white, #fff);
  font-size: 16px;
  line-height: 1;
}

.kontaktlink:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  border-color: rgba(0, 0, 0, .12);
}

.kontaktlink:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 6px rgba(0, 0, 0, .25);
}

@media (max-width: 1024px) {
  .kontaktliste {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .kontaktbox.grid {
    gap: 0;
  }

  .kontaktbox .textbox {
    order: 1;
  }

  .kontaktbox .bildbox {
    order: 2;
  }

  .kontaktbox section {
    padding: clamp(16px, 5vw, 28px);
  }

  .kontaktliste {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
  }

  .kontaktlink {
    padding: 14px 16px;
    grid-template-columns: max-content 1fr max-content;
  }
}

@media (max-width: 480px) {
  .kontaktbox section {
    padding: 16px;
  }

  .kontaktliste {
    gap: 10px;
  }

  .kontaktlink {
    padding: 12px 14px;
    grid-template-columns: max-content 1fr max-content;
  }

  .kontaktlink[href^="mailto:"] strong {
    display: none;
  }
}


/*--------------------------------------------------------------
# Kontaktformular Basis
--------------------------------------------------------------*/
.wpcf7 form {
  font-family: 'Inter', Arial, sans-serif;
  color: #6B7280;
  width: 80%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
}

.page-id-3209 .wpcf7 form {
  margin-top: 4rem;
  margin-left: 0;
}

.contact-form-row {
  margin-bottom: 2rem;
}

.contact-form-row label {
  display: block;
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #7A859C;
}

.contact-form-row--2col {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-form-field {
  flex: 1 1 220px;
  min-width: 180px;
}

@media (max-width: 1024px) {
  .wpcf7 form {
    width: 90%;
  }

  .page-id-3209 .wpcf7 form {
    width: 100%;
  }

  .contact-form-row {
    margin-bottom: 1.6rem;
  }

  .contact-form-row--2col {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {

  .page-id-3209 .wpcf7 form {
    margin-top: 2.5rem;
  }

  .contact-form-row {
    margin-bottom: 1.25rem;
  }

  .contact-form-row label {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }

  .contact-form-row--2col {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-form-field {
    flex-basis: 100%;
    min-width: 0;
  }

  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 input[type="tel"],
  .wpcf7 input[type="url"],
  .wpcf7 input[type="number"],
  .wpcf7 input[type="date"],
  .wpcf7 select,
  .wpcf7 textarea {
    padding: 0.85rem 0.9rem;
    font-size: 0.98rem;
  }

  .wpcf7 textarea {
    min-height: 120px;
  }

  .wpcf7 input[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 480px) {

  .page-id-3209 .wpcf7 form {
    margin-top: 2rem;
  }

  .contact-form-row {
    margin-bottom: 1rem;
  }

  .contact-form-row label {
    font-size: 0.95rem;
  }

  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 input[type="tel"],
  .wpcf7 input[type="url"],
  .wpcf7 input[type="number"],
  .wpcf7 input[type="date"],
  .wpcf7 select,
  .wpcf7 textarea {
    padding: 0.8rem 0.85rem;
    font-size: 0.96rem;
  }
}

/*--------------------------------------------------------------
# Felder & Dropdowns
--------------------------------------------------------------*/
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 1.2rem 1.2rem;
  border: 2px solid #8F97A2;
  border-radius: 12px;
  background: #fff;
  font-size: 1.15rem;
  color: #191C22;
  transition: border-color 0.2s;
  box-sizing: border-box;
  outline: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: #008688;
  box-shadow: 0 0 0 2px #d1f4f2;
}

.wpcf7 select {
  appearance: none;
  background: #fff url('data:image/svg+xml;utf8,<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5" stroke="%239899aa" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>') no-repeat right 1rem center/1.4em auto;
  cursor: pointer;
}

.wpcf7 textarea {
  min-height: 130px;
  resize: vertical;
}

/*--------------------------------------------------------------
# Submit Button
--------------------------------------------------------------*/
.btn.btn-main,
.wpcf7 input[type="submit"] {
  display: inline-block;
  padding: 1rem 3.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  background: #008688;
  color: #fff;
  border: none;
  border-radius: 2.3em;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 1.5rem;
  box-shadow: none;
}

.btn.btn-main:focus,
.wpcf7 input[type="submit"]:focus {
  outline: 2px solid #191C22;
  outline-offset: 2px;
}

.btn.btn-main:hover,
.wpcf7 input[type="submit"]:hover {
  background: #007477;
  color: #fff;
}

/*--------------------------------------------------------------
# Fehler/Erfolgsmeldungen (optional)
--------------------------------------------------------------*/
.wpcf7-not-valid-tip {
  color: #b91c1c;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.wpcf7-response-output {
  margin-top: 1rem;
  border-radius: 8px;
  padding: 1.2rem;
  font-size: 1.07rem;
}

/*--------------------------------------------------------------
# Responsive Layout
--------------------------------------------------------------*/
@media (max-width: 700px) {
  .contact-form-row--2col {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-form-field {
    min-width: 0;
  }

  .wpcf7 form {
    padding: 0 0.5rem;
  }

  .btn.btn-main,
  .wpcf7 input[type="submit"] {
    width: 100%;
    margin-top: 1rem;
  }
}