/* ======================================================================
   CLAUDE: header.css - Header-Styles (Denkmalschutz-Design)
   ======================================================================

   CLAUDE: Zweck
   -------
   CLAUDE: Styles für Topbar, Hauptheader, Navigation, Mobile-Menü

   CLAUDE: Inhalt
   -------
   CLAUDE: 1) Site-Header Basis
   CLAUDE: 2) Header-Top (Topbar)
   CLAUDE: 3) Header-Main (Hauptnavigation)
   CLAUDE: 4) Header-Brand (Text + Logo)
   CLAUDE: 5) Desktop-Navigation
   CLAUDE: 6) CTA-Button
   CLAUDE: 7) Mobile-Menu-Toggle
   CLAUDE: 8) Mobile-Navigation (Off-Canvas)
   CLAUDE: 9) Sticky-Header
   CLAUDE: 10) Responsive Styles

   ====================================================================== */

/* ======================================================================
   CLAUDE: 1) SITE-HEADER BASIS
   ====================================================================== */

/* CLAUDE: Hauptcontainer - umschließt Topbar + Header-Main */
.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
}

/* ======================================================================
   CLAUDE: 2) HEADER-TOP (TOPBAR)
   ====================================================================== */

/* CLAUDE: Topbar - Telefon und Zusatztext */
.header-top {
    padding-block: var(--lhi-space-xs);
    font-family: var(--lhi-font-sans);
    font-size: var(--lhi-font-size-sm);
}

/* CLAUDE: Topbar Inner - zentriert und verteilt Inhalt */
.header-top__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--lhi-space-md);
    flex-wrap: wrap;
}

/* CLAUDE: Topbar Telefon-Link */
.header-top__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--lhi-space-xs);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--lhi-transition-fast);
}

.header-top__phone:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* CLAUDE: Topbar Icon */
.header-top__icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* CLAUDE: Topbar Zusatztext */
.header-top__extra {
    opacity: 0.9;
}

/* ======================================================================
   CLAUDE: 3) HEADER-MAIN (HAUPTNAVIGATION)
   ====================================================================== */

/* CLAUDE: Header-Main - enthält Brand, Nav, CTA */
.header-main {
    padding-block: var(--lhi-space-md);
    border-bottom: 1px solid var(--lhi-color-border);
}

/* CLAUDE: Header-Main Inner - Flexbox Layout */
.header-main__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--lhi-space-lg);
}

/* ======================================================================
   CLAUDE: 4) HEADER-BRAND (TEXT + LOGO)
   ====================================================================== */

/* CLAUDE: Brand-Container - enthält Text und Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: var(--lhi-space-md);
    flex-shrink: 0;
}

/* CLAUDE: Brand-Text Link */
.header-brand__text {
    display: flex;
    align-items: baseline;
    gap: 0.3em;
    text-decoration: none;
    transition: opacity var(--lhi-transition-fast);
}

.header-brand__text:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* CLAUDE: Brand-Wörter - individuelle Farben */
.header-brand__word {
    font-family: var(--lhi-font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

/* CLAUDE: WCAG Fix: Erstes Wort in Dark Umber */
.header-brand__word--1 {
    color: var(--lhi-color-text);
}

/* CLAUDE: WCAG Fix: Zweites Wort in Chestnut statt Gold */
/* CLAUDE: Kontrast Chestnut auf Marble White: 6.68:1 (AA) */
/* CLAUDE: Vorher Gold: 2.36:1 - FAIL */
.header-brand__word--2 {
    color: var(--lhi-color-secondary);
}

/* CLAUDE: Logo-Container */
.header-brand__logo {
    display: block;
    line-height: 0;
    transition: opacity var(--lhi-transition-fast);
}

.header-brand__logo:hover {
    opacity: 0.9;
}

/* CLAUDE: Logo-Bild */
/* CLAUDE: object-fit: contain verhindert Verzerrung bei festen Dimensionen */
/* CLAUDE: width: auto erlaubt Skalierung nach Seitenverhältnis */
/* CLAUDE: max-height begrenzt die Höhe, Logo skaliert proportional */
.header-brand__logo-img {
    display: block;
    width: auto;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* ======================================================================
   CLAUDE: 5) DESKTOP-NAVIGATION
   ====================================================================== */

/* CLAUDE: Navigation-Container */
.header-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

/* CLAUDE: Menü-Liste - horizontal */
.header-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* CLAUDE: Menü-Item */
.header-nav__list > .menu-item {
    position: relative;
}

/* CLAUDE: Menü-Link */
/* CLAUDE: white-space: nowrap verhindert Umbrechen von "Über uns" etc. */
.header-nav__list a {
    display: block;
    padding: var(--lhi-space-sm) var(--lhi-space-md);
    font-family: var(--lhi-font-sans);
    font-size: var(--lhi-font-size-base);
    font-weight: 500;
    color: var(--lhi-color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--lhi-transition-fast);
}

.header-nav__list a:hover,
.header-nav__list .current-menu-item > a,
.header-nav__list .current_page_item > a {
    color: var(--lhi-color-gold);
    text-decoration: none;
}

/* CLAUDE: Dropdown/Submenu */
.header-nav__list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--lhi-color-white);
    border: 1px solid var(--lhi-color-border);
    border-radius: var(--lhi-radius-md);
    box-shadow: var(--lhi-shadow-lg);
    padding: var(--lhi-space-xs) 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--lhi-transition-fast);
    z-index: 1001;
}

