@font-face {
  font-family: 'BrowoodRegular-nRO1R';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/BrowoodRegular-nRO1R.ttf);
}

@font-face {
  font-family: 'SourceSansPro-Regular';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/SourceSansPro-Regular.otf);
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/Oswald.ttf);
}

html {
  font-size: 16px;
  font-family: 'SourceSansPro-Regular', sans-serif;
}

:root {
  --brand: #EF7D14;
} 

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: BrowoodRegular-nRO1R;
  font-weight: 400;
  line-height: 1.2;
  margin-block-start: 20px;
  margin-block-end: 20px;
}

h1 {
  font-size: 6rem;
  margin-top: 0px;
  margin-bottom: 10px;
  line-height: 1.1;

}

h2 {
  font-size: 3rem;
  text-align: center;
  line-height: 1.1;
}

h3 {
  font-size: 2.25rem;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.container {
    display: flex;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
    max-width: 1175px;
    width: 100%;
    margin: 0 auto;
    padding-inline: 2rem;
}

.last-char {
  letter-spacing: 0 ;
}

/* HEADER */

.logo {
    height: 105px;
    display: block;
}

.main-nav {
    display: flex;
    gap: 30px;
}

header.subpage {
  background: var(--brand);
  position: static;
}

.main-nav.show .nav-close {
    opacity: 1;
    visibility: visible;
}

.nav-close {
    display: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    line-height: 1.6;
}

.nav-link::after {
    content: "";
    width: 100%;
    height: 2px;
    background: var(--brand);
    position: absolute;
    bottom: -5px;
    left: 0;
    transform: scaleX(0); 
    transform-origin: left;
    transition: transform 500ms ease;
}

.nav-link:hover::after {
    transform: scaleX(1); 
}

.nav-toggle {
    display: none;
}

/* HERO */

.hero {
  position: relative;
  height: 100vh;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url("images/banner.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: flex-end;
  color: white;
  z-index: 0;
  transition: background-position 1s ease;
}

.hero a {
  font-size: 0.94rem;
  background-color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.6;
}

.hero a:hover {
  color: white;
  background-color: #cc620d;
}

.hero__content {
  padding-bottom: 2rem;
  text-align: right;
  margin-top: 100px;
  margin-left: auto;
}

.hero__subtitle {
  font-size: 1.25rem ;
  margin-top: 10px ;
  margin-bottom: 10px ;
  font-family: BrowoodRegular-nRO1R ;
  letter-spacing: 3px;
}

.hero__button {
  display: inline-block;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0.25rem;
}

/* ABOUT */

/* Hat bewusst mehr Breite für das 2-Spalten-Layout */
#about .container {
  max-width: 1335px;
  width: 100%;
}

.about-grid {
  box-sizing: border-box;
  height: 100vh;
  min-height: 970px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin: 0 auto;
}

.about-image {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 475.5px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
}

img.position {
  object-position: 0 -40px;
}

.about-content {
  box-sizing: border-box;
  text-align: justify;
  padding: 0 5rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.about-content p {
  margin: 20px 0;
}

/* SERVICES */

#services {
  color: #ffffff;
  height: 100vh;
  min-height: 975px;
  background-color: #467d95;
  align-items: center;
  align-content: center;
}

#services .container {
  display: block;
}

.rechtsgebiet {
  display: block;
  box-sizing: border-box;
  text-align: justify;
  max-width: 100%;
  margin-bottom: 60px; /* auf 30px setzen, wenn after-Design ausgewählt wird*/
  border-bottom: 2px solid var(--brand);
  /*padding: .25rem;*/ /*Einblenden, wenn after-Design ausgewählt wird*/
}

.rechtsgebiet p {
  box-sizing: border-box;
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 20px 0;
}

.rechtsgebiet:nth-of-type(even) {
  margin-right: 0;
  text-align-last: right;
}

.rechtsgebiet:last-of-type {
  margin-bottom: 20px;
}

