/* ========================================================
   Variables
   ======================================================== */
:root {
    --primary: #009374;
    --primary-dark: #007a61;
    --gray-light: #eeeeee;
    --gray-medium: #5d6266;
    --gray-dark: #353535;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

/* ========================================================
   Reset & Base
   ======================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--gray-dark);
    background: var(--gray-light);
    line-height: 1.55;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================================
   Header
   ======================================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

/* ========================================================
   Layout (two-column)
   ======================================================== */
.layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
    align-items: start;
    padding: 32px 0 64px;
}

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

/* ========================================================
   Cards
   ======================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.card:last-child {
    margin-bottom: 0;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    line-height: 1.3;
}

/* ========================================================
   Form Fields
   ======================================================== */
.field {
    margin-bottom: 22px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-medium);
    margin-bottom: 8px;
}

/* --- Field Description --- */
.field-description {
    font-size: 0.82rem;
    color: var(--gray-medium);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* --- Profile Details Accordion --- */
.field-profiles-detail {
    margin-top: 10px;
}

.field-profiles-detail details {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.field-profiles-detail summary {
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    background: #f8f8f8;
    user-select: none;
    list-style: none;
}

.field-profiles-detail summary::-webkit-details-marker {
    display: none;
}

.field-profiles-detail summary::before {
    content: "▸ ";
}

.field-profiles-detail details[open] summary::before {
    content: "▾ ";
}

.profile-list {
    padding: 12px 14px;
}

.profile-list dt {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-top: 10px;
}

.profile-list dt:first-child {
    margin-top: 0;
}

.profile-list dd {
    font-size: 0.78rem;
    color: var(--gray-medium);
    margin-left: 0;
    margin-top: 2px;
    line-height: 1.45;
}

.source-link {
    font-size: 0.75rem;
    color: var(--gray-medium);
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.source-link a {
    color: var(--primary);
    text-decoration: underline;
}

/* --- Dropdown --- */
.select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--gray-dark);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235D6266' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.select:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Discrete Slider --- */
.slider-display {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    min-height: 1.4em;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(
        to right,
        var(--primary) 0%,
        var(--primary) var(--fill, 0%),
        #ddd var(--fill, 0%),
        #ddd 100%
    );
}

.slider:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #ddd;
}

.slider::-moz-range-progress {
    background: var(--primary);
    height: 6px;
    border-radius: 3px;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 4px;
    user-select: none;
}

.slider-ticks span {
    font-size: 0.72rem;
    color: var(--gray-medium);
    text-align: center;
    white-space: nowrap;
}

/* --- Toggle & Radio Groups --- */
.toggle-group,
.radio-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.pv-toggle-btn,
.pv-radio-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: var(--white);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pv-toggle-btn + .pv-toggle-btn,
.pv-radio-btn + .pv-radio-btn {
    border-left: 2px solid var(--primary);
}

.pv-toggle-btn.active,
.pv-radio-btn.active {
    background: var(--primary);
    color: var(--white);
}

.pv-toggle-btn:not(.active):hover,
.pv-radio-btn:not(.active):hover {
    background: rgba(0, 147, 116, 0.08);
}

/* --- PV Conditional Fields --- */
.pv-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.pv-fields.visible {
    max-height: 400px;
    opacity: 1;
    margin-top: 22px;
}

/* --- Spec Badges (Vehicle, Location, Tilt) --- */
.spec-badge {
    background: var(--gray-light);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border-left: 3px solid var(--primary);
}

.spec-badge-compact {
    padding: 10px 18px;
}

.spec-badge-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.spec-badge-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.spec-badge-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 0;
    flex: 1;
    min-width: 100px;
}

.spec-badge-divider {
    width: 1px;
    height: 28px;
    background: #ccc;
    margin: 0 14px;
    flex-shrink: 0;
}