.header-nav__list > .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav__list .sub-menu a {
    padding: var(--lhi-space-sm) var(--lhi-space-md);
    font-size: var(--lhi-font-size-sm);
    border-bottom: 1px solid var(--lhi-color-border);
}

.header-nav__list .sub-menu .menu-item:last-child a {
    border-bottom: none;
}

/* ======================================================================
   CLAUDE: 6) CTA-BUTTON
   ====================================================================== */

/* CLAUDE: CTA-Button im Header */
.header-cta {
    flex-shrink: 0;
    margin-left: var(--lhi-space-md);
}

/* ======================================================================
   CLAUDE: 6b) HEADER KONTAKT-ICONS (Telefon + E-Mail)
   ====================================================================== */

/* CLAUDE: Container für Kontakt-Icons */
/* CLAUDE: Flexbox für horizontale Ausrichtung */
/* CLAUDE: Auf Desktop: E-Mail sichtbar, Telefon versteckt */
/* CLAUDE: Auf Mobile: Beide sichtbar */
.header-contact-icons {
    display: flex;
    align-items: center;
    gap: var(--lhi-space-xs);
}

/* CLAUDE: Icon-Links Basis-Styles */
/* CLAUDE: Mindestens 44x44px für Touch-Targets (WCAG) */
.header-contact-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--lhi-color-text);
    text-decoration: none;
    border-radius: var(--lhi-radius-sm);
    transition: color var(--lhi-transition-fast), background-color var(--lhi-transition-fast);
}

/* CLAUDE: Hover-Effekt für bessere Interaktivität */
.header-contact-icons a:hover {
    color: var(--lhi-color-gold);
    background-color: rgba(138, 107, 63, 0.1);
    text-decoration: none;
}

/* CLAUDE: Focus-Styles für Accessibility */
.header-contact-icons a:focus-visible {
    outline: 2px solid var(--lhi-color-gold);
    outline-offset: 2px;
}

/* CLAUDE: SVG-Icons einheitliche Größe */
/* CLAUDE: 22px ist gut lesbar aber nicht dominant */
.header-contact-icons svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* CLAUDE: Telefon-Icon komplett ausblenden */
/* CLAUDE: Verhindert Überlappung mit Hamburger-Menü auf Mobilgeräten */
/* CLAUDE: Telefon ist in Topbar verfügbar, hier redundant */
.header-contact-icons a.header-contact-icons__phone {
    display: none;
}

/* CLAUDE: Desktop (>= 1100px) - Icons vor CTA positionieren */
@media (min-width: 1100px) {
    /* CLAUDE: Auf Desktop: Icons vor CTA positionieren */
    .header-contact-icons {
        margin-left: auto;
        margin-right: var(--lhi-space-sm);
    }
}

/* ======================================================================
   CLAUDE: 7) MOBILE-MENU-TOGGLE
   ====================================================================== */

/* CLAUDE: Mobile Toggle Button - versteckt auf Desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: var(--lhi-space-xs);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

/* CLAUDE: Hamburger-Bars */
.mobile-menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--lhi-color-text);
    border-radius: 1px;
    transition: all var(--lhi-transition-normal);
}

