/* =========================================================
   Datei: assets/css/emp-single-feuerwehr.css
   Zweck: Styling für Feuerwehr-Term/Single (feuerwehr)
   Ziel:
   - konsistent zu Personal/Fuhrpark/Einsatz
   - Einsatz-Mini-Liste mit sauberen Spaltenabständen
   - "Zurück zur Übersicht" zentriert
   ========================================================= */

/* =========================================================
   Wrapper / Card
   ========================================================= */

.fw-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

.fw-card {
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: var(--emp-radius, 14px);
    overflow: hidden;
    box-shadow: var(--emp-shadow, 0 8px 24px rgba(0,0,0,0.08));
}

/* =========================================================
   Hero
   ========================================================= */

.fw-hero {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 28px;
    padding: 24px;
    align-items: start;
    background: linear-gradient(180deg, #ffffff 0%, var(--emp-bg-soft, #f6f7f7) 100%);
    border-bottom: 1px solid var(--emp-border, #dcdcde);
}

.fw-hero-img {
    position: relative;
    height: 300px;
    background: #eef1f3;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: calc(var(--emp-radius, 14px) - 2px);
    overflow: hidden;
}

.fw-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fw-hero-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emp-muted, #6b7280);
    background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.06));
}

.fw-hero-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.fw-hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding-top: 6px;
}

.fw-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--emp-primary-soft, rgba(214,54,56,0.10));
    color: var(--emp-primary, #d63638);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fw-name {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--emp-dark, #1d2327);
    word-break: break-word;
}

.fw-address {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--emp-muted, #6b7280);
}

/* =========================================================
   Details Bar
   ========================================================= */

.fw-details-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--emp-border, #dcdcde);
    border-bottom: 1px solid var(--emp-border, #dcdcde);
}

.fw-detail-box {
    padding: 16px 18px;
    border-right: 1px solid var(--emp-border, #dcdcde);
    min-width: 0;
}

.fw-detail-box:last-child {
    border-right: 0;
}

.fw-detail-box label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--emp-muted, #6b7280);
}

.fw-detail-box span {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--emp-dark, #1d2327);
    line-height: 1.35;
    word-break: break-word;
}

/* =========================================================
   Body / Sections
   ========================================================= */

.fw-body {
    padding: 24px;
    color: #2c3338;
    line-height: 1.65;
}

.fw-section-title {
    margin: 18px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--emp-border, #dcdcde);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emp-dark, #1d2327);
}

/* =========================================================
   Department Status
   ========================================================= */

.dept-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.dept-item {
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: 12px;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.status-icon.active {
    color: #178a4b;
    font-weight: 900;
}

.status-icon.inactive {
    color: var(--emp-primary, #d63638);
    font-weight: 900;
}

/* =========================================================
   Fuhrpark Grid
   ========================================================= */

.fw-fz-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.fw-fz-card {
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    box-shadow: 0 10px 26px rgba(0,0,0,0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fw-fz-card:hover,
.fw-fz-card:focus {
    transform: translateY(-2px);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

.fw-fz-card.is-off-duty {
    opacity: 0.7;
    filter: grayscale(1);
}

.fw-off-duty-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: rgba(29, 35, 39, 0.88);
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
    text-transform: uppercase;
    white-space: nowrap;
}

.fw-fz-img-wrapper {
    width: 100%;
    height: 160px;
    background: #eef1f3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--emp-border, #dcdcde);
}

.fw-fz-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fw-fz-placeholder {
    font-size: 3em;
    opacity: 0.5;
    color: var(--emp-muted, #6b7280);
}

.fw-fz-info-box {
    padding: 12px 12px 14px;
}

.fw-fz-name {
    font-weight: 800;
    color: var(--emp-dark, #1d2327);
    display: block;
    line-height: 1.2;
    font-size: 0.98rem;
    word-break: break-word;
}

.fw-fz-callsign {
    font-size: 0.78rem;
    color: var(--emp-primary, #d63638);
    display: block;
    margin-top: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* =========================================================
   Einsatz Mini List (Spaltenabstand sauber)
   ========================================================= */

.einsatz-mini-list {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--emp-border, #dcdcde);
    overflow: hidden;
}

.einsatz-mini-item {
    display: grid;
    grid-template-columns: 108px 136px 1fr 20px;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--emp-border, #dcdcde);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.einsatz-mini-item:hover,
.einsatz-mini-item:focus {
    background: var(--emp-primary-soft, rgba(214,54,56,0.06));
}

.einsatz-mini-item:last-child {
    border-bottom: 0;
}

.einsatz-date {
    font-size: 0.82rem;
    color: var(--emp-muted, #6b7280);
    font-weight: 700;
    white-space: nowrap;
}

.einsatz-number {
    font-weight: 800;
    color: var(--emp-primary, #d63638);
    font-size: 0.82rem;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.einsatz-title {
    font-weight: 700;
    color: var(--emp-dark, #1d2327);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
}

.einsatz-link-icon {
    color: #b8bcc2;
    font-size: 1.05em;
    text-align: right;
}

/* Empty Note */
.fw-empty-note {
    margin: 0;
    padding: 18px 20px;
    font-style: italic;
    color: var(--emp-muted, #6b7280);
    background: #fcfcfc;
    border: 1px dashed #c8ccd0;
    border-radius: 10px;
}

/* =========================================================
   Footer / Back (zentriert)
   ========================================================= */

.fw-back-wrap {
    margin-top: 22px;
    display: flex;
    justify-content: center;
}

.fw-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--emp-border, #dcdcde);
    color: var(--emp-dark, #1d2327);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.fw-back-link:hover,
.fw-back-link:focus {
    color: var(--emp-primary, #d63638);
    border-color: var(--emp-primary, #d63638);
    transform: translateY(-1px);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .fw-fz-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .fw-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .fw-hero-img {
        height: 260px;
    }

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

    .fw-detail-box:nth-child(2n) {
        border-right: 0;
    }

    .fw-detail-box:nth-child(-n + 2) {
        border-bottom: 1px solid var(--emp-border, #dcdcde);
    }

    .dept-status-grid {
        grid-template-columns: 1fr;
    }

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

    .fw-body {
        padding: 20px;
    }

    .einsatz-mini-item {
        grid-template-columns: 104px 124px 1fr 20px;
        gap: 12px;
        padding: 10px 12px;
    }
}

@media (max-width: 640px) {
    .fw-wrapper {
        padding: 16px 12px 28px;
    }

    .fw-hero {
        padding: 16px;
        gap: 16px;
    }

    .fw-hero-img {
        height: 220px;
    }

    .fw-body {
        padding: 16px;
    }

    .fw-details-bar {
        grid-template-columns: 1fr;
    }

    .fw-detail-box {
        border-right: 0;
        border-bottom: 1px solid var(--emp-border, #dcdcde);
    }

    .fw-detail-box:last-child {
        border-bottom: 0;
    }

    .fw-fz-grid {
        grid-template-columns: 1fr;
    }

    .einsatz-mini-item {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
    }

    .einsatz-title {
        white-space: normal;
        font-size: 0.9rem;
        padding-right: 0;
    }

    .einsatz-link-icon {
        display: none;
    }

    /* Backlink bleibt zentriert */
    .fw-back-wrap {
        justify-content: center;
    }
}