/* ----------------Base Styles */

:root {
    --WF-FM-dark: rgb(52, 52, 52);
    --WF-FM-blue: rgb(88, 103, 132);
    --WF-FM-lightblue: rgb(105, 115, 135);
    --WF-FM-lighter-blue: rgb(128, 140, 164);
    --WF-FM-white: rgb(255, 255, 255);
    --WF-FM-lightgray: rgb(242, 242, 242);
    --WF-FM-gray: rgb(168, 168, 168);
  }


html {
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    line-height: 1.6;
    color: var(--WF-FM-dark);
    background: var(--WF-FM-white);

}


#to-top {
    position: fixed;
    bottom: 174px;
    right: max(calc((100vw - 1200px) / 2), 10px);
    background: var(--WF-FM-lightgray);
    border: 2px solid var(--WF-FM-blue);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(88,103,132,0.8);
    width: 40px;
    height: 40px;    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0);
    transition: all 0.3;
}

#to-top:hover {  
    border: 1px solid var(--WF-FM-blue);
    right: max(calc((100vw - 1200px) / 2), 11px);
    bottom: 175px;
}

#to-top:hover img {
    transform: scale(0.8);
}

#to-top.show {
    transform: scale(1);
}

#to-top img{
    width: 80%;
    transform: scale(1);
    transition: transform 0.3s;   
}


a {
    text-decoration: none;
    color: var(--WF-FM-dark);
}


h1 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    margin: 0;
    padding: 5vh 5% 0 5%;
}

.hidden-h1 {
    display: none;
}


h2, .section-title {
    padding: 0 5%;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    margin-bottom: 1em;
}

#gebaeudereinigung, #gruenanlagenpflege, #hausmeisterservice, #winterdienst, #contact-form {
  scroll-margin-top: 100px;
}

.legal-heading {
    padding: 3rem 5% 0 0;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.3rem);
}

h4 {
    font-size: clamp(1.2rem, 1.8vw, 1.2rem);
    font-weight: 500;
    margin-bottom: 0;
}



/* -----------------------------Header & Navigation */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--WF-FM-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 9;
    transition: height 0.3s ease;
}

.header.scrolled {
    height: 80px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.header-logo {
    width: auto;
    height: 120px;    
    display: flex;
    transition: height 0.3s ease;
}

.header-logo.scrolled {
    height: 80px;    
}

.navbar-link, .styled-link {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.navbar-link:after, .styled-link:after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    will-change: transform;
    background-color: var(--WF-FM-blue);
    transform-origin: center;
    transition: transform 0.25s ease-out;
}

.navbar-link:hover:after, .styled-link:hover:after {
transform: scaleX(1);
transform-origin: center;
}

.navbar-link.active:after, .styled-link.active:after {
text-decoration: underline;
}

.navbar-link.active:after, .styled-link.active:after {
transform: scaleX(1);
}


.cta-link {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
    border-style: solid;
    border-color: var(--WF-FM-lightblue);
    padding: 10px;
    transition: all 0.3s ease;
}

.cta-link:hover {
    background: var(--WF-FM-blue);
    color: var(--WF-FM-white);
    border-color: var(--WF-FM-blue);
}


.navbar {
    display: flex;
}

.navbar a {
    text-decoration: none;
    color: var(--WF-FM-dark);
    font-weight: 500;
}

.navbar-content {
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: var(--WF-FM-white);
    padding: 0 36px;
    height: 44px;

    white-space: nowrap;
}

.navbar-content.scrolled {
    height: 30px;
}

.navbar-content:hover {
    background: var(--WF-FM-lightgray);
}

.navbar-content.active {
    background: var(--WF-FM-lightgray);    
}


/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap:8px;
    cursor: pointer;
    padding: 10px;
}

.burger div {
    width: 36px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content.open {
            display: block;
}


.dropdown-content a {
    padding: 10px 16px;
    display: block;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: var(--WF-FM-lightgray);
}

/* ---------------------------------------- Sections -------*/

.wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--WF-FM-white);
    min-height: 100vh;
}

section {
    padding: 40px 0 40px 0;
    margin: 3vh 0;
}

section:last-child {
    margin-bottom: 0;
}

.indent-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;    
}

.centered-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
    text-align: center;
}

section:nth-child(even) {
    background: var(--WF-FM-lightgray);
}