/* CLAUDE: Hamburger Animation - X-Form wenn geöffnet */
.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ======================================================================
   CLAUDE: 8) MOBILE-NAVIGATION (OFF-CANVAS)
   ====================================================================== */

/* CLAUDE: Mobile Navigation Container */
/* CLAUDE: WICHTIG - visibility:hidden verhindert Layout-Einfluss wenn geschlossen */
/* CLAUDE: overflow:hidden auf Container verhindert horizontalen Scroll */
.mobile-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
}

/* CLAUDE: Mobile Navigation geöffnet */
/* CLAUDE: visibility:visible macht Navigation sichtbar und interaktiv */
.mobile-navigation.is-open {
    pointer-events: auto;
    visibility: visible;
}

/* CLAUDE: Backdrop - halbtransparenter Hintergrund */
.mobile-navigation__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(59, 42, 26, 0.5);
    opacity: 0;
    transition: opacity var(--lhi-transition-normal);
}

.mobile-navigation.is-open .mobile-navigation__backdrop {
    opacity: 1;
}

/* CLAUDE: Mobile Nav Panel - Slide-In von rechts */
.mobile-navigation__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background-color: var(--lhi-color-white);
    box-shadow: var(--lhi-shadow-xl);
    transform: translateX(100%);
    transition: transform var(--lhi-transition-normal);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-navigation.is-open .mobile-navigation__panel {
    transform: translateX(0);
}

/* CLAUDE: Panel Header */
.mobile-navigation__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--lhi-space-md);
    border-bottom: 1px solid var(--lhi-color-border);
}

/* CLAUDE: Brand im Mobile Panel */
.mobile-navigation__brand {
    font-family: var(--lhi-font-serif);
    font-size: var(--lhi-font-size-lg);
    font-weight: 700;
    display: flex;
    gap: 0.3em;
}

/* CLAUDE: Close Button */
.mobile-navigation__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    color: var(--lhi-color-text);
    cursor: pointer;
    transition: color var(--lhi-transition-fast);
}

.mobile-navigation__close:hover {
    color: var(--lhi-color-accent);
}

/* CLAUDE: Mobile Menu Content */
.mobile-navigation__content {
    flex-grow: 1;
    padding: var(--lhi-space-md);
}

/* CLAUDE: Mobile Menu Liste */
.mobile-navigation__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-navigation__list .menu-item {
    border-bottom: 1px solid var(--lhi-color-border);
}

.mobile-navigation__list .menu-item:last-child {
    border-bottom: none;
}

.mobile-navigation__list a {
    display: block;
    padding: var(--lhi-space-md);
    font-family: var(--lhi-font-sans);
    font-size: var(--lhi-font-size-lg);
    font-weight: 500;
    color: var(--lhi-color-text);
    text-decoration: none;
    transition: all var(--lhi-transition-fast);
}

.mobile-navigation__list a:hover,
.mobile-navigation__list .current-menu-item > a {
    color: var(--lhi-color-gold);
    background-color: var(--lhi-color-bg);
}

/* CLAUDE: Mobile Submenu */
.mobile-navigation__list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: var(--lhi-space-md);
    background-color: var(--lhi-color-bg);
}

.mobile-navigation__list .sub-menu a {
    font-size: var(--lhi-font-size-base);
    padding: var(--lhi-space-sm) var(--lhi-space-md);
}

/* CLAUDE: CTA im Mobile Menü */
.mobile-navigation__cta {
    margin-top: var(--lhi-space-lg);
    padding-top: var(--lhi-space-md);
    border-top: 1px solid var(--lhi-color-border);
}

/* ======================================================================
   CLAUDE: 9) STICKY-HEADER
   ====================================================================== */

/* CLAUDE: Sticky Header Styles */
.header-sticky-enabled.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    box-shadow: var(--lhi-shadow-md);
}

/* CLAUDE: Sticky Animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* CLAUDE: Topbar ausblenden bei Sticky */
.header-sticky-enabled.is-sticky .header-top {
    display: none;
}

/* CLAUDE: Platzhalter wenn Header sticky ist */
body.has-sticky-header {
    padding-top: var(--header-height, 80px);
}

/* ======================================================================
   CLAUDE: 10) RESPONSIVE STYLES
   CLAUDE: Breakpoints: 1100px (Desktop/Mobile), 768px (Tablet), 576px (Small Mobile)
   ====================================================================== */

