@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* === Grundfarben & Variablen === */
:root {
    --primary-color: #3A4766;
    --secondary-color: #EEF3FB;
    --accent-color: #2D62CC;
    --danger-color: #C20000;
    --light-grey: #F7F9FC;
    --dark-grey: #566586;
    --font-color: #333;
    --bg-color-light: #ffffff;
    --bg-color-dark: #121212;
    --font-color-dark: #f5f5f5;
}

/* === Globales Grundlayout === */
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    background-color: var(--bg-color-light);
    color: var(--font-color);
    transition: background-color 0.3s, color 0.3s;
}

body.darkmode {
    background-color: var(--bg-color-dark);
    color: var(--font-color-dark);
}

main {
    max-width: 1920px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* === Header-Struktur === */
.header-container {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1920px;
    margin: 0 auto;
    padding: 15px 20px;
    gap: 20px;
}

/* Topbar (Telefon, Mail) */
.top-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: white;
    background-color: var(--secondary-color);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
}


.contact-info {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 1;

}

.contact-info a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

/* Burger-Menü */
.burger-area {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    z-index: 1001;
}

.burger-area {
    position: fixed;
    top: 0px;
    left: 20px;
    z-index: 9999;
    background: white;/* ggf. Hintergrund, damit er nicht mit Content verschmilzt */
    padding: 3px;
    border-radius: 4px;
    visibility: hidden;  
}

@media (max-width: 769px) {
   .burger-area{
       visibility: visible;
   }

}

.nav-toggle,
.menu-close {
    font-size: 28px;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: none; /* Initial ausblenden */
}

body.menu-open .menu-close {
    display: block;
}

body.menu-open .nav-toggle  {
    display: none !important;
}

.logo-area {
    flex: 0 0 auto;
}

.logo-image {
    max-height: 80px;
}

.nav-search-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-nav {
    display: flex;
    padding-left: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.mini-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.mini-nav a:hover {
    color: var(--accent-color);
}

/* Logo & Burger Container */
.logo-search-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1920px;
    margin: 0 auto;
    padding: 15px 20px;
    gap: 15px;
}

.logo-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
/*    min-width: 0; */
}


.logo-image {
    max-height: 80px;
}

.search-wrapper {
    flex-grow: 1;
    min-width: 0;
    width: 100%;
    padding-left: 20px;
}

.search-form {
/*    position: relative;*/
    width: 95%;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-form input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

.search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--secondary-color);
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #d5e0f0;
}


::placeholder {
    opacity: 0.6;
    transition: opacity 0.3s;
}

:focus::placeholder {
    opacity: 0;
}


/* Navigation (sticky, sauber getrennt) */

.nav-scroll-container {
    position: relative;
    overflow: visible;
}

.main-nav {
    background: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 50;
    isolation: isolate;
}

.main-menu {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: left;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.main-menu::-webkit-scrollbar {
    display: none;
}
.main-menu > li {
    flex: 0 0 auto;
}
.main-menu {
    -ms-overflow-style: none;  /* IE 10+ */
    scrollbar-width: none;     /* Firefox */
}
.main-menu > li {
    scroll-snap-align: start;
}

.main-menu > li > a {
    display: block;
    padding: 7px 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 17px;
    margin:5px 2px 5px 2px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.main-menu > li > a:hover {
    background: var(--accent-color);
    border-radius: 5px;
}

.nav-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background:  var(--primary-color);/*var(--accent-color);*/
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 19px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 60;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-scroll-btn:hover {
    opacity: 1;
}

.nav-scroll-btn.left { left: 0; }
.nav-scroll-btn.right { right: 0; }


.hiddenmobilenav{
    display:none;
}
.main-menu .hiddenmobilenav {
    flex: 0 0 auto;
}
body.menu-open .hiddenmobilenav{
    display: inherit;
}

/* ------ Megamenü Dropdown ------- */
.main-menu > li {
    position: static;
}

.mega-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--light-grey);/*var(--bg-color-light);*/
    color: var(--font-color);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,.15);
    padding: 18px 20px;
    display: block;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 999;
}

.has-mega > .mega-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
}

/* Hover/Fokus sichtbar */
.has-mega:hover > .mega-panel,
.has-mega:focus-within > .mega-panel,
.has-mega.open > .mega-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Grid: 3 Spalten + Bild */
.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) 320px;
    gap: 20px;
    align-items: stretch;
    max-width: 1440px;
    margin: 0 auto;
}

/* Unterkategorie-Links */
.mega-col {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-right: 10px;
}
.mega-col li + li { margin-top: 6px; }
.mega-col a {
    display: block;
    padding: 8px 12px;
    color: var(--dark-grey);
    background: transparent;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.35;
    transition: background-color 0.1s ease, color 0.1s ease;


}
.mega-col a:hover,
.mega-col a:focus {
    background: var(--secondary-color); /* helles Blau-Grau als Hover-Hintergrund */
    color: var(--accent-color);         /* Akzentfarbe für Text */
    /*background: var(--accent-color);
    color: #fff;*/
}

