:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f9fafc;
    --text: #1d2736;
    --muted: #667085;
    --line: #d9e0ea;
    --primary: #a6111b;
    --primary-dark: #7e0d15;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

.archiv-wrap {
    width: min(1400px, calc(100% - 32px));
    margin: 30px auto 50px auto;
}

.archiv-header {
    background: linear-gradient(135deg, #ffffff 0%, #f4f6fb 100%);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: bold;
}

.archiv-header h1,
.detail-info-box h1 {
    margin: 0 0 8px 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.intro {
    margin: 0;
    color: var(--muted);
    max-width: 900px;
}

.filter-box,
.result-bar,
.empty-box,
.detail-texts,
.detail-info-box,
.detail-image-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-box {
    padding: 20px;
    margin-bottom: 18px;
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(160px, 1fr));
    gap: 16px;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
}

.field input[type="text"],
.field select {
    width: 100%;
    border: 1px solid #cfd7e3;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input[type="text"]:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(166, 17, 27, 0.10);
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: #cfd7e3;
}

.btn-secondary:hover {
    background: #f7f9fc;
}

.btn-small {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.result-bar {
    padding: 14px 18px;
    margin-bottom: 20px;
}

.empty-box {
    padding: 28px;
    text-align: center;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.archive-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.thumb-wrap {
    position: relative;
    background: #eef2f7;
}

.thumb-link {
    display: block;
    text-decoration: none;
}

.thumb {
    width: 100%;
    height: 230px;
    object-fit: cover;
    background: #e9edf3;
}

.hover-preview {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 18, 30, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
    padding: 30px;
}

.hover-preview img {
    max-width: min(92vw, 1500px);
    max-height: 92vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.thumb-wrap:hover .hover-preview {
    opacity: 1;
    visibility: visible;
}

.card-body {
    padding: 18px 18px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.meta-top,
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f2f4f8;
    color: #344054;
    font-size: 13px;
    border: 1px solid #dde3ed;
}

.badge-year {
    background: #fdecee;
    color: #8d0f18;
    border-color: #f5c6cc;
}

.card-title {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
}

.card-title a {
    color: var(--text);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary);
}

.meta-list {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.card-teaser {
    margin: 0;
    color: #475467;
}

.card-footer {
    margin-top: auto;
    padding-top: 4px;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d4dbe6;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.archiv-detail-wrap {
    max-width: 1300px;
}

.detail-back {
    margin-bottom: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}

.detail-image-box,
.detail-info-box,
.detail-texts {
    padding: 22px;
}

.detail-image-box2,
.detail-info-box2,
.detail-texts2 {
    padding: 22px;
}

.detail-image {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
    background: #f4f6fa;
}

.detail-image2 {
    width: 50%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
    background: #f4f6fa;
}

.detail-meta {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    color: #475467;
}

.detail-section {
    margin-top: 24px;
}

.detail-section h2,
.detail-texts h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
}

.detail-thumb {
    max-width: 220px;
    border-radius: 12px;
    border: 1px solid #dde3ed;
}

.text-card {
    border: 1px solid #e1e6ef;
    border-radius: 16px;
    background: var(--surface-soft);
    padding: 18px;
    margin-top: 14px;
}

.text-card-content {
    white-space: normal;
}

@media (max-width: 1180px) {
    .filter-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .field-search {
        grid-column: 1 / -1;
    }

    .actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .archiv-wrap {
        width: min(100% - 20px, 1400px);
        margin-top: 18px;
    }

    .archiv-header,
    .filter-box,
    .detail-image-box,
    .detail-info-box,
    .detail-texts {
        padding: 18px;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .thumb {
        height: 210px;
    }
}