/* CLAUDE: Desktop (>= 1100px) */
/* CLAUDE: Breakpoint von 1024px auf 1100px erhöht für mehr Platz */
@media (min-width: 1100px) {
    .mobile-menu-toggle {
        display: none;
    }

    .mobile-navigation {
        display: none;
    }
}

/* CLAUDE: Übergangsbereich Desktop/Tablet (1100px - 1299px) */
/* CLAUDE: Navigation kompakter für engeren Platz */
@media (min-width: 1100px) and (max-width: 1299px) {
    /* CLAUDE: Kompaktere Navigation Paddings */
    .header-nav__list a {
        padding: var(--lhi-space-xs) var(--lhi-space-sm);
        font-size: var(--lhi-font-size-sm);
    }

    /* CLAUDE: CTA kompakter */
    .header-cta {
        padding: 0.5rem 1rem;
        font-size: var(--lhi-font-size-sm);
    }

    /* CLAUDE: Weniger Gap zwischen Elementen */
    .header-main__inner {
        gap: var(--lhi-space-md);
    }
}

/* CLAUDE: Tablet/Mobile (< 1100px) */
/* CLAUDE: Mobile-Menü aktiv, Desktop-Navigation versteckt */
@media (max-width: 1099px) {
    /* CLAUDE: Navigation verstecken */
    .header-nav {
        display: none;
    }

    /* CLAUDE: CTA verstecken (erscheint im Mobile-Menü) */
    .header-cta {
        display: none;
    }

    /* CLAUDE: Mobile Toggle anzeigen */
    .mobile-menu-toggle {
        display: flex;
    }

    /* CLAUDE: Kontakt-Icons vor Toggle, mit auto-margin */
    .header-contact-icons {
        margin-left: auto;
    }

    /* CLAUDE: Header-Main__Inner für Mobile */
    .header-main__inner {
        gap: var(--lhi-space-sm);
    }

    /* CLAUDE: Brand kleiner auf Tablet */
    .header-brand__word {
        font-size: clamp(1rem, 3vw, 1.25rem);
    }

    /* CLAUDE: Logo kleiner - Seitenverhältnis bleibt erhalten */
    .header-brand__logo-img {
        max-height: 50px;
        width: auto;
    }
}

/* CLAUDE: Tablet-Portrait (768px - 1099px) */
/* CLAUDE: Neuer Zwischenbreakpoint für bessere Tablet-Darstellung */
@media (min-width: 768px) and (max-width: 1099px) {
    /* CLAUDE: Topbar leicht kompakter */
    .header-top__inner {
        font-size: var(--lhi-font-size-sm);
    }

    /* CLAUDE: Brand-Text etwas größer als auf kleinen Mobiles */
    .header-brand__word {
        font-size: 1.1rem;
    }

    /* CLAUDE: Mehr Platz für Icons auf Tablets */
    .header-contact-icons {
        gap: var(--lhi-space-sm);
    }
}

/* CLAUDE: Kleine Mobile Geräte (< 768px) */
@media (max-width: 767px) {
    /* CLAUDE: Brand noch kleiner */
    .header-brand__word {
        font-size: 1rem;
    }

    /* CLAUDE: Logo kleiner */
    .header-brand__logo-img {
        max-height: 45px;
        width: auto;
    }

    /* CLAUDE: Icons kompakter */
    .header-contact-icons {
        gap: 0;
    }

    .header-contact-icons a {
        width: 40px;
        height: 40px;
    }

    .header-contact-icons svg {
        width: 20px;
        height: 20px;
    }
}

/* CLAUDE: Sehr kleine Mobile Geräte (< 576px) */
@media (max-width: 575px) {
    /* CLAUDE: Topbar kompakter - vertikal stapeln */
    .header-top__inner {
        flex-direction: column;
        gap: var(--lhi-space-xs);
        text-align: center;
    }

    /* CLAUDE: Brand minimal */
    .header-brand__word {
        font-size: 0.95rem;
    }

    /* CLAUDE: Logo noch kleiner - Seitenverhältnis bleibt erhalten */
    .header-brand__logo-img {
        max-height: 40px;
        width: auto;
    }

    /* CLAUDE: Header-Main kompakter */
    .header-main {
        padding-block: var(--lhi-space-sm);
    }

    /* CLAUDE: Minimale Gaps */
    .header-main__inner {
        gap: var(--lhi-space-xs);
    }
}
