/* =========================================
   1. GLOBALES DESIGN & VARIABLEN
   ========================================= */
:root {
    /* Werden über PHP (frontend-assets.php) ggf. überschrieben */
    --emp-primary: #d63638;
    --emp-primary-soft: rgba(214, 54, 56, 0.1);

    /* Alias für neue View-CSS */
    --emp-accent: var(--emp-primary);

    --emp-dark: #1d2327;
    --emp-radius: 8px;
    --emp-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Universeller Zurück-Button (Pill-Shape) */
.emp-back-container {
    margin: 50px 0 30px 0;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.emp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #f9f9f9;
    color: #555;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
    line-height: 1;
}

.emp-back-link:hover {
    background-color: var(--emp-primary);
    color: #fff;
    border-color: var(--emp-primary);
    transform: translateY(-2px);
    box-shadow: var(--emp-shadow);
}

/* =========================================
   4. EINZELANSICHTEN (SINGLE)
   ========================================= */
.fz-single-wrapper, .einsatz-single-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.fz-single-card, .einsatz-single-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

/* Header */
.fz-main-flex, .einsatz-main-flex {
    display: flex;
    border-bottom: 4px solid var(--emp-primary);
}

.fz-single-image, .einsatz-single-image {
    flex: 0 0 350px;
    background: #f0f0f0;
    position: relative;
    cursor: pointer;
}

.fz-single-image img, .einsatz-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}

.fz-single-image:hover img,
.einsatz-single-image:hover img {
    transform: scale(1.05);
}

.fz-single-header-content, .einsatz-single-header-content {
    flex: 1;
    padding: 30px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fz-location-badge {
    display: inline-block;
    background: var(--emp-dark);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-bottom: 10px;
    align-self: flex-start;
}

.fz-title, .single-title {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    line-height: 1.1;
    color: var(--emp-dark);
}

/* Info Grid */
.fz-info-bar, .single-info-bar {
    display: grid;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.fz-info-bar {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.single-info-bar {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-item {
    padding: 15px;
    border-right: 1px solid #eee;
    text-align: center;
}

.single-info-bar .info-item {
    text-align: left;
    padding: 20px;
}

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

.info-item label {
    display: block;
    font-size: 0.65em;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item span {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* Content */
.fz-content-body, .single-content-body {
    padding: 40px;
    font-size: 1.05em;
    line-height: 1.7;
    color: #444;
}

.fz-ausstattung-container {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-left: 4px solid var(--emp-primary);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

/* =========================================
   5. LISTEN FÜR EINSÄTZE / FAHRZEUGE (History)
   ========================================= */
.history-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important;
}

.history-item {
    background: #fff;
    margin-bottom: 10px;
    padding: 15px 20px;
    border: 1px solid #eee;
    border-left: 4px solid var(--emp-primary);
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.history-item:hover {
    background: #fcfcfc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform: translateX(3px);
}

.history-link {
    text-decoration: none !important;
    color: var(--emp-dark) !important;
    display: block;
}

.history-link strong {
    font-size: 1.05em;
    display: block;
    margin-bottom: 4px;
}

.history-nr {
    color: var(--emp-primary);
    font-weight: 800;
    margin-right: 6px;
    font-family: monospace;
}

.history-meta {
    font-size: 0.85em;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* =========================================
   6. GALERIE (Basis)
   Hinweis: Lightbox-Styles am besten in emp-single-einsatz.css lassen,
   wenn du sie nur dort brauchst.
   ========================================= */
.fz-gallery-section, .einsatz-gallery-section { margin-bottom: 40px; }

.fz-gallery-title, .einsatz-gallery-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #1d2327;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-gallery-wrapper { width: 100%; }

.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.layout-masonry { column-count: 3; column-gap: 15px; }

.layout-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
}

.emp-gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    border: 1px solid #ddd;
    aspect-ratio: 4/3;
}

.emp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

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

/* =========================================
   7. RESPONSIVE (global, ohne Archiv-controls)
   ========================================= */
@media (max-width: 900px) {
    .fz-main-flex, .einsatz-main-flex { flex-direction: column; }
    .fz-single-image, .einsatz-single-image { flex: 0 0 250px; width: 100%; }
    .fz-info-bar, .single-info-bar { grid-template-columns: 1fr 1fr; }
    .layout-masonry { column-count: 2; }
}

@media (max-width: 600px) {
    .history-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
    .fz-info-bar, .single-info-bar { grid-template-columns: 1fr; }
}
