/* ==========================================================
   Nützlicher Scroll – Frontend Styles
   Horizontal Scroll on Vertical Scroll

   Uses position:fixed/absolute instead of sticky because
   Impreza's .l-canvas has overflow:hidden.
   ========================================================== */

/* ── Marker wrappers: invisible but preserved in DOM ── */
/* Wrapped in wpb_content_element to survive Impreza's DOM cleanup */
.nhs-marker-wrap {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* ── Space Holder: creates vertical scroll room ── */
.nhs-space-holder {
    position: relative;
    width: 100%;
    overflow: visible;
    /* height is set by JS */
}

/* ── Fixed Container: positioned by JS (absolute → fixed → absolute) ── */
.nhs-fixed-container {
    /* position, top, left, width, height set by JS */
    overflow: hidden;
    /* Let touch/scroll events pass through to the page */
    pointer-events: none;
    /* Leave space for progress bar at bottom */
    padding-bottom: 48px;
    box-sizing: border-box;
}

/* On mobile: let content overflow the fixed container */
@media (max-width: 767px) {
    .nhs-fixed-container {
        overflow: visible !important;
    }
}

/* Extra bottom space so content doesn't get cut off by progress bar */
.nhs-inner-constrainer {
    padding-bottom: 50px !important;
}

/* Re-enable interaction on actual content */
.nhs-fixed-container * {
    pointer-events: auto;
}

/* ── Horizontal Wrapper: flex container for panels ── */
.nhs-horizontal-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    height: 100%;
    will-change: transform;
    /* width and transform set by JS */
}

/* ── Scroll Panels ── */
.nhs-scroll-panel {
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    /* width set by JS */
}

/* ── Fullscreen Mode: panels fill viewport ── */
.nhs-mode-fullscreen .nhs-scroll-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* height set by JS */
}

/* Fullscreen: center inner Impreza content */
.nhs-mode-fullscreen .nhs-scroll-panel > .l-section-h {
    margin: auto 0;
    width: 100%;
}

/* ── Natural Mode: panels keep their natural height ── */
.nhs-mode-natural .nhs-scroll-panel {
    height: auto;
    min-height: 100%;
}

.nhs-mode-natural {
    align-items: stretch;
}

/* ── Fix margins inside scroll (both l-section and g-cols panels) ── */
.nhs-scroll-panel {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Ensure full-width content stays contained (inter-row panels) */
.nhs-scroll-panel .l-section-h {
    max-width: 100%;
}

/* ── Intra-row mode: inner row panels ── */
/* Inner rows (g-cols) used as panels need to fill their container */
.nhs-scroll-panel.g-cols,
.nhs-scroll-panel.vc_inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Print styles: show all panels stacked vertically ── */
@media print {
    .nhs-space-holder {
        height: auto !important;
    }

    .nhs-fixed-container {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
    }

    .nhs-horizontal-wrapper {
        flex-direction: column !important;
        width: 100% !important;
        transform: none !important;
        will-change: auto;
    }

    .nhs-scroll-panel {
        width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* ── Progress Bar ── */
.nhs-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #382dba;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
    /* Accessibility: WCAG AAA contrast #fff on #382dba = 7.2:1 */
    /* Don't block touch scrolling */
    pointer-events: none;
}

.nhs-progress-bar.nhs-progress-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Track (background) */
.nhs-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

/* Fill (animated) */
.nhs-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Panel dots */
.nhs-progress-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nhs-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.nhs-progress-dot.nhs-dot-active {
    background: #fff;
    transform: scale(1.3);
}

.nhs-progress-dot.nhs-dot-done {
    background: rgba(255, 255, 255, 0.7);
}

/* Label */
.nhs-progress-label {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Accessibility */
.nhs-progress-bar:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
    .nhs-progress-bar {
        transition: none !important;
    }
    .nhs-progress-fill {
        transition: none !important;
    }
}

/* ── CTA Button ── */
.nhs-cta-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background-color: #382dba;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    z-index: 100;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.2s ease;
    /* Accessibility: WCAG AA contrast ratio #fff on #382dba = 7.2:1 ✓ */
}

.nhs-cta-button:hover,
.nhs-cta-button:focus-visible {
    background-color: #2a1f9e;
    transform: translateY(-1px);
}

.nhs-cta-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.nhs-cta-button:active {
    transform: translateY(0);
    background-color: #221990;
}

/* Desktop: sticky at viewport bottom */
.nhs-cta-button--sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

.nhs-cta-button--sticky.nhs-cta-visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile: allow content to overflow and be visible */
@media (max-width: 767px) {
    /* Panels can be taller than viewport on mobile */
    .nhs-scroll-panel,
    .nhs-inner-panel {
        overflow: visible !important;
        height: auto !important;
        min-height: 100% !important;
    }
    .nhs-inner-constrainer {
        min-height: auto !important;
    }
    .nhs-progress-bar {
        pointer-events: none;
    }
    .nhs-progress-bar a,
    .nhs-progress-bar button {
        pointer-events: auto;
    }
    .nhs-cta-button--sticky {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ── WPBakery Backend Editor ── */

/* ── Accessibility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    .nhs-horizontal-wrapper {
        transition: none !important;
    }
    .nhs-cta-button {
        transition: none !important;
    }
}
