/*
 * Site setting "Transparent navigation over the first image", see transparent-header.js.
 * The script sets .litorals-header-overlay only when the page starts with a background image, so
 * without JavaScript the header stays as it is.
 */

/*
 * The image moves up behind the header; its content keeps its place. The section, not the frame,
 * moves, because bootstrap_package's .section clips its overflow.
 */
.litorals-header-overlay + #page-content > .section:first-child {
    margin-top: calc(-1 * var(--litorals-header-height, 0px));
}

.litorals-header-overlay + #page-content > .section:first-child > .frame-has-backgroundimage:first-child > .frame-group-container {
    padding-top: var(--litorals-header-height, 0px);
}

/* Soft shade keeps the white links readable on bright photos. */
#page-header.litorals-header-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Top of the page with a closed menu: transparent. Scrolled or open mobile menu: normal header. */
#page-header.litorals-header-overlay:not(.litorals-header-scrolled):not(:has(.navbar-collapse.show, .navbar-collapse.collapsing)) {
    background-color: transparent !important;
    box-shadow: none !important;
}

#page-header.litorals-header-overlay:not(.litorals-header-scrolled):not(:has(.navbar-collapse.show, .navbar-collapse.collapsing))::before {
    opacity: 1;
}

#page-header.litorals-header-overlay #mainnavigation > .navbar-nav > .nav-item > .nav-link {
    background-color: transparent !important;
}

#page-header.litorals-header-overlay:not(.litorals-header-scrolled):not(:has(.navbar-collapse.show, .navbar-collapse.collapsing)) #mainnavigation > .navbar-nav > .nav-item > .nav-link {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#page-header.litorals-header-overlay:not(.litorals-header-scrolled):not(:has(.navbar-collapse.show, .navbar-collapse.collapsing)) .navbar-toggler {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* bootstrap_package animates the header on wide screens only. */
@media (max-width: 991.98px) {
    #page-header.litorals-header-overlay {
        transition: background-color 0.3s ease;
    }
}