/* Einblenden, wenn after-Design ausgewählt wird */

/*.rechtsgebiet::after {
  content: "";
  position: absolute;
  bottom: 0;
  /*left: 10%;
  width: 85%;
  height: 2px;
  background-color: var(--brand);
  margin-top: 20px;
}

.rechtsgebiet:nth-of-type(even):after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0%;
  width: 85%;
  height: 2px;
  background-color: var(--brand);
}*/

/* WARUM ICH */

#warum-ich {
  display: block;
}

#warum-ich .container {
  display: block;
}

#warum-ich .features {
  display:grid ;
  grid-template-columns: repeat(3, max-content);
  justify-content: space-between;                 
  list-style:none;
  margin:3rem 0 0 ;
  padding:0;
}

#warum-ich p {
  text-align: center;
}

#warum-ich .features > li::before {
  content: "";
  display: block;
  width: 35px;
  height: 3px;
  background-color: #e67e22;
  margin: 0 auto 1rem;
}
#warum-ich .features .features__item {
  margin:20px 0 ;
  font-size:1rem ;
  font-family:BrowoodRegular-nRO1R ;
  letter-spacing:2px;
  text-align: center;
}

#warum-ich .features > li:nth-child(1) .features__item { width: 185px; }
#warum-ich .features > li:nth-child(2) .features__item { width: 225px; }
#warum-ich .features > li:nth-child(3) .features__item { width: 185px; }

/* KONTAKT */
#kontakt {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url("images/banner.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  display: block;
  height: 100vh;
  align-content: center;
  min-height: 970px;
  transition: background-position 1s ease;
}

#kontakt .container {
  display: block;
}

#kontakt .container p,
#kontakt .container address {
  text-align: center;
  box-sizing: border-box;
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 20px 0;
  font-style: normal;
}

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 60px 0;
  height: 550px;
  width: 100%;
}

.kontakt-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #244b5c;
  text-align: center;
  align-items: center;
  padding: 30px;
  gap: 40px;
  border-radius: 1rem ;
  justify-content: space-between;
}

.kontakt-info img {
  margin: auto;
  width: 64px;
  height: 64px ;
}

.kontakt-block img {
  display: block;
  margin-bottom: 0.5rem;
}

.kontakt-block dl {
  box-sizing: border-box;
  margin: 0;
  overflow-wrap: break-word;
}

.kontakt-block dt {
  font-size: 1.5rem;
  letter-spacing: 3px;
  font-family: 'Oswald', sans-serif;
  color: var(--brand);
  font-weight: 500;
  margin: 20px 0;
  text-transform: uppercase;
}

.kontakt-block dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: bold;
  letter-spacing: 1px;
  box-sizing: border-box;
}

.kontakt-block a {
  color: #fff;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
}

.kontakt-block a:hover {
  color: #cde9e6 
}

.kontakt-map {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 460px;

  /* Hintergrundbild + dunkler Overlay */
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/map.png");
  background-size: cover;
  background-position: center;

  border-radius: 1rem;
  overflow: hidden;
}

.kontakt-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 1rem;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 1rem;
  color: #fff;
}

.map-hinweis {
  margin: 0;
  max-width: 42ch;
  font-size: 0.9rem;
  line-height: 1.4;
}

.kontakt-map button {
  color: #fff;
  background-color: var(--brand);
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.6;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
}

/* FOOTER */

footer {
  padding: 20px;
}

footer nav {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

footer .nav-link:nth-child(1) { justify-self: start; }

footer .nav-link:nth-child(3) { justify-self: end; }


footer .nav-link {
    color: black;
    text-align: center;
}

footer .nav-link:hover {
    text-decoration: none;
    color: black;
}

/* IMPRESSUM */

#impressum .container {
  display: block;
  z-index: 0;
}

#impressum h1 {
  margin-top: 30px ;
  margin-bottom: 0 ;
}

#impressum h2{
  margin: 0;
}

