/* DS Hero Slider — Frontend Styles v1.0.0 */

/* ---- Scoped reset ---- */
.ds-hero *, .ds-hero *::before, .ds-hero *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- CSS-Variablen (Fallbacks falls <style> fehlt) ---- */
.ds-hero {
    --ds-hero-accent: #e07b20;
    --ds-hero-nav-bg: #f5f0e8;
}

/* ---- Container ---- */
.ds-hero {
    position: relative;
    width: 100%;
    background: #0a0a0a;
    font-family: inherit;
    contain: layout paint style;
}

/* Screen reader only — gilt für Announcer UND versteckte Seiten-H1 */
.ds-hero__announcer,
.ds-hero__page-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Track: CSS Grid — Höhe = höchster Slide ---- */
.ds-hero__track {
    display: grid;
    overflow: hidden;
}

/* ---- Alle Slides in derselben Grid-Zelle gestapelt ---- */
.ds-hero__slide {
    grid-area: 1 / 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(400px, 38vw, 640px);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    transition: opacity 0.6s ease;
}

.ds-hero__slide--active {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Hintergrundbild ---- */
.ds-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.ds-hero__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Diagonale Textur */
.ds-hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255,255,255,.022) 0px,
        rgba(255,255,255,.022) 1px,
        transparent 1px,
        transparent 12px
    );
    pointer-events: none;
}

.ds-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.ds-hero__gradient {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,.82) 0%,
        rgba(0,0,0,.56) 42%,
        rgba(0,0,0,.12) 72%,
        transparent 100%
    );
}

/* ---- Inhalt ---- */
.ds-hero__content {
    position: relative;
    z-index: 10;
    max-width: 680px;
    padding: 64px 56px;
}

/* ---- Badge-Bereich: [BADGE] | [NAV-TITEL] ---- */
.ds-hero__badge-area {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
    line-height: 1.4;
}

.ds-hero__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ds-hero-accent);
    padding: 0;
}

.ds-hero__badge-divider {
    display: inline-block;
    width: 1px;
    height: 13px;
    background: rgba(255,255,255,.35);
    margin: 0 12px;
    flex-shrink: 0;
}

.ds-hero__badge-navtitle {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
}

/* ---- Überschrift ---- */
.ds-hero__headline {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(32px, 4.8vw, 68px);
    line-height: 1.08;
    color: #ffffff;
    margin-bottom: 0;
    word-break: break-word;
    hyphens: auto;
}

/* ---- Subtext ---- */
.ds-hero__subtext {
    font-size: clamp(13px, 1.4vw, 16px);
    line-height: 1.65;
    color: rgba(255,255,255,.88);
    max-width: 520px;
    margin-top: 16px;
    margin-bottom: 28px;
}

/* ---- Buttons ---- */
.ds-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ds-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    padding: 13px 24px;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    min-height: 44px;
}

.ds-hero__btn--primary {
    background: #ffffff;
    color: #0a0a0a;
    border: 2px solid #ffffff;
}

.ds-hero__btn--primary:hover,
.ds-hero__btn--primary:focus-visible {
    background: var(--ds-hero-accent);
    color: #ffffff;
    border-color: var(--ds-hero-accent);
    transform: translateX(2px);
    outline: none;
}

.ds-hero__btn--secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,.55);
}

.ds-hero__btn--secondary:hover,
.ds-hero__btn--secondary:focus-visible {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
    outline: none;
}

.ds-btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-style: normal;
}

.ds-hero__btn--primary:hover .ds-btn-arrow {
    transform: translateX(3px);
}

/* Foto-Credit */
.ds-hero__photo-credit {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.32);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: none;
    user-select: none;
}

/* ---- Navigation ---- */
.ds-hero__nav {
    display: flex;
    align-items: stretch;
    background: var(--ds-hero-nav-bg);
    border-top: 1px solid rgba(0,0,0,.07);
}

.ds-hero__nav-arrows {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-right: 1px solid rgba(0,0,0,.09);
    flex-shrink: 0;
}

.ds-hero__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    margin: 10px 0;
}

.ds-hero__arrow:hover {
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.3);
}

.ds-hero__arrow:focus-visible {
    outline: 2px solid rgba(255,255,255,.7);
    outline-offset: 2px;
}