.section-subtitle {
    text-align: center;
    padding: 0 5%;
    font-size: clamp(1.2rem, 2vw, 1.3rem);
    margin-bottom: 1em;
}

.welcome-section {
    position: relative;
    padding: 0;
    margin: 0;
}

.showreel-container {
    position: relative;
    width: 100%;
    height: 40vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.showreel-container img {
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showreel-container video {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    object-fit: cover;
}

.welcome-section::after {
    padding: 50vh;
}

.showreel-placeholder {
    width: 100%;
    height: 50vh;
    background: #e6f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    color: #666;
}

.grid-container {
    display: flex;
    justify-content: center;
    flex-wrap:wrap;
    padding-bottom: 40px; 
}

.grid-item {
    width: clamp(200px, 76vw, 350px);
    height: auto;
    padding: 0 20px 10px 20px;
    margin: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: var(--WF-FM-lightgray);
    transition: background-color 0.25s ease;
}

.grid-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.team-member {
    max-width: 300px;
}
.team-member img {
    padding-top: 20px;
}

.image-link:hover {
    background: var(--WF-FM-blue);
    color: var(--WF-FM-white)
}


.two-col-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap-reverse;
}

.two-col-container-rev {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.two-col-container img {
    flex: 1;
    max-width: min(500px, 80vw);
    object-fit: contain;
}

.two-col-container p {
    flex: 1;
}

.wide-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 20px 0;
}

/* Contact Form */

.contact-form-container {
    color: var(--WF-FM-dark);
    display: block;
    max-width: 800px;
    margin: 20px 20%;
    
}

.contact-form {
    margin: 0 auto;
    padding: 20px;
    background: var(--WF-FM-lightgray);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

input[type=text], input[type=email], select, textarea {
  width: 100%; /* Full width */
  padding: 12px; /* Some padding */ 
  border: 1px solid var(--WF-FM-gray); /* Gray border */
  border-radius: 4px; /* Rounded borders */
  box-sizing: border-box; /* Make sure that padding and width stays in place */
  margin-top: 6px; /* Add a top margin */
  margin-bottom: 16px; /* Bottom margin */
  resize: vertical; /* Allow the user to vertically resize the textarea (not horizontally) */
  font-family: 'Roboto', sans-serif;
}

.contact-form button {
    background: var(--WF-FM-blue);
    color: #fff;
    font-size: 1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease;
}

#privacy {
    margin: 3px 3px 3px 0;
}

.contact-form button:hover {
    background: var(--WF-FM-lightblue);
    box-shadow: 0 2px 5px rgb(88, 103, 132);
}

.contact-form-error {
  color: red;
  font-size: 0.95em;
  margin-top: 0.2em;
  display: block;
}

ul .values-list {
    list-style-type: inside;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;  
    padding: 0;
}



.two-col-service-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.card-list {
    flex: 3;
    overflow: hidden;
    list-style: none;
    perspective: 1000px;  
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    margin-block: 0;
    min-width: 300px;
}


.card {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    padding-block: 1rem;
    padding-inline: 2rem;
    background-color: var(--WF-FM-lightgray);    
    transform-style: preserve-3d;
    color: var(--WF-FM-dark);   

    column-gap: 2rem;
    margin-bottom: 1rem;
}

.card:last-child {
    margin-bottom: 0;
}

section:nth-of-type(even) .card {
  background-color: var(--WF-FM-white);
}

ul li.card .icon {
    grid-area: icon;
    display: flex;
    justify-content: center;
    align-items: center;    
}

ul li.card .icon img {
  height: 2rem;
  width: 2rem;
  fill: var(--WF-FM-blue);
}

.benefit-icon img {
    width: 2rem;
    height: 2rem;
    display: block;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}


.card-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.service-images {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  min-width: 180px;
  max-width: 40vw;
  gap: 1rem;
  max-height: 100%;
}

.service-images img {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}


.benefit {
    color: var(--WF-FM-dark);
    padding: 24px
}

.benefit-text p{
    margin: 0.5em;
}

.benefit-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.benefit-row i {
    color: var(--WF-FM-blue);
    font-size: 2rem;
}

@media (max-width: 30em){
  .card {
    flex-wrap: wrap;
    justify-content: center;
  }
}


@media (max-width: 768px) {
    
  .two-col-service-container {
    flex-direction: column;
    align-items: center;
  }

  .service-images {
        flex-direction: row; /* **Bilder nebeneinander auf kleineren Screens** */
        flex-wrap: wrap; /* Ermöglicht, dass Bilder umbrechen, falls sie nicht in eine Reihe passen */
        justify-content: center; /* Zentriert die Bilder in der Reihe */
        width: 100%; /* Nimmt die volle Breite ein */
        max-width: unset; /* Entfernt die maximale Breite der Spalte */
        margin-top: 20px; /* Fügt etwas Abstand über den Bildern hinzu, wenn sie unter der Liste sind */
        gap: 10px; /* Kleinerer Abstand zwischen den Bildern auf Mobile */
    }
  
    .service-images img {
        flex: 1 1 auto; /* Erlaubt den Bildern, sich auszudehnen und zusammenzuschrumpfen */
        min-width: 120px; /* Minimale Breite für jedes Bild (anpassen) */
        max-width: 30%; /* Maximal 30% der Breite, sodass 3 Bilder nebeneinander passen */
        height: auto; /* Wichtig, um das Seitenverhältnis zu bewahren */
        object-fit: cover;
    }

  .contact-form-container {
    margin: 20px 5%;
    padding: 20px 5%;
    }
}

@media (max-width: 450px) {

    .service-images img {
        min-width: 70px; /* Optional: Bilder auf sehr kleinen Bildschirmen noch kleiner erlauben */
        max-width: 45%; /* Wenn nur 2 Bilder pro Zeile angezeigt werden sollen */
        /* Oder lass es bei 30% und sie werden kleiner, aber bleiben in einer Reihe */
    }

    .contact-form-container {
    margin: 20px 0%;
    padding: 20px 5%;
    }
}



/* -----------Footer Style ------------- */
.footer {
    background: #fff;
    padding: 20px 0;
    margin: 20px 0 0 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

.footer-first-row {  
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: center;
    column-gap: 15rem;
    align-items: center;
    width: 100%;

}

.footer-container a {
    text-decoration: none;
    color: black;
    transition: all 0.2s ease;
}

.footer-container a:hover {
    color: var(--WF-FM-white);
    background-color: var(--WF-FM-blue);
    
}

.webdesign-by {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: small;
}


/* Mobile Styles */
@media (max-width: 1000px) {
    .navbar {
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        bottom: 0;
        
        display: none;

        background: #fff;
        flex-direction: column;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);

        transform: translateX(100%);
        transition: transform 0.5s ease;
        transition: top 0.3s ease;
    }

    .navbar.scrolled{
        top: 80px;
    }
    
    .navbar.active {
        display: flex;
        transform: translateX(0);
    }

    .dropdown {
        position: relative;
        align-items: center;
    }

   .dropdown-content {
        left: 50%;
        transform: translateX(-50%);
   }
   
    .burger {
        display: flex;
    }

    .burger.active div:nth-child(1) {
        transform: rotate(45deg) translate(8px, 7px);
    }

    .burger.active div:nth-child(2) {
        opacity: 0;
    }

    .burger.active div:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -7px);
    }
}

@media (max-width: 450px) {
    .header-logo {
        max-width: 60vw;
        height: auto;
    } 

    #to-top {
        display: none;
    }

    .indent-content {    
        padding: 0 5%;    
    }
}






/* ---------Impressum Styles */
.impressum-container{
    height: 100%;
    margin: 100px 10%;
    font-size: clamp(0.9rem, 2vw, 1rem);
    text-wrap: wrap;
    padding-bottom: 150px;
}

.impressum-container a{
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .impressum-container {
        margin:100px 5%;
    }
}

.impressum-container h1 {
    font-weight: 500;
}

.impressum-container h2 {
    font-weight: 300;
    }

/* ------------Datenschutz Styles */
.datenschutz-container{
    height: 100%;
    margin: 100px 10%;
    font-size: clamp(0.9rem, 2vw, 1rem);
    text-wrap: wrap;
    padding-bottom: 150px;
}

.datenschutz-container a{
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .datenschutz-container {
        margin:100px 5%;
    }
}

.datenschutz-container h1 {
font-weight: 500;
}

.datenschutz-container h2 {
    font-weight: 300;
}

