﻿/* ==========================================================================
   1. VARIABLEN
   ========================================================================== */
:root {
    /* Schriftarten */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    /* Farbpalette für das Autohaus */
    --color-bg: #ffffff; /* Hintergrund der Seite */
    --color-text-main: #222222; /* Haupttext (Edles Dunkelgrau) */
    --color-text-muted: #666666; /* Für kleinere Infos (z.B. Erstzulassung, KM-Stand) */
    --color-primary: #d32f2f; /* Deine Markenfarbe / Akzent (z.B. für Preise & Buttons) */
}

/* ==========================================================================
   2. GLOBALER RESET & LAYOUT-STRUKTUR (Global optimiert für festen Kopf/Fuß)
   ========================================================================== */
html, body {
    height: 100% !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Verhindert doppelten, hässlichen Scrollbalken ganz außen */
}

body {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-image: url('/Images/neuerhinteergrund.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: var(--font-body);
    color: var(--color-text-main);
    line-height: 1.6;
}
/* 3. Und hier auf deine Überschriften */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
}

.fahrzeug-preis {
    font-family: var(--font-heading);
    color: var(--color-primary); /* Nutzt das sportliche Rot aus der Zentrale */
    font-size: 24px;
    font-weight: 700;
}
/* 🌟 KORREKTUR: Der App-Container füllt exakt den Bildschirm aus */
#app-layout-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* KORREKTUR: Zwingt fixierte Bootstrap-Elemente, NIEMALS breiter als der Bildschirm zu sein */
.navbar.fixed-top {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 1030;
}

    /* 🚀 SICHERHEITS-FIX: Schützt das container-fluid-Innere der Navbar vor globalen Abständen */
    .navbar.fixed-top .container-fluid {
        padding-bottom: 0 !important;
        height: auto !important;
    }

#layout-root {
    width: 100%;
    max-width: 100%;
}

/* 🚀 DAS HERZSTÜCK: Nur diese Mittelschicht scrollt automatisch, wenn Inhalt da ist */
#main-content-scrollview {
    flex-grow: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 0rem; /* Abstand wegen der fixed-top Navbar */
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

/* 🌟 KORREKTUR: Der Footer bleibt unten, wird aber niemals den Inhalt überlagern */
footer {
    flex-shrink: 0;
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    z-index: 1020;
    width: 100%;
}

/* Altes Wrapper-Element zur Abwärtskompatibilität gesichert */
#main-content-wrapper {
    width: 100%;
    margin: 0;
}

/* ==========================================================================
   3. ALLGEMEINE SEITEN-ELEMENTE
   ========================================================================== */
/*#region Allgemein*/
/* Positionierung des "Unsere Angebote"-Links unten rechts */
.bottom-right-text {
    position: absolute;
    bottom: 6.25rem;
    right: 1.25rem;
    text-align: center;
    z-index: 10;
}

/* Standard-Anzeige für große Bildschirme (Desktop) */
/* Standard-Anzeige für große Bildschirme (Desktop) und Handys */
.bottom-right-corner {
    position: absolute;
    bottom: 5rem; /* Abstand vom Footer nach oben */
    right: 1.5rem; /* 🚀 Ganz außen am rechten Rand */
    text-align: right;
    white-space: nowrap; /* Verhindert, dass der Text umbricht */
    z-index: 10;
}

#unsereAngeboteLink {
   color: #C8A96B;
}

    #unsereAngeboteLink:hover {
        color: white;
    }



/* Hero-Banner Fixierung */
.hero-banner {
    position: fixed;
    top: 6vh;
    left: 0;
    right: 0;
    z-index: 1030;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1494972308805-463bc619d34e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    padding: 1rem 0;
    color: white;
}

/*#endregion*/



/* ==========================================================================
   4. ANGEBOTSLISTE (Angebotsliste.cshtml)
   ========================================================================== */
/*#region Angebotsliste*/
.custom-offers-container {
    max-width: 100.5rem;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 1rem; /* Gibt der Seite unten Luft zum Atmen beim Scrollen */
}

/* Design-Sicherungen für deine Fahrzeug-Cards */
.vehicle-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

    .vehicle-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 1rem 2.5rem rgba(0,0,0,.08) !important;
    }

.vehicle-img-wrapper {
    overflow: hidden;
    position: relative;
}

.vehicle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Raster-Layout für die Fahrzeugdaten-Icons */
.spec-icon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
}