.ds-hero__nav-items {
    display: flex;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ds-hero__nav-items::-webkit-scrollbar {
    display: none;
}

.ds-hero__nav-item {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 14px 20px 12px;
    background: none;
    border: none;
    border-right: 1px solid rgba(0,0,0,.08);
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    text-align: left;
    scroll-snap-align: start;
    min-height: 56px;
}

.ds-hero__nav-item:last-child {
    border-right: none;
}

.ds-hero__nav-item:hover {
    background: rgba(0,0,0,.04);
}

.ds-hero__nav-item:focus-visible {
    outline: 2px solid rgba(255,255,255,.7);
    outline-offset: -2px;
}

.ds-hero__nav-num {
    font-size: 11px;
    color: rgba(0,0,0,.35);
    font-weight: 500;
    letter-spacing: .06em;
    margin-bottom: 3px;
    display: block;
    line-height: 1.2;
}

.ds-hero__nav-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    line-height: 1.3;
    white-space: nowrap;
}

.ds-hero__nav-item--active .ds-hero__nav-num {
    color: rgba(0,0,0,.5);
}

.ds-hero__nav-item--active .ds-hero__nav-label {
    color: #0a0a0a;
}

/* Aktive Linie — nutzt Akzentfarbe */
.ds-hero__nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
}

.ds-hero__nav-item--active .ds-hero__nav-bar {
    background: var(--ds-hero-accent);
}

/* Kreis-Indikator */
.ds-hero__nav-item--active .ds-hero__nav-label::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid #0a0a0a;
    margin-right: 7px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .ds-hero__content {
        padding: 56px 44px;
        max-width: 600px;
    }

    .ds-hero__photo-credit {
        right: 32px;
    }
}

@media (max-width: 960px) {
    .ds-hero__slide {
        min-height: clamp(380px, 52vw, 520px);
    }

    .ds-hero__content {
        padding: 44px 32px;
        max-width: 520px;
    }

    .ds-hero__headline {
        font-size: clamp(28px, 4.2vw, 54px);
    }

    .ds-hero__photo-credit {
        display: none;
    }
}

@media (max-width: 768px) {
    .ds-hero__slide {
        min-height: clamp(360px, 72vw, 480px);
    }

    .ds-hero__content {
        padding: 36px 24px;
        max-width: 100%;
    }

    .ds-hero__nav-item {
        padding: 12px 14px 10px;
        min-width: 90px;
    }

    .ds-hero__nav-label {
        font-size: 13px;
    }

    .ds-hero__nav-arrows {
        padding: 0 8px;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .ds-hero__slide {
        min-height: clamp(460px, 120vw, 640px);
        justify-content: flex-end;
    }

    .ds-hero__gradient {
        background: linear-gradient(
            180deg,
            rgba(0,0,0,.10) 0%,
            rgba(0,0,0,.60) 40%,
            rgba(0,0,0,.88) 100%
        );
    }

    .ds-hero__content {
        padding: 28px 18px;
    }

    .ds-hero__badge {
        font-size: 10px;
    }

    .ds-hero__badge-navtitle {
        font-size: 10px;
    }

    .ds-hero__badge-area {
        margin-bottom: 14px;
    }

    .ds-hero__headline {
        font-size: clamp(26px, 7.5vw, 40px);
        line-height: 1.1;
    }

    .ds-hero__subtext {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .ds-hero__buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ds-hero__btn {
        font-size: 13px;
        padding: 11px 20px;
        width: 100%;
        justify-content: center;
    }

    .ds-hero__nav-arrows {
        display: none;
    }

    .ds-hero__nav-item {
        min-width: 80px;
        padding: 10px 12px 8px;
    }

    .ds-hero__nav-num {
        font-size: 10px;
    }

    .ds-hero__nav-label {
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .ds-hero__slide {
        min-height: clamp(480px, 135vw, 600px);
    }

    .ds-hero__headline {
        font-size: clamp(22px, 7vw, 32px);
    }

    .ds-hero__nav-item {
        min-width: 70px;
        padding: 8px 10px 6px;
    }

    .ds-hero__nav-label {
        font-size: 11px;
    }
}

/* ============================================================
   BARRIEREFREIHEIT — reduzierte Bewegung
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ds-hero__slide {
        transition: none;
        will-change: auto;
    }

    .ds-hero__btn {
        transition: none;
    }

    .ds-btn-arrow {
        transition: none;
    }
}

/* ============================================================
   DRUCK
   ============================================================ */
@media print {
    .ds-hero__slide {
        opacity: 1 !important;
        pointer-events: auto !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .ds-hero__nav,
    .ds-hero__photo-credit {
        display: none;
    }
}
