/* === Allgemeine Stile === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* === Tabs === */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.tab {
    position: relative;
    padding: 12px 24px;
    color: black;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
    font-size: clamp(12px, 2vw, 16px);
    text-align: center;
    margin-bottom: 10px;
}

.tab.active {
    font-weight: bold;
    text-decoration-color: #8B0000;
}

.tab::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0%;
    background-color: #8B0000;
    transition: width 0.3s;
}

.tab.active::after {
    width: 100%;
}

/* === Karussell Pagination === */
.karussell-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0 16px;
}

.karussell-pagination .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d0d0d0;
    transition: background 0.3s, transform 0.3s;
    display: inline-block;
}

.karussell-pagination .dot.active {
    transform: scale(1.2);
}

/* === Karussell === */
.karussell-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.karussell {
    display: flex;
    justify-content: center;
    gap: 20px;
    transition: transform 0.8s;
    position: relative;
    width: 100%;
}

.karussell-kleingeraete {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Karussell Bild */
.bild { 
    aspect-ratio: 4 / 3;
    width: 30%;
    max-width: 90vw;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(30,144,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: auto;
    min-height: unset;
    min-width: unset;
    padding: 12px;
} 
 
.bild img {
    width: 100%;
    height: 90%;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 0;
    display: block;
}

.bild:hover img {
    transform: scale(1.07);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
}

.bild p {
    font-weight: bold;
    transition: color 0.3s; 
    font-size: 0.95em;
    margin: 0;
    padding: 0;
}

.bild:hover p {
    color: #555;
}

.bild.erdbohrer img {
    transform: scale(0.7);
}

/* Karussell Buttons */
.karussell-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 2em;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.karussell-button:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.karussell-button.prev { left: 10px; }
.karussell-button.next { right: 10px; }

/* === Cookie Popup === */
.cookie-popup {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 34, 34, 0.98);
    color: white;
    padding: 28px 32px 24px 32px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 1.5px 8px rgba(0,0,0,0.08);
    z-index: 3000;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
    width: 420px;
    animation: popup-fadein 0.5s;
    gap: 18px;
    min-height: 80px;
}

@keyframes popup-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.cookie-popup {
    animation: popup-fadein 0.5s cubic-bezier(0.4,0,0.2,1);
}

.cookie-popup p {
    margin: 0;
    text-align: center;
    font-size: 1.08em;
    line-height: 1.5;
}

.cookie-popup a {
    color: #1e90ff;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-button {
    background: linear-gradient(90deg, #1e90ff 0%, #00c6ff 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold; 
    margin: 8px 0 0 0;
    box-shadow: 0 2px 8px rgba(30,144,255,0.08);
    transition: background 0.2s, transform 0.2s;
}

.cookie-button:hover {
    background: linear-gradient(90deg, #00c6ff 0%, #1e90ff 100%);
    transform: translateY(-2px) scale(1.04);
}

.cookie-popup.hidden { display: none !important; }

/* Datenschutz & Impressum Modal */
#datenschutzModal,
#impressumModal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(30, 30, 30, 0.85);
    z-index: 4000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s;
}

#datenschutzModal.show,
#impressumModal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background: white;
    color: #222;
    margin: 60px auto;
    padding: 36px 28px 28px 28px;
    width: 95%;
    max-width: 600px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 8px rgba(0,0,0,0.08);
    animation: popup-fadein 0.5s;
    font-size: 1.08em;
    line-height: 1.7;
}

.close-btn1,
.close-btn {
    position: absolute;
    top: 18px; right: 18px;
    font-size: 1.5em;
    font-weight: bold;
    color: #1e90ff;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.close-btn1:hover,
.close-btn:hover {
    color: #ff3b3b;
    transform: scale(1.2) rotate(90deg);
}

/* Detailbox & Enlarged Image Overlay */
.detail-box-overlay,
.enlarged-image-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(30, 30, 30, 0.88);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.4s;
    animation: popup-fadein 0.5s;
}

.detail-box-overlay.show,
.enlarged-image-overlay.show {
    display: flex;
    opacity: 1;
}

.detail-box {
    width: 95%;
    max-width: 700px;
    background: white;
    border-radius: 18px;
    padding: 32px 24px 24px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 8px rgba(0,0,0,0.08);
    animation: popup-fadein 0.5s;
}

#detail-images, .images {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
}

.detail-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(30,144,255,0.08);
    display: block;
}

    .header-content h1 {
        transition: none !important;
    }