@media (min-width: 576px) {
    .spec-icon-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.spec-item {
    font-size: 0.85rem;
    color: #495057;
    display: flex;
    align-items: center;
}
/* Styling für die Farbkreise im Filter */
.color-filter-circle {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.2); /* Gibt den Kreisen Tiefe */
}

    /* Hover-Effekt: Kreis wird leicht größer beim Drüberfahren */
    .color-filter-circle:hover {
        transform: scale(1.15);
    }

/* Aktiv-Effekt: Wenn die unsichtbare Checkbox ausgewählt ist, bekommt der Kreis einen dicken, blauen oder dunklen Rahmen */
.btn-check:checked + .color-filter-circle {
    transform: scale(1.1);
    outline: 2px solid var(--color-text-main); /* Nutzt dein edles Dunkelgrau aus :root */
    outline-offset: 2px;
}
/* #endregion*/

/* ==========================================================================
   5. FAHRZEUG-DETAILS (Details.cshtml)
   ========================================================================== */
/* #region Details */

/*#endregion*/

/* ==========================================================================
   6. DATATABLES & MOBILE VOLLBILD-OPTIMIERUNGEN
   ========================================================================== */
/* ==========================================================================
   6. DATATABLES & VOLLBILD (Desktop & Mobil)
   ========================================================================== */
/* #region Datatable */

.datatable-page .table-responsive {
    overflow: visible !important;
    height: auto !important;
}

/* Perfekte Ausrichtung für Suche und Zeilenanzeige nebeneinander */
.dataTables_length,
.dataTables_filter {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
}

    .dataTables_length label,
    .dataTables_filter label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 !important;
        font-weight: 500;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .dataTables_length select,
    .dataTables_filter input {
        display: inline-block !important;
        height: 31px !important;
        padding: 4px 8px !important;
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        border: 1px solid #ced4da !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
    }

    .dataTables_filter input {
        width: 180px !important;
    }

/* 🌟 DER BUTTON: Jetzt standardmäßig auf dem Desktop IMMER sichtbar */
#fullscreenToggleBtn {
    display: inline-block !important;
}

/* 🖥️ SITUATION A: DESKTOP VOLLBILDMODUS (Große Monitore) */
@media (min-width: 992px) {
    /* Wenn am PC Vollbild aktiv ist, soll die Tabelle richtig schön groß sein! */
    .im-vollbildmodus .dataTables_scrollBody {
        height: 82vh !important; /* 🚀 KORREKTUR: Knackige 82% Höhe statt nur 8% */
        max-height: 82vh !important;
    }
}

/* 📱 SITUATION B: MOBILGERÄTE (Unter 992px) */
@media (max-width: 991.98px) {
    /* Normale Tabellenhöhe auf dem Handy (ohne Vollbild) */
    .dataTables_scrollBody {
        height: 33vh !important;
        max-width: 100%;
        max-height: 33vh !important;
    }

    /* Handy-Vollbildmodus im Hochformat (Senkrecht) */
    .im-vollbildmodus .dataTables_scrollBody {
        height: 70vh !important;
        max-height: 70vh !important;
    }
}

/* 🔄 SITUATION C: MOBIL IM QUERFORMAT (Handy liegt waagerecht) */
@media (max-width: 991.98px) and (orientation: landscape) {
    .im-vollbildmodus .dataTables_scrollBody {
        height: 45vh !important;
        max-height: 45vh !important;
    }

    .im-vollbildmodus .d-flex.flex-column {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .im-vollbildmodus #Autotabelle th,
    .im-vollbildmodus #Autotabelle td {
        padding: 4px 6px !important;
        font-size: 0.72rem !important;
    }

    #tabelle-vollbild-container.im-vollbildmodus + .container-fluid,
    .im-vollbildmodus #fullscreenToggleBtn {
        padding: 2px 8px !important;
        font-size: 0.75rem !important;
    }
}

/* 🌐 ALLGEMEINE VOLLBILD-CONTAINER STYLES (Gilt für PC und Handy) */
#tabelle-vollbild-container:fullscreen {
    padding: 15px !important;
    background-color: #ffffff !important;
    overflow-y: auto;
}

#tabelle-vollbild-container:-webkit-full-screen {
    padding: 15px !important;
    background-color: #ffffff !important;
    overflow-y: auto;
}

/* Pulsierender Effekt für den Handy-Querformat-Hinweis */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}
/*#endregion*/
