:root {
    --navy: #101923;
    --navy-light: #1b2b3a;
    --red: #d62f37;
    --red-dark: #b91f29;
    --text: #172333;
    --muted: #697789;
    --border: #e2e7ee;
    --background: #f3f5f8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    background: var(--navy);
    color: white;
    border-bottom: 2px solid var(--red);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    letter-spacing: 1px;
}

.brand-icon, .empty-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    background: var(--red);
    color: white;
    border-radius: 12px;
    font-weight: 900;
    font-size: 25px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { font-size: 10px; opacity: .65; }

.site-header nav {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 13px;
    font-weight: 600;
}

.site-header nav a:hover { color: #ff8388; }

.admin-link {
    border: 1px solid #536171;
    padding: 9px 15px;
    border-radius: 9px;
}

.hero {
    color: white;
    padding: 90px 0 100px;
    background:
        radial-gradient(ellipse at 85% 15%, #34495d 0%, transparent 48%),
        linear-gradient(125deg, #101923, #182d40 68%, #263a4c);
}

.eyebrow {
    display: block;
    color: #a8bacd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.eyebrow.red { color: var(--red); }

.hero h1 {
    margin: 0;
    max-width: 900px;
    font-size: clamp(37px, 6vw, 70px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero h1 em {
    font-style: normal;
    color: #ff646b;
}

.hero p {
    max-width: 600px;
    margin: 27px 0 30px;
    font-size: 17px;
    color: #c8d3df;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    padding: 15px 22px;
    color: white;
    background: var(--red);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.primary-button:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.section { padding: 70px 0 100px; }

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

h2 {
    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.2;
    margin: 0 0 12px;
}

.section-heading p,
.event-body p,
.workspace-panel p {
    color: var(--muted);
    margin: 0;
}

.counter {
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 9px 15px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.event-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15,30,45,.04);
    transition: transform .2s, box-shadow .2s;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(15,30,45,.12);
}

.event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #25394b;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: white;
    background:
        radial-gradient(circle at 80% 20%, #415367, transparent 55%),
        linear-gradient(135deg, #152635, #30485c);
}

.image-placeholder span {
    font-size: 85px;
    font-weight: 900;
    line-height: 1;
    opacity: .65;
}

.image-placeholder small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 55%, rgba(0,0,0,.4));
    pointer-events: none;
}

.card-label {
    position: absolute;
    bottom: 13px;
    left: 16px;
    padding: 6px 10px;
    border-radius: 7px;
    background: rgba(255,255,255,.94);
    color: #243344;
    font-size: 11px;
    font-weight: 700;
}

.event-body { padding: 24px; }

.event-date {
    font-size: 12px;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 10px;
}

.event-body h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 10px;
}

.event-body p { font-size: 13px; }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
}

.arrow { color: var(--red); font-size: 22px; }

.empty-state {
    grid-column: 1 / -1;
    padding: 60px 25px;
    text-align: center;
    background: white;
    border: 1px dashed #c7d0db;
    border-radius: 17px;
}

.empty-icon { margin: 0 auto 20px; }
.empty-state h3 { margin: 0 0 10px; }
.empty-state p { color: var(--muted); }

.detail-top {
    padding: 40px 0 70px;
    background: linear-gradient(125deg, #101923, #304558);
    color: white;
}

.back-link {
    display: block;
    margin-bottom: 45px;
    font-size: 13px;
    color: #bdcbda;
}

.detail-top h1 {
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.15;
    margin: 0 0 15px;
}

.detail-top p { color: #c5d2df; }

.detail-section {
    min-height: 400px;
    padding-top: 40px;
    padding-bottom: 90px;
}

.access-panel {
    max-width: 510px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(20,40,60,.07);
}

.access-symbol {
    font-size: 30px;
    margin-bottom: 15px;
}

.access-panel h2 { font-size: 25px; }

.access-panel p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.access-panel label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13px;
}

.access-panel input {
    display: block;
    width: 100%;
    border: 1px solid #cbd4df;
    border-radius: 9px;
    padding: 14px;
    margin-bottom: 17px;
}

.access-panel input:focus {
    outline: 2px solid #e69095;
    border-color: var(--red);
}

.access-panel button { width: 100%; }

.form-error {
    background: #fff0f1;
    color: #a32029;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.event-workspace {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
    gap: 24px;
    align-items: start;
}

.workspace-main { display: grid; gap: 24px; }

.workspace-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 30px;
}

.workspace-panel h2 { font-size: 23px; }

.coming-soon {
    margin-top: 24px;
    border: 1px dashed #bcc8d6;
    border-radius: 10px;
    padding: 25px;
    color: #7b8796;
    font-size: 13px;
    text-align: center;
}

.site-footer {
    color: #9aabba;
    background: var(--navy);
    padding: 28px 0;
    font-size: 11px;
    letter-spacing: .6px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

@media (max-width: 900px) {
    .event-grid { grid-template-columns: repeat(2, 1fr); }
    .event-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .container { width: calc(100% - 28px); }
    .header-inner { min-height: 70px; }
    .site-header nav { gap: 9px; }
    .site-header nav a { font-size: 11px; }
    .brand strong { font-size: 12px; }
    .brand small { font-size: 9px; }
    .hero { padding: 65px 0 75px; }
    .hero h1 { letter-spacing: -1px; }
    .section { padding: 45px 0 70px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .event-grid { grid-template-columns: 1fr; }
    .event-image { height: 210px; }
    .access-panel { padding: 25px; }
    .footer-inner { flex-direction: column; }
}

/* Feuerwehr Planspielportal – Szenarien und Tablet-Layout */

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.scenario-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 175px;
    padding: 23px;
    background: #f5f7fa;
    border: 1px solid #dce3eb;
    border-radius: 13px;
    transition: border-color .2s, background .2s;
}

.scenario-card:hover,
.scenario-card:focus-visible {
    background: #fff;
    border-color: var(--red);
}

.scenario-card:focus-visible,
.primary-button:focus-visible,
.site-header a:focus-visible {
    outline: 3px solid #e36b70;
    outline-offset: 3px;
}

.scenario-number {
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.scenario-card h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.scenario-card p {
    font-size: 13px;
    color: var(--muted);
}

.scenario-open {
    margin-top: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
}

.scenario-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
    gap: 24px;
}

.scenario-content {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.scenario-text {
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.scenario-text p {
    margin: 0 0 14px;
}

.scenario-sidebar {
    min-width: 0;
}

.primary-button,
.access-panel input {
    min-height: 48px;
}

a, button {
    touch-action: manipulation;
}

@media (min-width: 1101px) {
    .scenario-sidebar {
        position: sticky;
        top: 24px;
    }
}

/* Tablets: iPad und Android, insbesondere Hochformat */
@media (max-width: 1100px) {
    .scenario-layout,
    .event-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .scenario-sidebar {
        position: static;
    }

    .site-header nav a,
    .back-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* Smartphone und schmale Tablets */
@media (max-width: 700px) {
    .event-grid,
    .scenario-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .workspace-panel {
        padding: 22px;
    }

    .scenario-card {
        min-height: 145px;
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .hero h1 {
        overflow-wrap: anywhere;
    }
}

@media (pointer: coarse) {
    button,
    .primary-button,
    .admin-link,
    .back-link {
        min-height: 44px;
    }
}

/* FPP-STAFF-LAYOUT-V1 */

.staff-container {
    padding-top: 45px;
    padding-bottom: 90px;
    min-height: 70vh;
}

.staff-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
}

.staff-heading h1 {
    font-size: clamp(26px, 4vw, 40px);
    margin: 0 0 10px;
}

.staff-heading p,
.staff-card p,
.staff-list-item p {
    color: var(--muted);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.staff-card,
.staff-list-item,
.staff-form,
.staff-empty {
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
}

.staff-card h2,
.staff-list-item h2 {
    font-size: 21px;
    margin: 0 0 10px;
}

.staff-card:hover {
    border-color: var(--red);
}

.staff-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.staff-list {
    display: grid;
    gap: 15px;
}

.staff-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.staff-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 13px 20px;
    background: var(--red);
    color: white;
    border: 0;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    touch-action: manipulation;
}

.secondary-button {
    background: #e9edf2;
    color: #253446;
}

.staff-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 25px;
    color: var(--muted);
}

.staff-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.staff-form {
    max-width: 950px;
}

.staff-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.staff-field label {
    font-weight: 700;
    font-size: 14px;
}

.staff-field input:not([type="checkbox"]),
.staff-field textarea,
.staff-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd4df;
    border-radius: 9px;
    padding: 12px 14px;
    background: white;
    color: var(--text);
    font-size: 16px;
}

.staff-field textarea {
    min-height: 130px;
    resize: vertical;
}

.staff-field input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--red);
}

.staff-field small {
    color: var(--muted);
}

.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

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

    .staff-heading,
    .staff-list-item {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-card,
    .staff-list-item,
    .staff-form {
        padding: 20px;
    }
}


/* FPP – zentrale Administration */

.staff-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.site-header nav form {
    display: inline-flex;
    margin: 0;
}

.nav-logout {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #536171;
    border-radius: 9px;
    color: white;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}

.nav-logout:hover {
    border-color: #ff8388;
}

.staff-form input:focus-visible,
.staff-form textarea:focus-visible,
.staff-form select:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

@media (max-width: 800px) {
    .staff-toolbar {
        width: 100%;
    }

    .staff-toolbar .staff-button {
        flex: 1 1 180px;
    }
}

@media (max-width: 600px) {
    .staff-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-toolbar .staff-button {
        flex: none;
        width: 100%;
    }

    .site-header nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* FPP-RESOURCES-V1 */
/* Datei- und Wissensverwaltung */

.resource-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}

.resource-form {
    max-width: none;
}

.resource-list,
.knowledge-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.resource-item strong,
.knowledge-item strong {
    display: block;
    overflow-wrap: anywhere;
}

.resource-item p,
.knowledge-item p {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 0;
}

.knowledge-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.knowledge-item a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 10px;
    color: var(--red);
    font-weight: 700;
    font-size: 13px;
}

.resource-item .staff-button {
    flex-shrink: 0;
}

/* Tablet Hoch- und Querformat */
@media (max-width: 1050px) {
    .resource-admin-layout {
        grid-template-columns: 1fr;
    }

    .scenario-sidebar {
        position: static;
    }
}

/* Smartphones und schmale Tablets */
@media (max-width: 650px) {
    .resource-item {
        flex-direction: column;
        align-items: stretch;
    }

    .resource-item .staff-button {
        width: 100%;
    }

    .knowledge-item {
        padding: 14px;
    }
}


/* FPP-PREVIEW-V1 */

.resource-mini {
    display: block;
    flex: 0 0 118px;
    width: 118px;
    height: 90px;
    overflow: hidden;
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    background: #edf1f5;
}

.resource-mini img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resource-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.resource-item > div:not(.resource-links) {
    flex: 1 1 200px;
    min-width: 0;
}

.knowledge-mini {
    display: block;
    width: 100%;
    height: 125px;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #edf1f5;
}

.knowledge-mini img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-panel {
    border: 1px solid #d8e0e8;
    border-radius: 14px;
    background: #f1f4f8;
    padding: 16px;
    overflow: hidden;
}

.preview-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.preview-pdf {
    display: block;
    width: 100%;
    height: 75vh;
    min-height: 450px;
    border: 0;
    background: white;
}

.preview-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
}

@media (max-width: 700px) {
    .preview-panel {
        padding: 6px;
    }

    .preview-pdf {
        height: 68vh;
        min-height: 360px;
    }

    .resource-mini {
        flex-basis: 100px;
        width: 100px;
        height: 78px;
    }

    .resource-links {
        width: 100%;
    }

    .resource-links .staff-button {
        flex: 1;
    }
}

/* FPP – Unterlagen löschen */

.staff-button-danger {
    background: #b42332;
    color: #ffffff;
}

.staff-button-danger:hover {
    background: #8f1b28;
}

.delete-confirmation {
    max-width: 680px;
}

.delete-confirmation h1 {
    margin: 12px 0 20px;
}

.delete-resource-info {
    margin: 24px 0;
    padding: 20px;
    background: #f3f5f8;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.delete-resource-info p {
    margin: 8px 0 0;
    color: #64748b;
}

.delete-confirmation .staff-actions {
    margin-top: 30px;
}

@media (max-width: 650px) {
    .delete-confirmation .staff-actions {
        flex-direction: column;
    }

    .delete-confirmation .staff-button {
        width: 100%;
    }
}
