
/* ==========================================
   RAUMAMBIENTE AACHEN – HEADER
   ========================================== */

#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--color-header-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Inhaltscontainer bereits in base.css definiert */
#header .inside {
    min-height: 110px;
}

/* Bootstrap-Grid im Header */
#header .row {
    align-items: center;
}

/* ==========================================
   LOGO
   ========================================== */

.header-logo a {
    display: block;
    padding: 15px 0;
}

.header-logo img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* ==========================================
   NAVIGATION
   ========================================== */

#header .mod_navigation ul.level_1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;

    list-style: none;
    margin: 0;
    padding: 0;
}

#header .mod_navigation ul.level_1 > li {
    position: relative;
}

#header .mod_navigation ul.level_1 > li > a,
#header .mod_navigation ul.level_1 > li > strong {
    display: block;
    padding: 15px 0;

    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    color: var(--color-nav);
    border-bottom: 3px solid transparent;
}

#header .mod_navigation ul.level_1 > li > a:hover,
#header .mod_navigation ul.level_1 > li > strong.active,
#header .mod_navigation ul.level_1 > li.active > strong,
#header .mod_navigation ul.level_1 > li.trail > a {
    color: var(--color-nav-active);
    border-bottom-color: var(--color-nav-active);
}

/* ==========================================
   DROPDOWN – LEVEL 2
   ========================================== */

#header .mod_navigation ul.level_2 {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;

    min-width: 230px;
    margin: 0;
    padding: 10px 0;
    list-style: none;

    background: var(--color-white);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-radius: var(--radius-small);
}

#header .mod_navigation ul.level_1 > li:hover > ul.level_2,
#header .mod_navigation ul.level_1 > li:focus-within > ul.level_2 {
    display: block;
}

#header .mod_navigation ul.level_2 a,
#header .mod_navigation ul.level_2 strong {
    display: block;
    padding: 10px 18px;
    color: var(--color-nav);
    font-size: 15px;
    text-decoration: none;
}

#header .mod_navigation ul.level_2 a:hover {
    color: var(--color-petrol);
    background: var(--color-gray-extra-light);
}

/* ==========================================
   TELEFONBUTTON
   ========================================== */

.header-contact {
    display: flex;
    justify-content: flex-end;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 14px 20px;
    border-radius: var(--radius-medium);

    background: var(--color-button-bg);
    color: var(--color-white);

    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;

    transition: background var(--transition-default);
}

.header-phone i {
    font-size: 19px;
    color: var(--color-white);
}

.header-phone:hover {
    background: var(--color-button-hover);
    color: var(--color-white);
}

/* ==========================================
   TABLET / MOBILE – GRUNDLAGE
   ========================================== */

@media (max-width: 1199px) {

    #header .mod_navigation ul.level_1 {
        gap: 15px;
    }

    .header-logo img {
        max-width: 240px;
    }

    .header-phone {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ==========================================
   HEADER – TABLET 768 BIS 991 PX
   ========================================== */

@media (min-width: 768px) and (max-width: 991px) {

    #header .row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    /* Logo links */
    #header .row > :nth-child(1) {
        order: 1;
    }

    /* Telefon rechts */
    #header .row > :nth-child(3) {
        order: 2;
    }

    /* Navigation in zweite Zeile */
    #header .row > :nth-child(2) {
        order: 3;
    }

    #header .inside {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header-logo img {
        max-width: 260px;
    }

    #header .mod_navigation ul.level_1 {
        justify-content: center;
        gap: 30px;
    }

}


/* ==========================================
   HEADER – SMARTPHONE UNTER 768 PX
   ========================================== */

@media (max-width: 767px) {
    #header .header-logo a {
        padding: 0;
    }
    
    #header .inside {
        min-height: 76px;
        position: relative;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    #header .row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;

        /* Platz für den mobilen Menübutton */
        padding-right: 55px;
    }

    /* Logo */
    #header .row > :nth-child(1) {
        order: 1;
    }

    /* Desktop-Navigation ausblenden */
    #header .row > :nth-child(2) {
        display: none;
    }

    /* Telefon */
    #header .row > :nth-child(3) {
        order: 2;
    }

    .header-logo img {
        max-width: 160px;
        width: 100%;
        height: auto;
    }

    .header-contact {
        justify-content: center;
    }

    .header-phone {
        padding: 10px 12px;
        gap: 8px;
        font-size: 13px;
    }

    .header-phone i {
        font-size: 15px;
    }

}
