
:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #6f7a8d;
    --line: #e5eaf2;
    --brand: #1f4f8f;
    --brand-dark: #153967;
    --danger: #c54040;
    --danger-soft: #fff1f1;
    --success: #2e8b57;
    --success-soft: #edf9f2;
    --shadow: 0 16px 40px rgba(22, 34, 56, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #132d4d 0%, #0d2139 100%);
    color: white;
    padding: 24px 18px 64px;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: white;
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: .04em;
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 1.05rem;
}

.brand span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .65);
    font-size: .82rem;
}

.search-box {
    margin-bottom: 18px;
}

.search-box input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: white;
    padding: 12px 14px;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, .5);
}

.search-box input:focus {
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .12);
}

.nav-group {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: white;
    padding: 14px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-weight: 700;
}

.chevron {
    transition: transform .2s ease;
    opacity: .7;
}

.nav-group.open .chevron {
    transform: rotate(180deg);
}

.nav-group-items {
    display: none;
    padding-bottom: 10px;
}

.nav-group.open .nav-group-items {
    display: block;
}

.vehicle-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    padding: 10px 10px;
    border-radius: 10px;
    font-size: .92rem;
    transition: background .18s ease, color .18s ease;
}

.vehicle-link:hover,
.vehicle-link.active {
    color: white;
    background: rgba(255, 255, 255, .12);
}

.vehicle-link.active {
    box-shadow: inset 3px 0 0 #7fb3ff;
}

.vehicle-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: .65;
    flex: 0 0 auto;
}

.main-content {
    min-width: 0;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 3px 0 0;
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    letter-spacing: -.03em;
}

.eyebrow {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 800;
}

.group-badge {
    margin-left: auto;
    padding: 9px 13px;
    border-radius: 999px;
    background: #e9f1fc;
    color: var(--brand);
    font-size: .82rem;
    font-weight: 800;
}

.menu-button {
    display: none;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.description-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 22px;
}

.description-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eaf2ff;
    color: var(--brand);
    font-weight: 900;
    flex: 0 0 auto;
}

.description-card h2 {
    margin: 1px 0 7px;
    font-size: 1rem;
}

.description-card p {
    margin: 0;
    color: #4f5c70;
    line-height: 1.6;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.image-column {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.column-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.column-header h2 {
    margin: 8px 0 0;
    font-size: 1.15rem;
}

.status-label {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .72rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .08em;
}

.status-label.accident {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-label.repaired {
    background: var(--success-soft);
    color: var(--success);
}

.image-count {
    color: var(--muted);
    font-size: .82rem;
    white-space: nowrap;
}

.gallery {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    border: 0;
    padding: 0;
    background: #eef2f7;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.035);
}

.image-number {
    position: absolute;
    right: 9px;
    bottom: 9px;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(10, 18, 30, .74);
    color: white;
    font-size: .78rem;
    font-weight: 800;
    backdrop-filter: blur(5px);
}

.empty-state,
.empty-page,
.empty-nav {
    color: var(--muted);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 30px 15px;
    text-align: center;
}

.empty-page {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 10, 18, .92);
    display: grid;
    place-items: center;
    padding: 28px 78px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox figure {
    margin: 0;
    text-align: center;
    max-width: min(1200px, 90vw);
}

.lightbox img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.lightbox figcaption {
    color: white;
    margin-top: 12px;
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    border: 0;
    color: white;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.lightbox-close {
    top: 20px;
    right: 22px;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 2rem;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

@media (max-width: 1050px) {
    .app-shell {
        grid-template-columns: 270px minmax(0, 1fr);
    }

    .main-content {
        padding: 22px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        width: min(88vw, 320px);
        transition: transform .22s ease;
        box-shadow: 12px 0 40px rgba(0, 0, 0, .2);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .main-content {
        padding: 18px;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .group-badge {
        display: none;
    }

    .lightbox {
        padding: 60px 10px 20px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
    }
}


.sidebar-footer {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, .38);
    font-size: .76rem;
}

.sidebar-footer a {
    color: rgba(255, 255, 255, .58);
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: white;
}

.legal-page {
    min-height: 100vh;
    padding: 36px 20px;
}

.legal-wrap {
    max-width: 920px;
    margin: 0 auto;
}

.legal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.legal-back {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.legal-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 4vw, 44px);
}

.legal-card h1 {
    margin-top: 0;
}

.legal-card h2 {
    margin-top: 30px;
    font-size: 1.15rem;
}

.legal-card p,
.legal-card li {
    color: #4f5c70;
    line-height: 1.7;
}

.legal-card address {
    font-style: normal;
    line-height: 1.75;
}

.legal-note {
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff7e8;
    color: #745312;
}

/* Impressum und Datenschutz innerhalb der Fahrzeugoberfläche */
.sidebar {
    display: flex;
    flex-direction: column;
}

.vehicle-nav {
    flex: 1 1 auto;
    min-height: 0;
}

.sidebar-footer {
    position: static;
    flex: 0 0 auto;
    margin-top: 18px;
    padding: 14px 8px 2px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    justify-content: flex-start;
}

.sidebar-footer a.active {
    color: white;
    font-weight: 700;
}

.legal-content-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 3vw, 42px);
    max-width: 1120px;
}

.legal-section {
    padding-top: 26px;
    margin-top: 26px;
    border-top: 1px solid var(--line);
}

.legal-section.first {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.legal-section h2 {
    margin: 0 0 12px;
    font-size: 1.08rem;
    color: var(--text);
}

.legal-section p,
.legal-section li,
.legal-section address {
    color: #4f5c70;
    line-height: 1.75;
    font-size: .98rem;
}

.legal-section p {
    margin: 0 0 12px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section address {
    font-style: normal;
}

.legal-section a {
    color: var(--brand);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
    margin-top: 28px;
}

.legal-details-grid .legal-section {
    margin-top: 0;
}

.privacy-text {
    max-width: 1180px;
}

.privacy-text ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.privacy-text li + li {
    margin-top: 6px;
}

@media (max-width: 760px) {
    .legal-content-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .legal-details-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal-details-grid .legal-section + .legal-section {
        margin-top: 22px;
    }
}


/* Seitenleiste: nur die Fahrzeugliste scrollt, Footer bleibt sichtbar */
.sidebar {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: 100vh;
    overflow: hidden;
    padding: 24px 18px 14px;
}

.vehicle-nav {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    overscroll-behavior: contain;
}

.sidebar-footer {
    position: relative;
    z-index: 20;
    width: 100%;
    margin: 0;
    padding: 13px 8px 3px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    background: #0d2139;
    box-shadow: 0 -12px 20px rgba(13, 33, 57, .96);
}

.sidebar-footer a,
.sidebar-footer span {
    position: relative;
    z-index: 1;
}

.legal-section address strong {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--text);
    font-weight: 800;
}

.contact-list {
    width: 100%;
    max-width: 430px;
    margin: 0;
}

.contact-list > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    align-items: baseline;
    margin-bottom: 8px;
}

.contact-list dt,
.contact-list dd {
    margin: 0;
    color: #4f5c70;
    line-height: 1.55;
    white-space: nowrap;
}

.contact-list dt {
    font-weight: 600;
}

@media (max-width: 760px) {
    .sidebar {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
    }

    .contact-list > div {
        grid-template-columns: 65px minmax(0, 1fr);
        column-gap: 10px;
    }
}