@media (max-width: 600px) {
    #detail-images, .images {
        flex-direction: column;
        align-items: center;
    }
    .detail-image {
        max-width: 98vw;
        width: 100%;
    }
}

.detail-box img {
    width: 45%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(30,144,255,0.08);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* === Hero Header === */
.hero-header {
    position: relative;
    height: 100vh;
    width: 100%;
    background-image: url('/images/182947056_2921712324815779_7395545478120006661_n.webp');
    background-size: cover;
    background-position: center;
    transition: height 0.5s;
    z-index: 10;
    will-change: height;
}

.hero-header.shrunk { height: 50vh; }

.header-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    transition: transform 0.5s;
}

.hero-header.shrunk .header-content { transform: translate(-50%, 0); }

.header-content h1 { font-size: 48px; font-weight: bold; margin-bottom: 30px; transition:none !important; }
.header-content p { font-size: 20px; font-weight: bolder; }

/* === Scroll-Indikator === */
.scroll-indicator {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 1.5s infinite;
}

.map-placeholder {
    width: 300px;
    height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #eee;
    overflow: hidden;
}
.map-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    display: block;
}
.map-placeholder-text {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 0 2px 8px #000;
    pointer-events: none;
    user-select: none;
}

.scroll-indicator span {
    display: block;
    width: 10px; height: 10px;
    margin: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
}

.scroll-indicator span:nth-child(2) { animation-delay: 0.3s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.7;}
    50% { transform: translateY(-10px); opacity: 1;}
}

