.leistungen_grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* grid-template-rows: repeat(3, auto); */
    /* grid-template-columns: repeat(auto-fit, minmax(40rem, 1fr)); */

    column-gap: 5rem;
    align-items: stretch;
    justify-items: center;
    margin: 1rem auto;
    width: fit-content;

}
.leistungen_grid >*{
    padding: 0 5%;
    width: 100%;
    max-width: 500px;
    color: var(--color-font-dark);
}

.leistungen_grid p,
.leistungen_grid form{
    text-align: center !important;
}
.l_header > h1,
.l_header > h2,
.l_header > h3{
    line-height: 1em;
    color: var(--color-font-dark);
}

.leistung_head{
    grid-row: 1/2;
    background-color: var(--color-back-header);
    border-top-left-radius: var(--banner-radius);
    border-top-right-radius: var(--banner-radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

}
.leistung_head *{
    width: 100%;
}
.leistung_head p{
    margin-top: 0;
}
.leistung_mid{
    background-color: var(--color-banner);
    grid-row: 2/3;
    display: flex;
    flex-direction: row;
    /* align-items: center; */
    /* justify-content: center; */
    padding: 5%;
}
.leistung_mid  p {
    margin-top: 0;
}
ul {
    display: inline-block;
    text-align: left;
    margin: 0;
    padding: 0;
    /* list-style: url(/Professionell/images/icons/haken.svg); */
    list-style: none;
    list-style-position: inside;
    /* list-style: square inside url(/Professionell/images/icons/haken.svg); */
}
.l_list{
    display: flex;
    align-items: center;
    width: 100%;
}
.l_list >*{
    align-self: flex-start;
    margin: 5px 0;
}
.l_list li{
    max-width: 70%;
    padding-left: 10%;
}
.haken{
    height: 30px;
    width: 30px;
    padding: 0;
    margin-left: 5%;
}
.plus{
    /* color: green; */
    font-size: 1.5rem;
}
.leistung_bottom{
    background-color: var(--color-banner);
    grid-row: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10%;
    border-bottom-left-radius: var(--banner-radius);
    border-bottom-right-radius: var(--banner-radius);

}
.button-section{
    display: flex;
    flex-direction: column;
}



.l_runs{
    display: flex;
    flex-direction: column;
}
.headerStrich{
    position: relative;
    bottom: -7%;
    align-self: center;
    width: 100%;

}





/* LEISTUNGEN */
.grid-leistungen{
    /* border: 5px solid purple; */
    margin-top: 80px;
    margin-bottom: 80px;
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(25em, 1fr)); */
    align-items: center;
    gap: 5rem;
    grid-auto-flow: dense;
    align-items: stretch;


    /* Grid Skalierung */
    /**
   * User input values.
   */
  --grid-layout-gap: 5rem;
  --grid-column-count: 3;
  --grid-item--min-width: 15rem;

  /**
   * Calculated values.
   */
  --gap-count: calc(var(--grid-column-count) - 1);
  --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));
  --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
  grid-gap: var(--grid-layout-gap);     
}
.grid-elem-leistung{
    /* border: 3px solid rgb(28, 214, 40); */
    /* margin: 50px; */
    justify-self: center;
    align-items: center;
    max-width: 900px;
    min-width: 200px;
}
.grid-elem-leistung > *{
    /* border: 5px solid red; */
    width: 100%;
    padding: 30px 40px;
}

.leistungen {
    margin: 0 auto;
    width: fit-content;
    max-width: 90%;
}

.leistungen .button:hover,
.leistungen .button:focus {
  color: var(--color-font-dark);
}


.leistung{
    /* border: 5px solid green; */
    background-color: var(--color-banner);
    box-shadow: 10px 10px 10px lightslategray;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;

    
}
.leistung > *{
    /* border: 5px solid orange; */
    margin: 0;
    padding: 0 15%;
    padding-bottom: 30px;

    
}
.leistungen-header{
    /* border: 5px solid red; */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin: 0;

    background-color: var(--color-back-header);
    padding-top: 15px;
    width: 100%;
    min-height: 140px;
}
.leistungen-header h2{
    margin-top: 10px;
    margin-bottom: 10px; /* Abstand h2 zu h3 */
}
.leistungen-header h3{
    margin: 0;
}
.leistung-grid .headerStrichBox{
    margin: 0;
    margin-bottom: 30px;
    padding: 0;
    text-align: center;
    width: 100%;

}
.leistung-grid .headerStrichBox p{
    margin: 0;
    padding: 0;
    background-color: var(--color-back-header);
}
.leistung-grid .headerStrichBox svg{
    margin: 0 auto;
    padding: 20px 0 0 0;
    width: 100%;
    background: linear-gradient(var(--color-back-header) 80%, transparent 80%) no-repeat;;
}

.leistungen-list-container{
    min-height: 300px;
}
.leistungen-list{
    display: inline-block;
    margin: 0;
    text-align: left;
    min-height: 100px;
    width: 100%;
}
.leistung-text{
    min-height: 200px;
}
.leistung-btn{
    margin: 0 0 20px 0;
}
.fussnoteContainer{
    margin: 2rem auto;
}
.mausImg {
  margin-top: 5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}
