/* ===========================================
   VARIABLEN & RESET
   =========================================== */
:root {
    --primary: #008080;
    --secondary: #2d3436;
    --accent: #00cec9;
    --light: #f9f9f9;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    line-height: 1.6;
    color: var(--secondary);
    background-color: var(--white);
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */
header {
    background: var(--white);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s, background 0.3s;
}

.logo a { display: flex; align-items: center; }

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 2rem; }

nav ul li a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

nav ul li a:hover { color: var(--primary); }

/* ===========================================
   HAMBURGER
   =========================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===========================================
   HERO SLIDER
   =========================================== */
.slider-container {
    position: relative;
    height: 85vh;
    margin-top: 60px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
}

.slide.active { opacity: 1; }

.hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem 2.5rem;
    max-width: 650px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.btn-main {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent);
    color: var(--secondary);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-main:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,206,201,0.4);
}

.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===========================================
   SEKTIONEN
   =========================================== */
section { padding: 5rem 10%; }
.bg-light { background-color: var(--light); }

h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent);
    margin-top: 10px;
}

/* ===========================================
   LEISTUNGEN
   =========================================== */
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.leistung-card {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.leistung-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.leistung-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }

.leistung-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.leistung-card p { font-size: 0.95rem; color: #555; }

.leistungen-text { max-width: 800px; margin-top: 1rem; }
.leistungen-text p { font-size: 1.05rem; line-height: 1.8; }

.leistungen-highlights {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.leistungen-highlights span {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

/* ===========================================
   TROCKENBAU
   =========================================== */
.trockenbau-intro { max-width: 800px; margin-bottom: 2.5rem; }
.trockenbau-intro p { font-size: 1.1rem; line-height: 1.8; }

.trockenbau-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tb-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.tb-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }

.tb-card h3 { font-size: 1.15rem; color: var(--primary); margin-bottom: 0.6rem; }
.tb-card p { font-size: 0.95rem; line-height: 1.6; color: #555; }

.trockenbau-cta { text-align: center; max-width: 700px; margin: 0 auto; }
.trockenbau-cta p { font-size: 1.05rem; margin-bottom: 1.2rem; }

/* ===========================================
   ÜBER UNS
   =========================================== */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.about-text h2 { font-size: 2rem; }
.about-text p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; }

blockquote {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 1.2rem;
    margin: 0;
}

/* ===========================================
   KONTAKT
   =========================================== */
.kontakt-subtitle { font-size: 1.15rem; color: #666; margin-bottom: 2rem; }

.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
}

.kontakt-card {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.kontakt-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }

.kontakt-card h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.3rem; }
.kontakt-zeiten { font-size: 0.85rem; color: #888; margin-bottom: 0.8rem; }

.kontakt-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.kontakt-card a:hover { color: var(--accent); }

/* ===========================================
   FOOTER
   =========================================== */
footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 1.5rem 10%;
    text-align: center;
}

.footer-content p { font-size: 0.9rem; margin-bottom: 0.3rem; }

.footer-links { margin-top: 0.3rem; }

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
    cursor: pointer;
}

.footer-links a:hover { color: var(--white); }
.footer-links span { color: rgba(255,255,255,0.4); margin: 0 0.5rem; }

/* ===========================================
   MODAL
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-large {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--secondary); }

.modal h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.modal h2::after { width: 35px; height: 3px; margin-top: 8px; }

.modal h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p { font-size: 0.95rem; line-height: 1.7; margin-bottom: 0.8rem; color: #444; }
.modal-body a { color: var(--primary); text-decoration: none; }
.modal-body a:hover { color: var(--accent); }

.modal-meta {
    font-size: 0.8rem !important;
    color: #999 !important;
    margin-top: 1.5rem !important;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.modal-large::-webkit-scrollbar { width: 6px; }
.modal-large::-webkit-scrollbar-track { background: transparent; }
.modal-large::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.modal-large::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===========================================
   PROJEKT-ÜBERSCHRIFTEN
   =========================================== */
.project-heading {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-top: 3.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    font-weight: 600;
}

/* ===========================================
   IMAGE GRID
   =========================================== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.grid-item:hover img { transform: scale(1.08); }

/* --- OVERLAY: Desktop = Hover, Touch = immer sichtbar --- */
.grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,128,128,0.9) 0%, rgba(0,128,128,0.6) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    /* Desktop: ein-/ausblenden bei Hover */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.grid-item:hover .grid-overlay { opacity: 1; }

.grid-overlay h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 0.2rem; }
.grid-overlay p { color: rgba(255,255,255,0.85); font-size: 0.85rem; }

.grid-item.wide { grid-column: span 2; }
.grid-item.tall { grid-row: span 2; aspect-ratio: auto; }
.grid-item.feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* ===========================================
   RESPONSIVE – Tablet (≤ 768px)
   =========================================== */
@media (max-width: 768px) {

    .hamburger { display: flex; }

    nav {
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255,255,255,0.98);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 1050;
    }

    nav.open { opacity: 1; pointer-events: all; }

    nav ul { flex-direction: column; align-items: center; gap: 2rem; }
    nav ul li { margin-left: 0; }
    nav ul li a { font-size: 1.6rem; }

    h1 { font-size: 2.2rem; }

    .hero-content { padding: 1.5rem 1.8rem; margin: 0 1rem; }

    .leistungen-grid { grid-template-columns: 1fr; }
    .trockenbau-grid { grid-template-columns: repeat(2, 1fr); }
    .about-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    .kontakt-grid { grid-template-columns: 1fr; }

    .image-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .grid-item.wide, .grid-item.feature { grid-column: span 2; }

    .project-heading { font-size: 1.2rem; margin-top: 2.5rem; }
    .leistungen-highlights { flex-direction: column; gap: 0.5rem; }

    /* ——— TOUCH-FIX: Overlay immer sichtbar, aber kompakter ——— */
    .grid-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
        padding: 0.8rem;
    }

    .grid-overlay h3 { font-size: 0.9rem; }
    .grid-overlay p { font-size: 0.75rem; }

    /* Kein Zoom-Effekt auf Touch */
    .grid-item:hover img { transform: none; }
}

/* ===========================================
   RESPONSIVE – Smartphone (≤ 480px)
   =========================================== */
@media (max-width: 480px) {

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

    .image-grid { grid-template-columns: 1fr; }
    .grid-item.wide, .grid-item.feature { grid-column: span 1; }
    .grid-item.tall, .grid-item.feature { grid-row: span 1; }

    section { padding: 3rem 6%; }
    h2 { font-size: 1.8rem; }
    .project-heading { font-size: 1.1rem; }

    .hero-content { padding: 1.2rem 1.2rem; }
    h1 { font-size: 1.8rem; }

    .grid-overlay { padding: 0.6rem; }
    .grid-overlay h3 { font-size: 0.85rem; }
    .grid-overlay p { font-size: 0.7rem; }
}