/* Bildspalte */
.mega-visual {
    position: relative;
    border-radius: 12px;
    background: var(--bg-color-light); /*var(--secondary-color);*/
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    display: grid;
    align-content: end;
}
.mega-visual .mega-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease;  /* Crossfade */
    will-change: opacity;
}
.mega-visual .mega-img.is-fading { opacity: 1; }
.mega-visual .caption {
    position: absolute;
    left: 10px; right: 10px; bottom: 10px;
    background: rgba(255,255,255,.92);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--primary-color);
}

/* Responsive */
/* ===== Fix: kein horizontales Scrollen < 1047px ===== */
@media (max-width: 1047px) {
    /* Panel vollbreit, aber ohne Überstand */
    .mega-panel {
        left: 0;               /* statt -10px */
        right: 0;              /* statt -10px */
        border-radius: 0 0 12px 12px;
        padding-inline: 10px;  /* gleicht das alte "Überziehen" optisch aus */
    }

    /* Grid untereinander */
    .mega-grid { grid-template-columns: 1fr; }
    .mega-visual { order: -1; min-height: 180px; }

    /* Menü darf horizontal nicht überlaufen */
    .main-menu {
        overflow-x: hidden;          /* statt overflow: visible */
        overflow-y: visible;         /* Dropdowns dürfen nach unten aufgehen */
        scroll-snap-type: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* Sicherheitsnetz: Header-/Nav-Wrapper clippen */
    .nav-scroll-container { overflow-x: clip; }
    .header-container { overflow-x: clip; }

    /* Scroll-Buttons aus */
    .nav-scroll-btn { display: none; }
}

/* Zusätzliche Sicherung für das Off-Canvas-Menü < 768px */
@media (max-width: 768px) {
    .main-menu {
        overflow-x: hidden;  /* verhindert Rest-Overflow im Off-Canvas */
    }
}

/* Letzte Notbremse (falls irgendwo anders noch etwas übersteht) */
@media (max-width: 1047px) {
    html, body { max-width: 100%; overflow-x: hidden; }
}


@media (max-width: 480px) {
    .mega-col a { font-size: 17px; }
    .mega-panel { padding: 16px; }
}

.has-mega:hover .mega-panel,
.has-mega:focus-within .mega-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Breadcrumb */

.breadcrumb {
    font-size: 16px;
    color: var(--dark-grey);
    background: var(--light-grey);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s, transform 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.breadcrumb .divider svg {
    vertical-align: middle;
    color: #bbb;
}

.breadcrumb .dividerback svg{
    display: none;
}

.breadcrumb .current {
    color: var(--dark-grey);
    font-weight: 600;
    white-space: nowrap;
}

.breadcrumb a .home-icon {
    vertical-align: middle;
    color: var(--primary-color);
    transition: color 0.2s, transform 0.2s;
}

.breadcrumb a:hover .home-icon {
    color: var(--accent-color);
    transform: translateY(-2px);
}

body.darkmode .details,
body.darkmode .features,
body.darkmode .faq {
    background: #1e1e1e;
}

/* Darkmode Navigation */
.main-nav {
    background: var(--primary-color);
    transition: background-color 0.3s;
}

body.darkmode .main-nav {
    background: #222;
}

/* Suche Dropdown */
#search-suggestions {
    position: absolute;
    width: 100%;
    top: 100%;
    background: white;
    border: 1px solid #ccc;
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    border-radius: 8px;
}

.suggestion {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: var(--font-color);
    align-items: center;
}

.suggestion:hover {
    background-color: var(--secondary-color);
}

.suggestion img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.suggestion-text {
    font-size: 16px;
}

.suggestion .preis {
    color: var(--danger-color);
    font-weight: bold;
}

/* Back to Top Button */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: opacity 0.5s, transform 0.5s;
}

#backToTop.show {
    display: block;
    opacity: 0.8;
    transform: scale(1);
}

#backToTop:hover {
    background-color: var(--accent-color);
    opacity: 1;
}


/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    padding-top: 15px;
    padding-bottom: 30px;
    text-align: center;
    font-size: 14px;
    margin-top: 60px;
    border-top: 1px solid #d5e0f0;
}

.footer-container {
    font-size: 1.1rem;
    /*max-width: 1440px;*/
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 15px;
    gap: 20px;
    border-bottom: white 3px solid;
}

.footer-info {
    background-color: var(--bg-color-light); /*var(--light-grey);*/
    font-size: 0.9rem;
    /*max-width: 1440px;*/
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 5px;
    gap: 20px;
}

.footer-container a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-container a:hover {
    color: var(--accent-color);
}