.mausImg > img {
  max-width: min(500px, 90%);
}
.untenAusrichten{
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
/* .leistung-grid{
    display: flex;
    flex-direction: column;
    gap: 2rem;
} */

.ablauf-grid{
    /* border: 3px solid red; */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    place-items: center;
    text-align: justify;

    /* padding: 20px; */
}
.ablauf-grid > *{
    height: auto;
    width: auto;
    /* padding: 0 5px; */
}
.ablauf-item-1{
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row: 1;
}.ablauf-item-2{
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row: 2;
}.ablauf-item-3{
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row: 3;
}.ablauf-item-4{
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row: 4;
}.ablauf-item-5{
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row: 5;
}.ablauf-item-6{
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row: 6;
}.ablauf-item-7{
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row: 7;
}.ablauf-item-maus{
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row: 1;

    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 45%;

    perspective: 180px; /* Wie viel Maus bei Drehung größer wird - große Zahl -> weniger*/
    overflow: hidden;

    height: 200%;
    min-height: 180px;
    max-height: 230px;
    display: flex;
    align-items: center;


}
.mausRotate{
    transform: rotateY(180deg);

}
.mausContainer{
    display: flex;
    justify-content: center;

    transition: transform 1000ms;
}

.leistungMaus{
    /* border: 2px solid rebeccapurple; */
    width: 60%;
    min-width: 130px;
    max-width: 300px;
    transform: scaleX(-1);
    
}


/* TIMELINE */

/* Card container */
.card {
  position: relative;
  /* max-width: 400px; */
}

/* setting padding based on even or odd */
.card:nth-child(odd) {
  padding: 30px 0 30px 30px;
}
.card:nth-child(even) {
  padding: 30px 30px 30px 0;
}
/* Global ::before */
.card::before {
  content: "";
  position: absolute;
  width: 50%;
  border: dashed var(--color-primary);
}

/* Setting the border of top, bottom, left */
.card:nth-child(odd)::before {
  left: 0px;
  top: -4.5px;
  bottom: -4.5px;
  border-width: 5px 0 5px 5px;
  border-radius: 50px 0 0 50px;
}

/* Setting the top and bottom to "-5px" because earlier it was out of a pixel in mobile devices */
@media only screen and (max-width: 400px) {
  .card:nth-child(odd)::before {
    top: -5px;
    bottom: -5px;
  }
}

/* Setting the border of top, bottom, right */
.card:nth-child(even)::before {
  right: 0;
  top: 0;
  bottom: 0;
  border-width: 5px 5px 5px 0;
  border-radius: 0 50px 50px 0;
}

/* Removing the border if it is the first card */
.card:first-child::before {
  border-top: 0;
  border-top-left-radius: 0;
}

/* Removing the border if it is the last card  and it's odd */
.card:last-child:nth-child(odd)::before {
  border-bottom: 0;
  border-bottom-left-radius: 0;
}

/* Removing the border if it is the last card  and it's even */
.card:last-child:nth-child(even)::before {
  border-bottom: 0;
  border-bottom-right-radius: 0;
}

/* Information about the timeline */
.info {
  display: flex;
  flex-direction: column;
  background: rgba(var(--color-black-white-rgb), .1);
  color: var(--color-font);
  border-radius: 10px;
  padding: 10px;
}

/* Title of the card */
.title {
  position: relative;
  margin: 1rem 0 0 0;
}

/* Timeline dot  */
.title::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 999px;
  border: 3px solid var(--color-primary);
}

/* text left if the card is odd  */
.card:nth-child(odd) > .info > .title {
  text-align: left;
}

/* text right if the card is even  */
.card:nth-child(even) > .info > .title {
  text-align: right;
}

/* setting dot to the left if the card is odd */
.card:nth-child(odd) > .info > .title::before {
  left: -50.5px;
  top: 6px;
}

/* setting dot to the right if the card is odd */
.card:nth-child(even) > .info > .title::before {
  right: -50.5px;
  top: 6px;
}


/* Leistungen versetzte Karten */
ol.leistungen-zickzack {
    counter-reset: my-counter 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

ol.leistungen-zickzack h3{
    margin: 0;
    text-align: center;
}

ol.leistungen-zickzack li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background:rgba(var(--color-black-white-rgb), .1);
    color: var(--color-font);
    padding: 1rem;
    border-radius: 1rem;
    width: 100%;
    box-shadow: 0.25rem 0.25rem 0.75rem rgb(0 0 0 / 0.1);
    position: relative;
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

ol.leistungen-zickzack li::before {
    counter-increment: my-counter;
    content: counter(my-counter);
    font-size: 1.75rem;
    font-weight: 600;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--color-font);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--color-font);
}

@media(min-width: 800px) {
    ol.leistungen-zickzack h3 {
        text-align: left;
    }
    ol.leistungen-zickzack li {
        flex-direction: row;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }

    ol.leistungen-zickzack li:nth-child(even) {
        flex-direction: row-reverse;
        margin-right: -2rem;
        margin-left: 2rem;
    }
}




@media(max-width: 1600px){

    .leistungen_grid{
        grid-template-columns: repeat(2, 1fr);
        
    }
    .leistung_item_7{
        margin-top: 5rem;
        grid-row: 4/5;
    }
    .leistung_item_8{
        grid-row: 5/6;
    }
    .leistung_item_9{
        grid-row: 6/7;
    }
}

@media(max-width: 900px){

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

    .leistung_item_4{
        margin-top: 4rem;
        grid-row: 4/5;
    }
    .leistung_item_5{
        grid-row: 5/6;
    }
    .leistung_item_6{
        grid-row: 6/7;
    }

    .leistung_item_7{
        margin-top: 4rem;
        grid-row: 7/8;
    }
    .leistung_item_8{
        grid-row: 8/9;
    }
    .leistung_item_9{
        grid-row: 9/10;
    }


    .leistung_bottom{
        padding-bottom: min(40px, 10%);
    }



    .ablauf-grid{
        grid-template-columns: 1fr;
    }
    .ablauf-item-maus{
        display: none;
    }
    .a-item{
        grid-column: 1;
    }


    .mausRadierer{
        height: auto;
        max-width: 100%;
    }




}