/* === Footer === */
.footer {
    width: 100%;
    background: #333;
    color: white;
    padding: 20px 0;
    margin-top: 5%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.footer-column { display: flex; flex-direction: column; }
.footer-column h2 { font-size: 20px; margin-bottom: 10px; }

.info-item { display: flex; align-items: center; margin-bottom: 10px; }
.icon { margin-right: 10px; font-size: 24px; color: white; }

.footer-map iframe { width: 100%; height: 200px; border: none; }

.footer-form form,
.footer-column form { display: flex; flex-direction: column; gap: 10px; }

.footer-form input,
.footer-form textarea,
.footer-column form input,
.footer-column form textarea {
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background: #444;
    color: white;
    font-size: 14px;
}

.footer-form button,
.footer-column form button {
    background: #00529B;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.footer-form button:hover,
.footer-column form button:hover { background: #003f7d; }

.footer-column form input::placeholder,
.footer-column form textarea::placeholder { color: #aaa; font-size: 14px; }

.links-list { list-style: none; padding: 0; }
.links-list li { margin-bottom: 8px; }
.links-list a,
.links-list .link-button {
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.links-list a:hover,
.links-list .link-button:hover { text-decoration: underline; }

body.modal-open,
body.no-scroll { overflow: hidden; }

/* === Responsive Design === */
@media (max-width: 900px) {
    .karussell-container {
        max-width: 98vw;
    }
    .karussell {
        gap: 10px;
    }
    .bild {
        width: 30%;
        height: 180px;
        max-width: 98vw;
        max-height: 40vw;
        min-width: 120px;
        min-height: 120px;
        padding: 8px;
    }
    .bild img {
        max-width: 140px;
        max-height: 110px;
    }
}

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 16px;
        width: 100vw;
        padding: 0 2vw;
    }
    .tab {
        width: 100%;
        font-size: 1.1em;
        padding: 14px 0;
        margin-bottom: 0;
        border-radius: 8px;
        background: #f2f2f2;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        text-align: center;
    }
    .tab.active {
        font-weight: bold;
        box-shadow: 0 2px 8px rgba(30,144,255,0.08);
    }
    .tab::after {
        display: none;
    }
    .karussell {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100vw;
        padding: 0;
        overflow: visible;
    }
    .karussell-kleingeraete {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100vw;
        padding: 0;
    }
    .bild {
        width: 94vw;
        max-width: 94vw;
        min-width: 0;
        height: auto;
        min-height: 120px;
        max-height: none;
        margin: 0 auto;
        padding: 10px 0 14px 0;
        border-radius: 12px;
        background: white;
        box-shadow: 0 2px 12px rgba(30,144,255,0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .bild img {
        width: 90vw;
        max-width: 90vw;
        height: auto;
        max-height: 50%;
        object-fit: contain;
        border-radius: 8px;
        margin-bottom: 8px;
        background: white;
    }
    .bild p {
        font-size: 0.90em;
        text-align: center;
        margin: 0;
        padding: 0 8px;
        color: #222;
        font-weight: bold;
    }
        .karussell-button {
            position: static;
            width: 100vw;
            margin: 8px 0;
            font-size: 2em;
            padding: 12px 0;
            border-radius: 12px;
            background: transparent; /* Remove background for cleaner look */
            color: black;
            box-shadow: none;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 0;
        }
        .karussell-button.prev,
        .karussell-button.next {
            background: none;
            color: black;
            font-size: 2em;
            padding: 0 32px;
            border-radius: 8px;
            box-shadow: none;
            flex: unset;
            text-align: center;
            border: none;
        }
    
    .karussell-pagination {
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin: 18px 0 8px 0;
    }
    .karussell-pagination .dot {
        width: 16px;
        height: 16px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 2vw;
    }
    .footer {
        padding: 16px 0;
        font-size: 0.98em;
    }
}

@media (min-width: 601px) {
    .karussell-container {
        position: relative;
    }
    .karussell-button.prev,
    .karussell-button.next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        background: rgba(255,255,255,0.85);
        color: black;
        border: none;
        border-radius: 50%;
        font-size: 2em;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(30,144,255,0.12);
        cursor: pointer;
        transition: background 0.2s;
    }
    .karussell-button.prev { left: 10px; }
    .karussell-button.next { right: 10px; }
    .karussell-nav {
        display: block;
    }
}

/* Extra mobile tweaks for very small screens */
@media (max-width: 600px) {
    .karussell-container {
        max-width: 100vw;
        margin: 10px 0;
        padding: 0;
        overflow: visible;
        flex-direction: column;
        align-items: center;
    }
    .karussell {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100vw;
        padding: 0;
        overflow: visible;
    }
    .karussell-kleingeraete {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100vw;
        padding: 0;
    }
    .bild {
        aspect-ratio: 4 / 3;
        min-height: 180px;
        width: 98vw;
        max-width: 98vw;
        min-width: 0;
        margin: 0 auto;
        padding: 8px 0 12px 0;
        border-radius: 10px;
        background: white;
        box-shadow: 0 2px 12px rgba(30,144,255,0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .bild img {
        width: 92vw;
        max-width: 92vw;
        aspect-ratio: 4 / 3;
        object-fit: contain;
        border-radius: 6px;
        margin-bottom: 6px;
        background: white;
    }
    .bild p {
        font-size: 1em;
        text-align: center;
        margin: 0;
        padding: 0 8px;
        color: #222;
        font-weight: bold;
    }
    .karussell-button {
        position: static;
        width: auto;
        margin: 8px auto;
        font-size: 2em;
        padding: 0;
        border-radius: 12px;
        background: transparent;
        color: black;
        box-shadow: none;
        display: flex;
        flex-direction: row;
        justify-content: center;   /* Center the buttons together */
        align-items: center;
        gap: 0;                   /* No gap between buttons */
    }
    .karussell-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
        margin: 12px 0 0 0;
        width: 100%;
    }
    .karussell-button.prev,
    .karussell-button.next {
        position: static;
        width: auto;
        height: auto;
        margin: 0 2px;
        font-size: 2em;
        padding: 0 18px;
        border-radius: 8px;
        background: transparent;
        color: black;
        box-shadow: none;
        border: none;
        display: inline-block;
        transform: none;
    }
    .karussell-button {
        position: static;
        width: auto;
        margin: 0 2px;
        font-size: 2em;
        padding: 0 12px;
        border-radius: 8px;
        background: transparent;
        color: black;
        box-shadow: none;
        border: none;
        display: inline-block;
    }
    .karussell-pagination {
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin: 18px 0 8px 0;
    }
    .karussell-pagination .dot {
        width: 16px;
        height: 16px;
    }

    .header-content h1 {
        font-size: 1.9em;
        line-height: 1.1;
        word-break: break-word;
        transition: none !important;
    }
    .header-content p {
        font-size: 1em;
        line-height: 1.2; 
    }
    .cookie-popup,
    .modal-content,
    .detail-box {
        padding: 18px 4vw;
        max-width: 98vw;
        font-size: 1em;
        min-height: 80px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 2vw;
    }
    .footer {
        padding: 16px 0;
        font-size: 0.98em;
    }

        
        .tab {
            width: 100%;
            font-size: 1.1em;
            padding: 14px 0;
            margin-bottom: 0;
            border-radius: 8px;
            background: #f2f2f2;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
            text-align: center;
            position: relative; /* Ensure ::after works */
        }
        .tab::after {
            display: block;
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            height: 2px;
            width: 0%;
            background-color: #8B0000;
            transition: width 0.3s;
        }
        .tab.active::after {
            width: 100%;
        }
    
}