body {
    margin: 0;
    display: block;
    padding: 0;
  overflow-x: hidden;
}
/* Smooth Scroll für die gesamte Seite */
html {
    scroll-behavior: smooth;
}

/* Header - Oberster schwarzer Balken */
.top-bar {
    background-color: black;
    color: white;
    padding: 12px 20px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.icon-class {
    filter: invert(1);
}

/* Navigationselemente im Top-Bar */
.nav-items {
    display: flex;
    gap: 75px; /* Abstand zwischen den Items */
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 5px; /* Abstand zwischen Icon und Text */
}

.nav-item img {
    height: 16px;
    width: 16px;
}

/* Header - Weißer Bereich mit Navigation */
.nav-bar {
    background-color: rgba(21,144,221,255);
}

.nav-bar-sub {
    padding: 0px 2% 0px 2%;
    /*width: 100%;*/
    max-width: 1400px;
    display: flex;
    margin-right: auto;
    margin-left: auto;
    flex-wrap: wrap; /* Inhalte umbrechen für kleinere Bildschirme */
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    flex: 0 0 auto; /* Behält seine Größe */
}

.nav-links {
    display: contents;
    gap: 20px; /* Abstand zwischen Links */
    align-items: center;
    flex: 1; /* Passt sich der verbleibenden Breite an */
    justify-content: flex-end;
    position: relative; /* für Dropdown-Position */
}

.logo {
    width: 180px; /* Reduzierte Größe für mobile Geräte */
    display: block;
}

/* Navigation links */
.nav-link {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s;
    text-align: center; /* Optional für saubere Ausrichtung */
    font-size: 165%;
    cursor: pointer;
}

.nav-link:hover {
    color: #525457; /* Optional: Farbe beim Hover */
}

/* Link-Klicks im Header mit Icon */
.icon-link {
    text-decoration: none;
    color: white;
}

.icon-link:hover {
    color: #525457;
}

/* Dropdown-Menü Container (Elternelement der Dropdown-Liste) */
.nav-item {
    position: relative;
}

/* Dropdown-Liste */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(21, 144, 221, 1);
    padding: 10px 0;
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    margin: 0;
}

/* Dropdown sichtbar bei Hover (Desktop) */
.nav-item:hover > .dropdown {
    display: block;
}

.dropdown li {
    list-style: none;
}

.dropdown li a {
    color: white;
    padding: 8px 20px;
    display: block;
    text-decoration: none;
    font-weight: normal;
    font-size: x-large;
    transition: background-color 0.3s ease;
}

.dropdown li a:hover {
    background-color: rgba(0, 100, 180, 0.8);
    color: white;
}

/* Hover-Farbe für Hauptlink, wenn Dropdown offen */
.nav-item:hover > .nav-link {
    color: #525457;
}

/* --- Sichtbarkeit Desktop/Mobile --- */
.nav-bar-mobile {
    display: none; /* Standard: ausgeblendet */
}

/* Mobile Navigation - standardmäßig versteckt */
.nav-links-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 60px; /* Position unterhalb des Headers */
    left: 0;
    border-top: 1px solid #ddd;
    z-index: 999; /* sicherstellen, dass Menü oben liegt */
}

/* Sichtbar, wenn aktiv */
.nav-links-mobile.active {
    display: flex;
}

/* Fullscreen mobile panel when active */
.nav-links-mobile.active {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    top: 0;
    left: 0;
    width: auto;
 
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 1.2rem;
    background: #ffffff;
    z-index: 1500;
    padding: 80px 24px 24px 24px; /* leave space for header / close button */
    overflow-y: auto;
}

/* Close button in the top-right of the mobile panel */
.mobile-nav-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0,0,0,0.04);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
}
.mobile-nav-close:focus { outline: 2px solid #1590dd; }

/* Bigger link styles when menu is fullscreen */
.nav-links-mobile.active .nav-link-mobile {
    font-size: 1.5rem;
    padding: 14px 20px;
    color: #14508a;
    font-weight: 700;
   
    width: 100%;
    max-width: 720px;
    background: transparent;
    border-radius: 8px;
}
.nav-links-mobile.active .nav-link-mobile:hover {
    background: rgba(21,144,221,0.04);
}

/* Mobile submenu styles */
.mobile-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mobile-sub-toggle {
    background: transparent;
    border: none;
    color: #14508a;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 16px;
    width: 100%;
    max-width: 720px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.mobile-sub-toggle::after {
    content: '\25BC'; /* down caret */
    font-size: 0.85rem;
    color: #1590dd;
    transition: transform 0.18s ease;
}
.mobile-sub-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}
.mobile-submenu {
    width: 100%;
    max-width: 720px;
    list-style: none;
    padding: 0 8px 8px 28px;
    margin: 0 0 8px 0;
    display: none;
    flex-direction: column;
    gap: 6px;
}
.mobile-submenu li a {
    display: block;
    padding: 8px 12px;
    color: #0f334f;
    text-decoration: none;
    border-radius: 6px;
}
.mobile-submenu li a:hover { background: rgba(21,144,221,0.04); }
.mobile-submenu.open { display: flex; }

/* MEDIA QUERIES */

/* Tablets und kleinere Geräte */
@media (max-width: 981px) {
    .nav-bar {
        display: none; /* Desktop-Navi ausblenden */
    }
    .nav-bar-mobile {
        display: flex; /* Mobile-Navi anzeigen */
        justify-content: center;
        align-items: center;
        padding: 10px;
        background-color: rgba(21, 144, 221, 255);
        color: #333;
        border-bottom: 1px solid #ddd;
        position: relative;
    }

    .nav-bar-mobile-sub {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .logo-container-mobile {
        display: flex;
        align-items: center;
    }
    .logo-mobile {
        height: auto;
        width: 33%;
        margin-right: 0.5em;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        font-size: 2em;
        cursor: pointer;
        color: #333;
        margin-left: auto;
    }

    .nav-link-mobile {
        padding: 1em;
        border-bottom: 1px solid #eee;
        color: #333;
        text-decoration: none;
        font-size: 1.1em;
    }
    .nav-link-mobile:last-child {
        border-bottom: none;
    }
    .nav-link-mobile:hover {
        background-color: #f5f5f5;
        border-radius: 4px;
    }
    .additional-service-btn {
        width: 50%;               /* über volle Breite */
        padding: 16px 24px;        /* noch angenehmere Fläche */
        font-size: 1.1rem;         /* besser für Smartphones */
        border-radius: 12px;
        height: auto;
    }
}

/* Smartphones */
@media (max-width: 540px) {

    .top-bar {
        font-size: smaller; /* Noch kleinere Schriftgröße */
        padding: 5px 10px; /* Minimales Padding */
    }

    .nav-items {
        flex-direction: row; /* Nebeneinander statt untereinander */
        gap: 15px; /* Etwas mehr Abstand zwischen den Icons */
        justify-content: space-evenly; /* Items gleichmäßig verteilen */
    }

    .nav-item img {
        height: 12px;
        width: 12px; /* Kleinere Icons */
    }

    .nav-bar-sub {
        margin-right: 10px;
    }

    .logo {
        width: 80px; /* Kompaktes Logo */
    }

    .nav-links {
        justify-content: center; /* Zentrierte Links */
        margin-right: 10px;
    }

    .nav-link {
        font-size: small; /* Noch kleinere Schriftgröße */
    }
}
