/* =========================================================
   GLOBAL
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #CA4B3D;
    --primary-dark: #a63b30;
    --container-width: 1400px;
    --container-padding: 20px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
    background-color: var(--primary);
    color: white;
    width: 100%;
}

.topbar-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 8px var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    gap: 25px;
}

.topbar a {
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.topbar a:hover {
    text-decoration: underline;
}

.whatsapp-btn {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-btn svg {
    width: 20px;
    fill: var(--primary);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* =========================================================
   NAVBAR 
========================================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 1);
    min-height: 120px;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
}

.navbar-container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-right {
    flex: 1;
}

.logo img {
    height: 110px;
}

.nav-links {
    display: flex;
    align-items: center;     
    justify-content: center;  
    gap: 40px;                
}

.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 1.2em;
}

.nav-links a:hover {
    color: var(--primary);
}

.dropdown {
    display: inline-flex;   
    align-items: center;    
    position: relative;
}

.dropbtn {
    text-decoration: none;
    color: black;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    display: inline-flex;  
    align-items: center;
    padding: 0;            
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white; /* gleich wie die Navbar */
    min-width: 200px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    top: 100%; 
    left: 0;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: black;
    text-decoration: none;
    font-weight: normal;
}

.dropdown-content a:hover {
    color: #CA4B3D; 
}

/* Dropdown anzeigen beim Hover */
.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }

    .navbar-container {
        flex-direction: column;
    }

    .navbar-center {
        position: static;
        transform: none;
    }

    .logo img {
        height: 80px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

/* =========================================================
   HERO
========================================================= */
.hero {
    min-height: 300px;
    height: 45vh;
    position: relative;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-startseite {
    background-image: url("bilder/startseite.jpeg");
}
.hero-terrassenbau {
    background-image: url("bilder/terrassenbau.jpeg");
}
.hero-abbruch_und_entkernung {
    background-image: url("bilder/abbruch_und_entkernung.jpeg");
}
.hero-erdarbeiten {
    background-image: url("bilder/erdarbeiten.jpeg");
}
.hero-gartengestaltung {
    background-image: url("bilder/gartengestaltung.jpeg");
}
.hero-haushaltsaufloesung {
    background-image: url("bilder/haushaltsaufloesung.jpeg");
}
.hero-pflasterarbeiten {
    background-image: url("bilder/pflasterarbeiten.jpeg");
}
.hero-poolbau {
    background-image: url("bilder/poolbau.jpeg");
}
.hero-mietgeraete {
    background-image: url("bilder/mietgeraete2.jpeg");
}
.hero-projekte {
    background-image: url("bilder/projekte.jpeg");
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: white;
    max-width: 900px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .hero {
        height: 20vh;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }
}

/* =========================================================
   SECTIONS
========================================================= */
section {
    max-width: var(--container-width);
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.section-hell {
    background-color: weiß;
}

.section-rot {
    background-color: #ca4b3d;
}

.section-rot h2 {
    color: white;
}

/* =========================================================
   LEISTUNGEN – FINAL
========================================================= */
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.leistung-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: white;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leistung-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.leistung-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 60%);
    z-index: 1;
}

.leistung-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}

.leistung-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    z-index: 2;
}

.leistung-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.leistung-card:hover img {
    transform: scale(1.1);
}

.leistung-card:hover .leistung-text {
    color: var(--primary);
    transform: translateY(-5px);
}

.leistungen-grid .last-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 25px;
}

/* gleiche Breite wie Grid-Karten */
.last-row .leistung-card {
    width: calc((100% - 50px) / 3);
}


@media (max-width: 768px) {
    .leistungen-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .last-row {
        flex-wrap: wrap;
    }

    .last-row .leistung-card {
        width: calc(50% - 12.5px);
    }
}

@media (max-width: 500px) {
    .leistungen-grid {
        grid-template-columns: 1fr;
    }

    .last-row .leistung-card {
        width: 100%;
    }
}

