/*!
 * Landhotel Weingarten – Header, Navigation, Kopfslider, Lightbox
 * Bootstrap 5.3.9, mobile first. Ersetzt sm-core-css, sm-universal-weingarten-farbe,
 * flexslider, slick, slick-theme, magnific-popup, jquery.modal und stacktable CSS.
 */

:root {
    --lhw-brown: #6f6353;
    --lhw-red: #6a1210;
    --lhw-cream: #faeec9;
    --lhw-font-nav: "Open Sans Condensed", "PT Sans Narrow", "Arial Narrow", Arial, Helvetica, sans-serif;
    --lhw-header-h: 108px;
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
/* Sticky Header: immer sichtbar (fixed-top). Sprungmarken nicht unter dem Header verstecken. */
html {
    scroll-padding-top: var(--lhw-header-h);
}

.lhw-header {
    background: #fff url("/resources/images/bg-holz-07-header.jpg");
    transition: box-shadow .3s ease;
}

/* Unter dem Klaro-Cookie-Dialog (z-index 1000) bleiben, wie vorher (999) */
.lhw-header.fixed-top {
    z-index: 999;
}

/* Beim Scrollen etwas kräftigerer Schatten, damit sich der Header vom Inhalt abhebt */
.lhw-header.lhw-header--scrolled {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.lhw-header .navbar {
    --bs-navbar-padding-y: 0;
    --bs-navbar-padding-x: 0;
}

.lhw-brand-bar {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 106px;
    padding: 5px 8px 5px 12px;
}

.lhw-logo img {
    display: block;
    width: 210px;
    height: auto;
}

/* Burger-Button */
.lhw-burger {
    position: relative;
    width: 52px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.lhw-burger:focus-visible {
    outline: 2px solid var(--lhw-cream);
    outline-offset: 2px;
}

.lhw-burger span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 3px;
    border-radius: 2px;
    background: var(--lhw-cream);
    transition: transform .25s ease, opacity .25s ease, top .25s ease;
}

.lhw-burger span:nth-child(1) { top: 12px; }
.lhw-burger span:nth-child(2) { top: 20px; }
.lhw-burger span:nth-child(3) { top: 28px; }

.lhw-burger:not(.collapsed) span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.lhw-burger:not(.collapsed) span:nth-child(2) { opacity: 0; }
.lhw-burger:not(.collapsed) span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------------------------------------------------------------
   Navigation (mobil: aufklappbare Liste)
   --------------------------------------------------------------- */
.lhw-nav-bar {
    background: var(--lhw-brown);
    border-top: 2px solid var(--lhw-cream);
    box-shadow: 0 6px 6px rgba(0, 0, 0, .2);
}

.lhw-nav-bar.show {
    max-height: calc(100vh - var(--lhw-header-h));
    overflow-y: auto;
}

.lhw-nav {
    width: 100%;
    margin: 0;
    padding: 0;
}

.lhw-nav .nav-item {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.lhw-nav .nav-link {
    padding: 10px 58px;
    font-family: var(--lhw-font-nav);
    font-size: 20px;
    font-weight: 300;
    line-height: 23px;
    letter-spacing: 1px;
    text-align: center;
    color: #fff;
}

.lhw-nav .nav-link:hover,
.lhw-nav .nav-link:focus-visible {
    color: #fff;
    background: rgba(0, 0, 0, .15);
}

.lhw-nav .nav-link.active {
    color: #fff;
    background: var(--lhw-red);
}

/* +/- Knopf für Untermenüs (nur mobil) */
.lhw-sub-toggle {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .5);
    background: rgba(0, 0, 0, .15);
    color: #fff;
    font-size: 22px;
    line-height: 32px;
}

.lhw-sub-toggle::before {
    content: "+";
}

.lhw-sub-toggle:not(.collapsed)::before {
    content: "\2212";
}

.lhw-sub {
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
}

.lhw-sub .dropdown-item {
    padding: 9px 30px;
    font-family: var(--lhw-font-nav);
    font-size: 18px;
    font-weight: 300;
    line-height: 23px;
    letter-spacing: .9px;
    text-align: center;
    white-space: normal;
    color: var(--lhw-brown);
}

.lhw-sub .dropdown-item:hover,
.lhw-sub .dropdown-item:focus-visible {
    color: var(--lhw-red);
    background: var(--lhw-cream);
}

.lhw-sub .dropdown-item.active {
    color: var(--lhw-red);
    font-weight: 600;
    background: transparent;
}

/* ---------------------------------------------------------------
   Navigation ab lg (≥ 992px): waagrechte Leiste mit Dropdowns
   --------------------------------------------------------------- */
@media (min-width: 992px) {
    :root {
        --lhw-header-h: 187px;
    }

    /* Logo und Menüleiste untereinander (navbar-expand-lg setzt sonst nowrap) */
    .lhw-header .navbar {
        flex-wrap: wrap;
    }

    .lhw-header .navbar-collapse {
        flex-basis: 100%;
    }

    .lhw-brand-bar {
        justify-content: center;
        min-height: 140px;
        padding: 5px 0 0;
    }

    .lhw-logo img {
        width: 300px;
    }

    .lhw-nav {
        justify-content: center;
    }

    .lhw-nav .nav-item {
        border-bottom: 0;
    }

    /* Selektor stärker als Bootstraps .navbar-expand-lg .navbar-nav .nav-link */
    .lhw-header .lhw-nav .nav-link {
        padding: 10px clamp(16px, 2.6vw, 40px);
    }

    .lhw-sub {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        min-width: 100%;
        width: max-content;
        max-width: 340px;
        padding: 7px 0;
        border: 1px solid #a8a8a8;
        border-radius: 0 0 4px 4px;
        box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
    }

    /* Untermenü öffnen: per Klick/Tippen auf den Pfeil (.lhw-open, gesetzt in lhw-main.js)
       oder per Tastatur. Hover nur bei echten Mäusen, sonst "klebt" es auf Touch-Geräten. */
    .lhw-has-sub.lhw-open > .lhw-sub,
    .lhw-has-sub:has(:focus-visible) > .lhw-sub {
        display: block !important;
    }

    /* Menüpunkt + Pfeil-Knopf als eine Einheit */
    .lhw-nav .lhw-has-sub {
        display: flex;
        align-items: stretch;
    }

    .lhw-header .lhw-nav .lhw-has-sub > .nav-link {
        padding-right: 0;
    }

    .lhw-nav .nav-item:hover > .nav-link:not(.active),
    .lhw-nav .nav-item:hover > .lhw-sub-toggle,
    .lhw-nav .lhw-open > .nav-link:not(.active),
    .lhw-nav .lhw-open > .lhw-sub-toggle {
        background: rgba(0, 0, 0, .15);
    }

    .lhw-nav .nav-link.active + .lhw-sub-toggle {
        background: var(--lhw-red);
    }

    /* Pfeil-Knopf (mobil "+", ab lg ein Pfeil nach unten) */
    .lhw-sub-toggle {
        position: static;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        /* großzügige Tippfläche (≥ 44px), Pfeil mittig darin */
        min-width: 44px;
        padding: 0 clamp(12px, 2vw, 30px) 0 14px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .lhw-sub-toggle::before,
    .lhw-sub-toggle:not(.collapsed)::before {
        content: "";
        display: block;
        width: 8px;
        height: 8px;
        margin-top: -4px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform .2s ease, margin .2s ease;
        /* Dezenter Hinweis: Pfeil wippt alle paar Sekunden kurz nach unten, versetzt je Menüpunkt */
        animation: lhw-arrow-hint 4s ease-in-out 1.5s infinite;
    }

    .lhw-nav > .lhw-has-sub:nth-child(3) > .lhw-sub-toggle::before { animation-delay: 1.8s; }
    .lhw-nav > .lhw-has-sub:nth-child(4) > .lhw-sub-toggle::before { animation-delay: 2.1s; }
    .lhw-nav > .lhw-has-sub:nth-child(5) > .lhw-sub-toggle::before { animation-delay: 2.4s; }
    .lhw-nav > .lhw-has-sub:nth-child(6) > .lhw-sub-toggle::before { animation-delay: 2.7s; }

    .lhw-has-sub.lhw-open > .lhw-sub-toggle::before,
    .lhw-has-sub:has(:focus-visible) > .lhw-sub-toggle::before {
        margin-top: 4px;
        transform: rotate(-135deg);
        animation: none;
    }

    .lhw-sub-toggle:focus-visible {
        outline: 2px solid var(--lhw-cream);
        outline-offset: -4px;
    }
}

/* Mit echter Maus zusätzlich beim Überfahren öffnen */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .lhw-has-sub:hover > .lhw-sub {
        display: block !important;
    }

    .lhw-has-sub:hover > .lhw-sub-toggle::before {
        margin-top: 4px;
        transform: rotate(-135deg);
        animation: none;
    }
}

/* "translate" statt "transform", damit sich Wippen und Drehen nicht in die Quere kommen */
@keyframes lhw-arrow-hint {
    0%, 76%, 100% { translate: 0 0; opacity: 1; }
    84% { translate: 0 3px; opacity: .7; }
    92% { translate: 0 0; opacity: 1; }
}

@media (min-width: 992px) {
    .lhw-sub .dropdown-item {
        text-align: left;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lhw-sub-toggle::before {
        animation: none !important;
    }
}

/* ---------------------------------------------------------------
   Kopfslider (Bootstrap Carousel)
   --------------------------------------------------------------- */
.lhw-slider .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
}

.lhw-slider .carousel-indicators {
    margin-bottom: 1.25rem;
}

.lhw-slider .carousel-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    margin: 0 7px;
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .25);
    background-clip: padding-box;
    opacity: 1;
}

.lhw-slider .carousel-indicators .active {
    background-color: #fff;
}

.lhw-slider .carousel-control-prev,
.lhw-slider .carousel-control-next {
    width: 12%;
}

/* ---------------------------------------------------------------
   Lightbox (Bootstrap Modal + Carousel)
   --------------------------------------------------------------- */
.lhw-lightbox .modal-content {
    color: #fff;
    background: #111;
    border: 0;
}

.lhw-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    margin: 0 auto;
    object-fit: contain;
}

.lhw-lightbox-caption {
    min-height: 2.5rem;
    margin: 0;
    padding: .5rem 3rem 1rem;
    text-align: center;
    font-size: .95rem;
}

.lhw-lightbox-counter {
    color: rgba(255, 255, 255, .75);
}

@media (max-width: 767.98px) {
    .lhw-lightbox .modal-body {
        display: flex;
        align-items: center;
    }

    .lhw-lightbox .carousel {
        width: 100%;
    }
}

@media print {
    .lhw-header {
        display: none;
    }
}
