/* ============================================= */
/* 9. MODAL / POPUP FENSTER (FINAL)              */
/* ============================================= */

/* --- Grundstruktur für alle Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Standardmäßig ausblenden */
    justify-content: center;
    align-items: center;
    z-index: 1030;
    padding: var(--space-md);
}
.modal-content {
    background: var(--light-color);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    position: relative;
    width: 100%;
    box-shadow: var(--shadow-medium);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
}
.modal-close:hover {
    color: var(--dark-color);
}

/* --- Spezifisches Layout für Fahrzeug-Details-Modal --- */
#vehicle-modal .modal-content {
    max-width: 700px; /* Breiter für Desktop-Ansicht */
    text-align: left;
}
.modal-layout {
    display: flex;
    flex-direction: column; /* Mobile-First */
    gap: var(--space-lg);
}
.modal-image-column img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
}
#vehicle-modal .tagline {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}
#vehicle-modal h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.8rem;
}
#vehicle-modal .vehicle-model {
    color: var(--text-color-light);
    margin-top: 0;
    margin-bottom: var(--space-md);
}
#vehicle-modal .capacity-info, #vehicle-modal .benefits-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}
#vehicle-modal .capacity-info li, #vehicle-modal .benefits-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
#vehicle-modal .capacity-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}
#vehicle-modal .benefits-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #28a745;
}

/* --- Responsive Anpassungen --- */
@media (max-width: 576px) {
    /* Kleinere Schrift auf Handys */
    #vehicle-modal h3 {
        font-size: 1.5rem;
    }
    #vehicle-modal p, #vehicle-modal li {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    /* Zweispaltiges Layout auf Desktop */
    .modal-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    /* KORREKTUR: Feste Breiten für die Spalten */
    .modal-image-column {
        flex: 0 0 40%; /* Bildspalte nimmt 40% der Breite ein und schrumpft nicht */
    }
    .modal-details-column {
        flex: 1 1 auto; /* Textspalte nimmt den Rest des Platzes ein */
    }
}