/* =========================================================
   MASCHINEN 
========================================================= */
.maschine-wrapper {
    display: flex;
    gap: 0px;
    max-width: var(--container-width);
    margin: 0 auto;
    align-items: stretch;
    margin-bottom: 40px;
}

.maschine-info {
    flex: 1;
    min-width: 250px;
}

.maschine-zubehoer {
    flex: 1;
    min-width: 250px;
}

.maschine-info ul, 
.maschine-zubehoer lu {
    padding-left: 20px;
}

.maschine-info li,
.maschine-zubehoer li {
    margin-bottom: 8px;
}

.maschine-bilder { 
  display: flex; 
  justify-content: center; 
  gap: 15px; 
  flex-wrap: wrap; 
  margin-bottom: 40px; 
} 

.maschine-bilder img { 
  width: calc(25% - 10px); 
  max-width: 200px;
  aspect-ratio: 3 / 4;
  object-fit: cover; 
  border-radius: 10px; 
  cursor: pointer; 
}

@media (max-width: 600px) {
    .maschine {
        flex-direction: column;
    }

    .maschine-bilder img {
        width: calc(50% - 10px);
        height: 100px;
    }
}

/* =========================================================
   GALERIEN (Projekte)
========================================================= */
.galerie-ohne-untertitel,
.galerie-mit-untertitel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.galerie-ohne-untertitel img {
    width: calc(25% - 10px);
    max-width: 200px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.galerie-mit-untertitel figure {
    width: calc(33% - 10px);
    margin: 0;
}

.galerie-mit-untertitel img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.galerie-mit-untertitel figcaption {
    text-align: center;
    font-size: 0.9em;
    margin-top: 5px;
    color: #2c3e50;
}

/* =========================================================
   KONTAKT-BEREICH
========================================================= */
.kontakt-wrapper {
    display: flex;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
    align-items: stretch;
}

/* Linke Spalte */
.kontakt-info {
    flex: 1;
    min-width: 250px;
}

.kontakt-info h3 {
    color: var(--primary);
}

.kontakt-info p {
    margin: 10px 0;
}

.kontakt-right {
    flex: 2;
    display: flex;
    justify-content: center; 
    align-items: flex-start; 
}

.kontakt-box {
    min-width: 500px;
    max-width: 600px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.kontakt-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kontakt-form label {
    font-weight: bold;
}

.kontakt-form input,
.kontakt-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1em;
}

.kontakt-form input:focus,
.kontakt-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.kontakt-form button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
}

.kontakt-form button:hover {
    background-color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 900px) {
    .kontakt-wrapper {
        flex-direction: column;
    }

    .kontakt-right {
        justify-content: flex-start;
    }

    .kontakt-box {
        width: 100%;
        min-width: unset;
        max-width: unset;
    }
}

/* =========================================================
   FOOTER
========================================================= */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 15px;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* =========================================================
   LIGHTBOX FIX
========================================================= */
body.lightbox-open .navbar,
body.lightbox-open .topbar {
    opacity: 0;
    pointer-events: none;
}

body.lightbox-open {
    overflow: hidden;
}

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    text-align: center;
}

body.lightbox-open {
    overflow: hidden;
}

#lightbox-img {
    max-width: 90%;
    max-height: 60vh;
    border-radius: 10px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

body.lightbox-open #lightbox-img {
    transform: scale(1);
    opacity: 1;
}

#lightbox-title {
    color: white;
}

#lightbox-caption {
    color: #ccc;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    font-size: 30px;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

#thumbnails {
    margin-top: 15px;
}

#thumbnails img {
    width: 60px;
    margin: 5px;
    cursor: pointer;
    opacity: 0.6;
    border-radius: 5px;
}

#thumbnails img:hover {
    opacity: 1;
}

section a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

section a:hover {
    color: inherit;
    text-decoration: none;
}