/* Responsive Navigation & Layout */
@media (max-width: 768px) {
    h1{
        font-size: 1.75rem;
    }
    .wgbes{
        font-size:0;
    }

    .logo-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-nav-wrapper {
        justify-content: space-between;
        width: 100%;
    }
    .search-form {
        position: relative;
        width: 100%;
    }
    .search-form-wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    .search-wrapper{
        padding-left:0;
    }
    .top-bar{
        justify-content: right;
    }

    .main-menu {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        width: 99%;/* 300px;*/
        height: 100%;
        background: white;
        padding: 100px 20px 20px 20px;
        transition: transform 0.4s ease;
        z-index: 1000;
        box-shadow: 2px 0 6px rgba(0,0,0,0.1);
        flex-direction: column;
        list-style: none;
        margin: 0;
        overflow-y: auto;
    }

    body.menu-open .main-menu {
       /* left: 0; /* right wenn von rechts */
       transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }

    body.menu-open .menu-close {
        display: block;
    }

    .menu-close {
        display: none;
    }
    .main-menu > li > a {
        display: block;
        padding: 16px 20px;
        color: var(--primary-color);
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px solid #eee;
        transition: color 0.0s;
    }
    .main-menu > li > a:hover {
        color: white;
    }

    .container {
        flex-direction: column;
        gap: 20px;
    }

    .breadcrumb a:not(:nth-last-of-type(1)),
    .breadcrumb .divider:not(:nth-last-of-type(1)) {
        display: none;
    }

    .breadcrumb .dividerback svg {
        display: initial;
        vertical-align: middle;
        color: #bbb;
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 500px) {
      .contact-info {
          flex-direction: column;
      }
      .burger-area {
        top:20px;
      }
}


/*---- MEGAMENÜ BILDER ----- */
/* Feste Bühne, keine Sprünge */
.mega-visual {
    position: relative;
    border-radius: 12px;
    background: var(--bg-color-light);/*var(--secondary-color); */     /* Hintergrundfarbe für Ränder */
    aspect-ratio: 4 / 3;                    /* ggf. auf 4/3 ändern */
    min-width: 230px;
    max-height:250px;
    overflow: hidden;
}

/* Zwei Ebenen, jede hat eigenen Hintergrund (verhindert "Durchscheinen") */
.mega-visual .mega-layer {
    position: absolute;
    inset: 0;
    background: var(--bg-color-light);/*var(--secondary-color); */       /* gleiche Farbe wie Container */
    display: grid;
    place-items: center;                      /* Bild zentrieren */
    opacity: 0;
    transition: opacity .15s ease;
    will-change: opacity;
}
.mega-visual .mega-layer.is-visible { opacity: 1; }

/* Das Bild selbst: komplett sichtbar */
.mega-visual .mega-layer img {
    width: 100%;
    height: 100%;
    max-height:250px;
    object-fit: contain;                      /* <-- Bild stets komplett */
    object-position: center;
}

/* Darkmode */
body.darkmode .mega-visual,
body.darkmode .mega-visual .mega-layer { background: #222; }

.mega-visual .caption {
    position: absolute;
    left: 10px; right: 10px; bottom: 10px;
    background: rgba(247,249,252,.8);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--primary-color);
    z-index: 2;
}
body.darkmode .mega-visual .caption { background: rgba(0,0,0,.55); color: #f2f2f2; }



/* === FAQ =================================================== */
.faq-section{
    --faq-w: 100%;         /* ggf. 93% */
/*    --faq-max: 1440px; */
    --faq-gap: 14px;
    --faq-radius: 12px;

    width: var(--faq-w);
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid #dfe8f7;
}
.faq-heading{
    margin: 0 0 12px;
    font-size: 1.6rem;
    color: var(--primary-color);
}
body.darkmode .faq-heading{ color: var(--font-color-dark); }

.faq-list{ display: grid; gap: var(--faq-gap); }

.faq-item{
    background: var(--secondary-color);
    border-radius: var(--faq-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}
body.darkmode .faq-item{ background: #1e1e1e; box-shadow: 0 2px 10px rgba(0,0,0,.3); }

.faq-q{
    cursor: pointer;
    list-style: none;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    font-weight: 600; color: var(--primary-color);
}
body.darkmode .faq-q{ color: var(--font-color-dark); }

/* Default Marker verbergen (Safari/Chrome) */
.faq-q::-webkit-details-marker{ display: none; }

/* Chevron */
.faq-q::before{
    content: "";
    width: 18px; height: 18px; flex: 0 0 18px;
    border-radius: 50%;
    background:
        conic-gradient(from 45deg, transparent 0 25%, currentColor 0 50%, transparent 0 100%);
    color: var(--accent-color);
    transform: rotate(0deg);
    transition: transform .2s ease;
    opacity: .9;
}
/* geöffnet ? Pfeil nach oben */
.faq-item[open] .faq-q::before{ transform: rotate(180deg); }

.faq-a{
    padding: 0 18px 16px 40px;
    color: var(--dark-grey);
    animation: faqfade .18s ease;
}
body.darkmode .faq-a{ color: #cfd6e6; }

.faq-a p{ margin: 8px 0; }
@keyframes faqfade{ from{ opacity: 0; transform: translateY(-2px);} to{ opacity:1; transform:none;} }

/* Mobile Abstand etwas kompakter */
@media (max-width: 560px){
    .faq-a{ padding-left: 18px; }
}