#impressum :is(h1, h2) {
  display: inline-block;
  width: auto;
  font-family: 'SourceSansPro-Regular', sans-serif ;
  font-size: 1.125rem ;
  font-weight: 700;  
}

#impressum p {
  margin: 30px 0;
}

#impressum a {
  text-decoration: none;
  color: var(--brand)
}

/* BARRIEREFREIHEIT */

/* Schränkt die Transition etwas ein, wenn jemand 'Bewegung verringern' aktiviert hat */
@media (prefers-reduced-motion: reduce) {
  .hero, #kontakt { transition: none; }
}

@media (max-width: 1200px) {

  #kontakt .container {
    justify-items: center;
  }

  #kontakt p {
    max-width: 460px;
    text-align: center;
    
  }

  footer nav {
    grid-template-columns: 1fr;
    row-gap: 10px;
    justify-items: center;
  }

  footer .nav-link {
    font-size: 1rem;
    margin: auto;
}

  #warum-ich .features {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 20px;
    margin: 2rem 0 0;
  }

  #services {
    height: auto;
  }

  h3 {
    text-align: center; 
  }

  .rechtsgebiet h3 {
    text-align: left;
  }

  .rechtsgebiet {
    width: 460px;
    margin-bottom: 0px;
    margin-top: 30px;
    hyphens: auto;
  }

  .rechtsgebiet:nth-of-type(even),
  .rechtsgebiet:nth-of-type(odd) {
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    text-align-last: center;
  }
  
  .about-grid {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "img1"
      "text1"
      "img2"
      "text2";
    padding-top: 1.5rem;
    width: 460px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-grid > div:nth-child(1) { grid-area: img1; }
  .about-grid > div:nth-child(2) { grid-area: text1; }
  .about-grid > div:nth-child(3) { grid-area: text2; }
  .about-grid > div:nth-child(4) { grid-area: img2; }

  .about-content {
    padding: 0;
    max-width: 460px;
    text-align-last: center;
    hyphens: auto;
  }

  #kontakt {
    height: auto;
    min-height: 970px;
  }

  .kontakt-grid {
    height: auto;
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 30px auto;
  }

  .kontakt-info{
    height: auto;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-items: start;   
    justify-items: center;
  }

  .kontakt-block a {
    word-break: keep-all;
    max-width: 180px;
    overflow-wrap: normal;
    font-size: 1rem;
  }

  .kontakt-block dd {
    word-break: keep-all;
    max-width: 180px;
    overflow-wrap: normal;
    font-size: 1rem;
  }

}

@media (max-width: 992px) {

  .main-nav {
      position: fixed;
      top: 0; right: -100%;
      width: 50%; max-width: 320px;
      height: 100vh;
      background: rgba(0,0,0,0.95);
      flex-direction: column;
      padding: 1.5rem;
      transition: right 0.3s ease-in-out;
      z-index: 9999;
  }

  .main-nav.show {
      right: 0;  
  }

  .nav-link {
      color: white;
      font-size: 1.5rem;
      font-weight: bold;
      margin-right: 23px;
      text-decoration: none;
      text-align: right;
  }

  .nav-toggle {
      display: block;
      background: none;
      border: none;
      color: white;
      font-size: 2rem;
      cursor: pointer;
      z-index: 100;
  }

  .nav-close {
      display: flex;
      background: none;
      border: none;
      margin-right: 15px;
      font-size: 2rem;
      color: white;
      z-index: 1001;
      cursor: pointer;
      align-self: flex-end;
      margin-top: 10px;
  }

  .hero {
      background-position: 30% center;
    }

  #kontakt {
    background-position: 40% center;
  }

  .hero__subtitle {
    margin-top: 10px ;
  }
}

@media (max-width: 768px) {
    
    h1 {
        font-size: 4.5rem ;
    }

    .hero__content {
      min-width: 340px;
    }
}

@media (prefers-reduced-motion: reduce) {
  .hero, #kontakt { transition: none; }
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 50px;
}