.spec-badge-label {
    font-size: 0.7rem;
    color: var(--gray-medium);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.spec-badge-value {
    font-size: 0.85rem;
    color: var(--gray-dark);
    font-weight: 700;
}

.spec-badge-compact .spec-badge-item {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.spec-badge-compact .spec-badge-label {
    text-transform: none;
    font-size: 0.82rem;
}

.spec-badge-compact .spec-badge-value {
    font-size: 0.82rem;
}





/* ========================================================
   Results Column
   ======================================================== */
.results-column {
    position: sticky;
    top: 84px;
}

@media (max-width: 900px) {
    .results-column {
        position: static;
    }
}

.results-card {
    margin-bottom: 0;
}

/* --- Loading --- */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.error-text {
    color: #c62828;
}

/* --- Status Boxes --- */
.status-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.status-icon {
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.4;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.status-success .status-icon {
    background: var(--primary);
}

.status-warning .status-icon {
    background: #e65100;
}

.status-error .status-icon {
    background: #c62828;
}

.status-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.status-text p {
    font-size: 0.82rem;
    opacity: 0.85;
    margin: 0;
}

.status-success {
    background: #e8f5e9;
    border: 1px solid var(--primary);
    color: var(--primary-dark);
}

.status-warning {
    background: #fff3e0;
    border: 1px solid #e65100;
    color: #bf360c;
}

.status-error {
    background: #fce4ec;
    border: 1px solid #c62828;
    color: #c62828;
}

.status-info {
    background: #e3f2fd;
    border: 1px solid #1565c0;
    color: #0d47a1;
}

.status-info .status-icon {
    background: #1565c0;
}

/* --- Results Table --- */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.results-table thead th {
    background: var(--primary);
    color: var(--white);
    padding: 10px 10px;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
}

.results-table thead th:first-child {
    text-align: left;
}

.results-table tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.results-table tbody td.row-label {
    text-align: left;
    font-weight: 500;
    color: var(--gray-medium);
}

.results-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.error-cell {
    color: #c62828;
    font-style: italic;
}

.column-error {
    font-size: 0.78rem;
    color: #c62828;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

.no-data {
    text-align: center;
    padding: 32px 16px;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

/* --- Column Header Tooltips --- */
.th-with-tooltip {
    position: relative;
    cursor: default;
}

.th-with-tooltip .tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    margin-left: 5px;
    cursor: help;
    vertical-align: middle;
    position: relative;
}

.tooltip-trigger .tooltip-box {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: 12px 14px;
    background: var(--gray-dark);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 50;
    text-align: left;
    white-space: normal;
}

.tooltip-trigger .tooltip-box::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--gray-dark);
}

.tooltip-trigger:hover .tooltip-box {
    display: block;
}

/* Keep tooltip visible within the table on the right column */
.results-table th:last-child .tooltip-box {
    left: auto;
    right: 0;
    transform: none;
}

.results-table th:last-child .tooltip-box::before {
    left: auto;
    right: 16px;
    transform: none;
}

/* ========================================================
   CTA Section
   ======================================================== */
.cta-section {
    background: var(--primary);
    padding: 48px 0;
    text-align: center;
}

.cta-inner h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.cta-inner p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--white);
    opacity: 0.9;
    margin-bottom: 24px;
}

.cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: var(--white);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

/* ========================================================
   FAQ Section
   ======================================================== */
.faq-section {
    background: var(--white);
    padding: 56px 0 64px;
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--gray-dark);
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gray-dark);
    text-align: left;
    cursor: pointer;
    gap: 16px;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.25s;
    line-height: 1;
    width: 24px;
    text-align: center;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 18px;
}

.faq-answer p {
    font-size: 0.85rem;
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: 8px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
}

/* ========================================================
   Hero Image
   ======================================================== */
.hero-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--gray-dark);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
    object-position: center top;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(
        to top,
        rgba(53, 53, 53, 0.92) 0%,
        rgba(53, 53, 53, 0.6) 40%,
        rgba(53, 53, 53, 0.0) 100%
    );
    padding-bottom: 40px;
}

.hero-overlay h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.hero-overlay p {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--white);
    opacity: 0.9;
    max-width: 680px;
}

@media (max-width: 600px) {
    .hero-image img {
        max-height: 280px;
        object-position: center top;
    }

    .hero-overlay {
        padding-bottom: 24px;
    }

    .hero-overlay h1 {
        font-size: 1.4rem;
    }

    .hero-overlay p {
        font-size: 0.9rem;
    }
}

/* ========================================================
   Partner Footer (light grey)
   ======================================================== */
.footer-partners {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 28px 0;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 600px) {
    .footer-logos {
        gap: 28px;
    }

    .footer-logos img {
        height: 80px;
    }
}

/* ========================================================
   Main Footer (dark)
   ======================================================== */
.footer {
    background: var(--gray-dark);
    color: var(--white);
    padding: 24px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.82rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.78rem;
    opacity: 0.5;
    margin: 0;
}

/* ========================================================
   Sub-Pages (Datenschutz, Impressum, Rechtliches)
   ======================================================== */
.subpage {
    max-width: 800px;
    padding-top: 48px;
    padding-bottom: 64px;
}

.subpage h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.subpage h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-top: 28px;
    margin-bottom: 8px;
}

.subpage p {
    font-size: 0.9rem;
    color: var(--gray-medium);
    line-height: 1.7;
    margin-bottom: 12px;
}

.subpage ul {
    font-size: 0.9rem;
    color: var(--gray-medium);
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 24px;
}

.subpage li {
    margin-bottom: 4px;
}

.subpage a {
    color: var(--primary);
    text-decoration: underline;
}

.back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.back-link a {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.subpage ul li {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* --- Results Disclaimer --- */
.results-disclaimer {
    font-size: 0.75rem;
    color: var(--gray-medium);
    line-height: 1.5;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-style: italic;
}

/* --- Muted Link (grey) --- */
.link-muted {
    color: var(--gray-medium);
    text-decoration: underline;
}

.link-muted:hover {
    color: var(--gray-dark);
}

/* --- Footer Logo with Label --- */
.footer-logo-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.footer-logo-label {
    font-size: 0.78rem;
    color: var(--gray-medium);
    font-weight: 400;
}