/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Inter', system-ui, sans-serif; color: #1E293B; background: #F4F6FA; line-height: 1.5; }
a { color: inherit; }
img, svg { display: block; }

/* ════════════════════════════════════════════
   ÖFFENTLICHES FRONTEND
════════════════════════════════════════════ */

/* Header */
.site-header { background: #1E4D8C; height: 56px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.site-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; height: 56px; display: flex; align-items: center; justify-content: space-between; }

.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo-cross { width: 30px; height: 30px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.site-logo-text { display: flex; flex-direction: column; }
.site-logo-name { font-size: .875rem; font-weight: 700; color: white; letter-spacing: .03em; line-height: 1.2; }
.site-logo-sub  { font-size: .65rem; color: rgba(255,255,255,.55); line-height: 1.2; }

.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav a { font-size: .8rem; color: rgba(255,255,255,.7); text-decoration: none; padding: .35rem .8rem; border-radius: .25rem; transition: background .12s, color .12s; }
.site-nav a:hover  { background: rgba(255,255,255,.12); color: white; }
.site-nav a.active { background: rgba(255,255,255,.18); color: white; font-weight: 600; }

/* Flash */
.flash-wrap { max-width: 1100px; margin: .75rem auto 0; padding: 0 1.5rem; }
.flash-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E4D8C; padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }

/* Hero */
.site-hero { background: #0c2447; padding: 4rem 1.5rem 3.5rem; position: relative; overflow: hidden; min-height: 320px; display: flex; align-items: center; }
.site-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow { font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.hero-title { font-size: 2.75rem; font-weight: 700; color: white; line-height: 1.1; margin-bottom: .75rem; }
.hero-title em { font-style: normal; color: #93C5FD; }
.hero-sub { font-size: .95rem; color: rgba(255,255,255,.6); line-height: 1.65; max-width: 460px; margin-bottom: 1.5rem; }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; background: white; color: #1E4D8C; font-size: .875rem; font-weight: 700; padding: .65rem 1.5rem; border-radius: 24px; text-decoration: none; transition: opacity .15s; }
.hero-btn:hover { opacity: .9; }
.hero-btn svg { width: 14px; height: 14px; stroke: #1E4D8C; fill: none; stroke-width: 2.5; flex-shrink: 0; }
.hero-pulse { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: rgba(255,255,255,.4); }
.hero-pulse-dot { width: 7px; height: 7px; background: #93C5FD; border-radius: 50%; flex-shrink: 0; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* Epochen */
.epochs-bar { background: white; border-bottom: 1px solid #E2E8F0; overflow-x: auto; scrollbar-width: none; }
.epochs-bar::-webkit-scrollbar { display: none; }
.epochs-inner { max-width: 1100px; margin: 0 auto; display: flex; min-width: max-content; }
.epoch-tab { padding: .9rem 1.25rem; border-right: 1px solid #E2E8F0; text-decoration: none; display: block; min-width: 110px; transition: background .12s; }
.epoch-tab:last-child { border-right: none; }
.epoch-tab:hover { background: #EFF6FF; }
.epoch-tab.active { background: #1E4D8C; }
.epoch-year  { font-size: .68rem; font-weight: 700; color: #1E4D8C; margin-bottom: 2px; letter-spacing: .04em; }
.epoch-label { font-size: .8rem; font-weight: 500; color: #475569; line-height: 1.3; }
.epoch-count { font-size: .65rem; color: #94A3B8; margin-top: 2px; }
.epoch-tab.active .epoch-year  { color: #93C5FD; }
.epoch-tab.active .epoch-label { color: white; }
.epoch-tab.active .epoch-count { color: rgba(255,255,255,.45); }

/* Hauptbereich */
.site-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Filterleiste */
.filter-bar { background: white; border: 1px solid #E2E8F0; border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: .3rem; }
.filter-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #94A3B8; }
.filter-input { border: 1px solid #CBD5E1; border-radius: .3rem; padding: .45rem .75rem; font-size: .875rem; font-family: inherit; background: white; color: #1E293B; }
.filter-input:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.filter-search { position: relative; }
.filter-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: #94A3B8; fill: none; pointer-events: none; }
.filter-search .filter-input { padding-left: 2rem; }

/* Sektion-Header */
.section-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.section-title { font-size: .68rem; font-weight: 700; color: #1E4D8C; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: #E2E8F0; }
.section-pulse { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.section-pulse span { width: 3px; border-radius: 2px; background: #1E4D8C; }
.section-pulse span:nth-child(1) { height: 6px;  opacity: .4; }
.section-pulse span:nth-child(2) { height: 12px; opacity: .7; }
.section-pulse span:nth-child(3) { height: 8px;  opacity: .5; }
.section-pulse span:nth-child(4) { height: 14px; opacity: .9; }
.section-pulse span:nth-child(5) { height: 9px;  opacity: .6; }

/* Zeitleiste */
.tl-wrap { position: relative; padding-left: 90px; }
.tl-line { position: absolute; left: 70px; top: 8px; bottom: 8px; width: 2px; background: #E2E8F0; border-radius: 1px; }
.tl-year-block { position: relative; margin-bottom: 2.5rem; }
.tl-year-label { position: absolute; left: -90px; width: 62px; text-align: right; font-size: .72rem; font-weight: 700; color: #94A3B8; line-height: 1.2; padding-top: 20px; }
.tl-year-dot { position: absolute; left: -24px; top: 16px; width: 16px; height: 16px; border-radius: 50%; background: white; border: 3px solid #1E4D8C; z-index: 1; }
.tl-entries { padding-top: 6px; }

/* Eintrags-Card */
.tl-card { background: white; border: 1px solid #E2E8F0; border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: .75rem; text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .12s; }
.tl-card:hover { border-color: #93C5FD; transform: translateX(2px); }
.tl-card.intern { border-left: 3px solid #16A34A; }
.tl-card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 5px; }
.tl-card-date { font-size: .72rem; color: #94A3B8; min-width: 80px; flex-shrink: 0; padding-top: 3px; line-height: 1.4; }
.tl-card-title { font-size: .95rem; font-weight: 600; color: #1E293B; flex: 1; line-height: 1.35; }
.tl-card-body { font-size: .8rem; color: #64748B; line-height: 1.6; padding-left: 90px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-card-intern-badge { display: flex; align-items: center; gap: 4px; font-size: .68rem; color: #16A34A; padding-left: 90px; margin-top: 5px; }
.tl-card-intern-badge svg { width: 11px; height: 11px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* Zeitleiste Thumbnail */
.tl-card-with-thumb { display: grid; grid-template-columns: 80px 1fr; gap: 0; }
.tl-thumb { width: 80px; min-height: 72px; background: #DBEAFE; border-radius: .4rem 0 0 .4rem; overflow: hidden; flex-shrink: 0; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #EFF6FF; }
.tl-thumb-placeholder svg { width: 24px; height: 24px; stroke: #BFDBFE; fill: none; }
.tl-card-content { padding: 1rem 1.25rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: .18rem .65rem; border-radius: 9999px; font-size: .7rem; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-orange { background: #FFF7ED; color: #C2410C; }
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-gray   { background: #F1F5F9; color: #475569; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-sm { padding: .12rem .5rem; font-size: .65rem; }

/* Einreichen-Banner */
.submit-banner { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: .5rem; padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; margin-top: 2.5rem; }
.submit-banner-icon { width: 44px; height: 44px; background: #1E4D8C; border-radius: .4rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.submit-banner-icon svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 2; }
.submit-banner-body { flex: 1; }
.submit-banner-title { font-size: .9rem; font-weight: 600; color: #1E293B; }
.submit-banner-sub { font-size: .78rem; color: #64748B; margin-top: 2px; }
.submit-banner-btn { background: #1E4D8C; color: white; font-size: .8rem; font-weight: 600; padding: .55rem 1.2rem; border-radius: 20px; text-decoration: none; white-space: nowrap; transition: background .12s; display: inline-block; }
.submit-banner-btn:hover { background: #163a6e; }

/* Footer */
.site-footer { background: #0c2447; margin-top: 3rem; padding: 2rem 1.5rem; }
.site-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-footer-name { font-size: .875rem; font-weight: 600; color: white; }
.site-footer-since { font-size: .72rem; color: rgba(255,255,255,.35); margin-top: 2px; }
.site-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer-links a { font-size: .75rem; color: rgba(255,255,255,.4); text-decoration: none; transition: color .12s; }
.site-footer-links a:hover { color: rgba(255,255,255,.75); }

/* Leer-Zustand */
.empty-state { text-align: center; padding: 4rem 1rem; color: #94A3B8; }
.empty-state svg { width: 40px; height: 40px; stroke: #CBD5E1; fill: none; margin: 0 auto 1rem; display: block; }

/* Responsive */
@media (max-width: 640px) {
  .hero-title { font-size: 1.9rem; }
  .hero-sub { font-size: .875rem; }
  .tl-wrap { padding-left: 64px; }
  .tl-line { left: 48px; }
  .tl-year-label { left: -64px; width: 46px; font-size: .65rem; }
  .tl-year-dot { left: -18px; }
  .tl-card-body, .tl-card-intern-badge { padding-left: 0; margin-top: 6px; }
  .submit-banner { flex-direction: column; text-align: center; }
  .site-nav a:not(.active):not(:last-child) { display: none; }
}

/* ════════════════════════════════════════════
   ADMIN BACKEND (Tailwind-unabhängig)
════════════════════════════════════════════ */
.top-header { height: 52px; background: #1E4D8C; }
.logo-text { font-weight: 700; letter-spacing: .05em; font-size: .875rem; color: white; }
.username-text { font-size: .8rem; color: rgba(255,255,255,.65); }
.role-badge { border: 1px solid rgba(255,255,255,.3); font-size: .7rem; color: white; padding: 2px 8px; border-radius: 9999px; }
.logout-link { font-size: .8rem; color: rgba(255,255,255,.5); text-decoration: none; }
.logout-link:hover { color: white; }
.sub-nav { height: 42px; background: white; border-bottom: 1.5px solid #E2E8F0; position: sticky; top: 0; z-index: 10; }
.sub-nav a { padding: .375rem 1rem; font-size: .875rem; font-weight: 500; color: #475569; border-radius: .25rem; text-decoration: none; }
.sub-nav a:hover  { background: #EFF6FF; color: #1E4D8C; }
.sub-nav a.active { background: #1E4D8C; color: white; }
.page-content { padding: 1rem; }
@media (min-width: 640px) { .page-content { padding: 1.5rem; } }
.card { background: white; border: 1px solid #E2E8F0; border-radius: .4rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 1.25rem; }
.form-label { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #64748B; margin-bottom: .3rem; }
.form-input { width: 100%; border: 1px solid #CBD5E1; border-radius: .3rem; padding: .5rem .75rem; font-size: .9rem; background: white; color: #1E293B; font-family: inherit; }
.form-input:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }
.btn-primary { background: #1E4D8C; color: white; border: none; padding: .5rem 1.25rem; border-radius: .3rem; font-weight: 600; font-size: .875rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn-primary:hover { background: #163a6e; }
.btn-secondary { background: white; color: #1E4D8C; border: 1.5px solid #1E4D8C; padding: .45rem 1.1rem; border-radius: .3rem; font-weight: 500; font-size: .875rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; font-family: inherit; }
.btn-secondary:hover { background: #EFF6FF; }
.btn-info { background: #EFF6FF; color: #1E4D8C; border: 1px solid #BFDBFE; padding: .35rem .85rem; border-radius: .25rem; font-weight: 500; font-size: .8rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; font-family: inherit; }
.btn-info:hover { background: #DBEAFE; }
.btn-danger { background: #DC2626; color: white; border: none; padding: .35rem .85rem; border-radius: .25rem; font-size: .8rem; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: #991B1B; }
table { border-collapse: collapse; width: 100%; }
th { background: #F8FAFC; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748B; padding: .6rem 1rem; border-bottom: 1.5px solid #E2E8F0; white-space: nowrap; }
td { padding: .7rem 1rem; font-size: .875rem; border-bottom: 1px solid #F1F5F9; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-bg.open { display: flex; }
.modal { background: white; border-radius: .5rem; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto; }
.modal-header { background: #1E4D8C; color: white; padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; border-radius: .5rem .5rem 0 0; }
.modal-header h2 { font-size: .95rem; font-weight: 600; margin: 0; }
.modal-close { background: rgba(255,255,255,.2); border: none; cursor: pointer; color: white; font-size: 16px; padding: 3px 9px; border-radius: 5px; }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: .85rem 1.25rem; border-top: 1px solid #E2E8F0; display: flex; gap: .6rem; justify-content: flex-end; }
.accordion-item { border: 1px solid #E2E8F0; border-radius: 8px; background: white; margin-bottom: 8px; overflow: hidden; }
.accordion-item.open { border-color: #BFDBFE; }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; cursor: pointer; font-size: 14px; font-weight: 600; color: #1E293B; user-select: none; }
.accordion-body { display: none; padding: 0 15px 15px; font-size: 13.5px; color: #475569; line-height: 1.7; border-top: 1px solid #F1F5F9; }
.accordion-item.open .accordion-body { display: block; }
.type-btn { padding:.35rem .75rem;font-size:.8rem;border-radius:.25rem;border:1px solid #E2E8F0;background:white;cursor:pointer;color:#475569;font-family:inherit; }
.type-btn.active { background:#DBEAFE;border-color:#93C5FD;color:#1E4D8C;font-weight:600; }
.sort-item.dragover { border-color:#1E4D8C;background:#EFF6FF; }



/* ════════════════════════════════════════════
   EINTRAG OVERLAY — neu
════════════════════════════════════════════ */

.entry-overlay-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,16,40,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.entry-overlay-bg.open { opacity: 1; pointer-events: all; }

.entry-overlay {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 32px 96px rgba(8,16,40,.3);
  width: 100%; max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(24px) scale(.97);
  transition: transform .22s ease;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
.entry-overlay-bg.open .entry-overlay { transform: translateY(0) scale(1); }

/* ── Hero-Bild ── */
.ov-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0c2447;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 1.25rem 1.25rem 0 0;
}
.ov-hero img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ov-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(8,16,40,.75) 100%);
}
.ov-hero-text {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1.75rem 1.25rem;
}
.ov-hero-epoch {
  font-size: .65rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #93C5FD; margin-bottom: .35rem;
}
.ov-hero-title {
  font-size: 1.35rem; font-weight: 700; color: white;
  line-height: 1.25; margin-bottom: .6rem;
}
.ov-hero-meta {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.ov-hero-date {
  display: flex; align-items: center; gap: 5px;
  font-size: .75rem; color: rgba(255,255,255,.65);
}
.ov-hero-date svg { width: 13px; height: 13px; stroke: currentColor; fill: none; flex-shrink: 0; }
.ov-hero-badge {
  font-size: .65rem; font-weight: 700; padding: .15rem .65rem;
  border-radius: 9999px; letter-spacing: .03em;
}
.ov-hero-badge-blue   { background: rgba(147,197,253,.2); color: #93C5FD; border: 1px solid rgba(147,197,253,.3); }
.ov-hero-badge-orange { background: rgba(253,186,116,.2); color: #FCD34D; border: 1px solid rgba(253,186,116,.3); }
.ov-hero-badge-green  { background: rgba(134,239,172,.2); color: #86EFAC; border: 1px solid rgba(134,239,172,.3); }
.ov-hero-badge-gray   { background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.2); }

/* Kein Bild: nur farbiger Header */
.ov-hero-plain {
  background: linear-gradient(135deg, #0c2447 0%, #1E4D8C 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 1.25rem 1.25rem 0 0;
}

/* Close-Button */
.ov-close-btn {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.35); border: none;
  color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; line-height: 1;
}
.ov-close-btn:hover { background: rgba(0,0,0,.55); }

/* ── Body ── */
.ov-body {
  padding: 1.5rem 1.75rem;
}

.ov-section-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #1E4D8C; margin-bottom: .6rem;
  display: flex; align-items: center; gap: .5rem;
}
.ov-section-label::after {
  content: ''; flex: 1; height: 1px; background: #E2E8F0;
}

.ov-body-text {
  font-size: .9rem; color: #475569; line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ── Polaroid-Galerie ── */
.ov-polaroid-grid {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.5rem;
  padding: .5rem 0;
}
.ov-polaroid {
  background: white;
  box-shadow: 0 3px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
  padding: 8px 8px 28px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  flex: 0 0 auto;
  width: calc(33% - .67rem);
}
.ov-polaroid:hover {
  transform: rotate(0deg) scale(1.04) translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1);
}
.ov-polaroid:nth-child(3n+1) { transform: rotate(-1.5deg); }
.ov-polaroid:nth-child(3n+2) { transform: rotate(0.8deg); }
.ov-polaroid:nth-child(3n+3) { transform: rotate(-0.5deg); }
.ov-polaroid:nth-child(3n+1):hover { transform: rotate(0) scale(1.04) translateY(-3px); }
.ov-polaroid:nth-child(3n+2):hover { transform: rotate(0) scale(1.04) translateY(-3px); }
.ov-polaroid:nth-child(3n+3):hover { transform: rotate(0) scale(1.04) translateY(-3px); }

.ov-polaroid img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; display: block;
  background: #F1F5F9;
}
.ov-polaroid-caption {
  font-size: .62rem; color: #94A3B8; text-align: center;
  margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Caveat', cursive, sans-serif;
  font-size: .72rem;
}

/* ── Dokumente & Presse ── */
.ov-doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid #E2E8F0;
  border-radius: .4rem; text-decoration: none;
  margin-bottom: 6px; background: white;
  transition: background .12s, border-color .12s;
}
.ov-doc-row:hover { background: #F8FAFC; border-color: #BFDBFE; }
.ov-doc-icon {
  width: 34px; height: 34px; border-radius: .3rem;
  background: #FAECE7; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.ov-doc-icon svg { width: 16px; height: 16px; stroke: #993C1D; fill: none; }
.ov-doc-name { font-size: .8rem; font-weight: 500; color: #1E293B; }
.ov-doc-meta { font-size: .68rem; color: #94A3B8; margin-top: 1px; }

.ov-press-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; background: #FAECE7;
  border: 1px solid #F5C4B3; border-radius: .4rem;
  margin-bottom: 6px;
}
.ov-press-row svg { width: 16px; height: 16px; stroke: #993C1D; fill: none; flex-shrink: 0; margin-top: 2px; }
.ov-press-name { font-size: .82rem; font-weight: 600; color: #712B13; }
.ov-press-meta { font-size: .72rem; color: #993C1D; margin-top: 2px; }

/* ── Personen ── */
.ov-persons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.25rem; }
.ov-person-chip {
  display: flex; align-items: center; gap: 6px;
  padding: .3rem .85rem .3rem .4rem;
  border-radius: 9999px; background: #EFF6FF;
  border: 1px solid #BFDBFE; text-decoration: none;
  transition: background .12s;
}
.ov-person-chip:hover { background: #DBEAFE; }
.ov-person-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #1E4D8C; color: white;
  font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ov-person-name { font-size: .78rem; color: #1E4D8C; font-weight: 500; }

/* ── Tags ── */
.ov-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 1.25rem; }
.ov-tag { font-size: .7rem; padding: .2rem .7rem; border-radius: 9999px; background: #F1F5F9; border: 1px solid #E2E8F0; color: #64748B; }

/* ── Footer ── */
.ov-footer {
  position: sticky; bottom: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #E2E8F0;
  padding: .85rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  flex-wrap: wrap;
}

/* ── Lightbox ── */
.ov-lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.ov-lightbox.open { display: flex; }
.ov-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: .3rem; display: block; }
.ov-lb-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.15); border: none; color: white; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ov-lb-prev, .ov-lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.15); border: none; color: white; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.ov-lb-prev:hover, .ov-lb-next:hover { background: rgba(255,255,255,.25); }
.ov-lb-prev { left: 1rem; }
.ov-lb-next { right: 1rem; }
.ov-lb-caption { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); font-size: .75rem; color: rgba(255,255,255,.45); white-space: nowrap; }

@media (max-width: 600px) {
  .entry-overlay-bg { padding: 0; align-items: flex-end; }
  .entry-overlay { border-radius: 1.25rem 1.25rem 0 0; max-height: 94vh; }
  .ov-hero { aspect-ratio: 4/3; border-radius: 1.25rem 1.25rem 0 0; }
  .ov-polaroid { width: calc(50% - .5rem); }
  .ov-body { padding: 1.25rem; }
  .ov-footer { padding: .75rem 1.25rem; }
}

/* ── Neue Lightbox ── */
.ov-lightbox { align-items: center !important; }
.lb-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px; padding: 3px 9px 3px 3px;
  cursor: pointer; transition: background .12s;
}
.lb-chip:hover, .lb-chip.active { background: rgba(30,77,140,.6); border-color: rgba(30,77,140,.8); }
.lb-chip-av { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: white; flex-shrink: 0; }
.lb-chip-name { font-size: 11px; color: rgba(255,255,255,.8); }
.lb-thumb { width: 52px; height: 40px; border-radius: 4px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: .5; transition: all .12s; flex-shrink: 0; }
.lb-thumb:hover { opacity: .8; }
.lb-thumb.active { opacity: 1; border-color: #1E4D8C; }
#ovLbThumbs::-webkit-scrollbar { display: none; }
@keyframes lb-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,.4)} 50%{box-shadow:0 0 0 6px rgba(255,255,255,0)} }

/* ════════════════════════════════════════════
   RESPONSIVE — Android / Tablet / PC
   Breakpoints: sm=480, md=768, lg=1024, xl=1280
════════════════════════════════════════════ */

/* ── Alle Geräte: Basis-Fixes ── */
img { max-width: 100%; }
input, select, textarea, button { font-size: 16px; } /* verhindert iOS-Zoom */

/* ── PC (>= 1024px): Standard, nichts zu tun ── */

/* ── Tablet (768px – 1023px) ── */
@media (max-width: 1023px) {
  .site-main { padding: 1.5rem 1.25rem; }
  .site-hero { padding: 3rem 1.25rem 2.5rem; min-height: 260px; }
  .hero-title { font-size: 2.25rem; }

  /* Epochenleiste: kleinere Tabs */
  .epoch-tab { padding: .75rem 1rem; min-width: 90px; }
  .epoch-label { font-size: .75rem; }

  /* Zeitleiste */
  .tl-wrap { padding-left: 80px; }
  .tl-line { left: 60px; }
  .tl-year-label { left: -80px; width: 54px; }

  /* Overlay */
  .entry-overlay { max-width: 96vw; }

  /* Vollansicht + Personenseite: 2-Spalten ab 768px beibehalten */
}

/* ── Mobil (< 768px): Smartphone + kleines Tablet ── */
@media (max-width: 767px) {
  /* Header */
  .site-header-inner { padding: 0 1rem; }
  .site-logo-sub { display: none; }
  .site-nav a { padding: .3rem .6rem; font-size: .75rem; }
  .site-nav a:not(.active):not(:last-child):not(:nth-last-child(2)) { display: none; }

  /* Hero */
  .site-hero { padding: 2rem 1rem 1.75rem; min-height: 200px; }
  .hero-title { font-size: 1.65rem; line-height: 1.15; }
  .hero-sub { font-size: .82rem; margin-bottom: 1.1rem; }
  .hero-btn { font-size: .8rem; padding: .55rem 1.1rem; }

  /* Epochenleiste + Suche */
  .epochs-bar .epochs-inner { flex-direction: column; }
  .epochs-bar .epochs-inner > div:first-child { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid #E2E8F0; }
  .epochs-bar .epochs-inner > div:first-child::-webkit-scrollbar { display: none; }
  .epochs-bar .epochs-inner > div:last-child { padding: .5rem .75rem; border-left: none; border-top: 1px solid #E2E8F0; display: flex; align-items: center; gap: .4rem; background: #F8FAFC; }
  .epochs-bar .epochs-inner > div:last-child input[type="text"] { width: 100% !important; flex: 1; }
  .epoch-tab { padding: .65rem .85rem; min-width: 80px; }
  .epoch-year { font-size: .62rem; }
  .epoch-label { font-size: .72rem; }
  .epoch-count { display: none; }

  /* Hauptbereich */
  .site-main { padding: 1rem .875rem; }

  /* Zeitleiste */
  .tl-wrap { padding-left: 0; }
  .tl-line { display: none; }
  .tl-year-block { margin-bottom: 1.5rem; }
  .tl-year-label { position: static; width: auto; text-align: left; padding: 0 0 .5rem; font-size: .75rem; color: #1E4D8C; font-weight: 700; letter-spacing: .06em; border-bottom: 2px solid #E2E8F0; margin-bottom: .5rem; }
  .tl-year-dot { display: none; }
  .tl-entries { padding-top: 0; }

  /* Eintrags-Card */
  .tl-card { padding: .75rem .875rem; margin-bottom: .5rem; border-radius: .4rem; }
  .tl-card:hover { transform: none; }
  .tl-card-with-thumb { grid-template-columns: 68px 1fr; }
  .tl-thumb { width: 68px; min-height: 64px; }
  .tl-card-content { padding: .625rem .875rem; }
  .tl-card-top { gap: 6px; }
  .tl-card-date { font-size: .65rem; min-width: 64px; }
  .tl-card-title { font-size: .875rem; }
  .tl-card-body { padding-left: 0; font-size: .75rem; -webkit-line-clamp: 2; margin-top: 4px; }
  .tl-card-intern-badge { padding-left: 0; }

  /* Vollansicht: 1 Spalte auf Mobile */
  .site-main [style*="grid-template-columns:1fr 220px"] {
    display: block !important;
  }
  .site-main [style*="grid-template-columns:1fr 220px"] > div:first-child {
    border-right: none !important;
    border-bottom: 1px solid #E2E8F0;
    padding: 1.25rem 1rem !important;
  }
  .site-main [style*="grid-template-columns:1fr 220px"] > div:last-child {
    padding: 1rem !important;
  }

  /* Vollansicht: Hero-Banner */
  .site-main [style*="border-radius:12px"] { border-radius: 8px !important; }
  .site-main [style*="border-radius:12px 12px 0 0"] { border-radius: 8px 8px 0 0 !important; }
  .site-main h1[style*="font-size:1.35rem"] { font-size: 1.1rem !important; }

  /* Foto-Grid in Vollansicht */
  .site-main [style*="minmax(120px,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Overlay */
  .entry-overlay-bg { padding: 0; align-items: flex-end; }
  .entry-overlay { border-radius: 1.25rem 1.25rem 0 0; max-height: 94vh; max-width: 100%; }
  .ov-hero { aspect-ratio: 16/9; border-radius: 1.25rem 1.25rem 0 0; }
  .ov-body { padding: 1rem; }

  /* Chips / Personen-Chips */
  .lb-chip { padding: 3px 7px 3px 3px; font-size: .72rem; }
  .lb-chip-name { font-size: .72rem; }

  /* Einreichen-Banner */
  .submit-banner { flex-direction: column; text-align: center; padding: 1rem; gap: .75rem; }
  .submit-banner-btn { align-self: center; }

  /* Erweiterte Filter */
  #advSearchPanel .card,
  #advSearchPanel [style*="background:white"] { padding: .75rem !important; }
  #advSearchPanel form { gap: .5rem !important; }
  #advSearchPanel select,
  #advSearchPanel .filter-input { font-size: .875rem !important; }

  /* Footer */
  .site-footer { padding: 1.5rem 1rem; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .site-footer-links { gap: .75rem; }

  /* Flash-Nachrichten */
  .flash-wrap { padding: 0 .875rem; }
}

/* ── Sehr kleine Geräte (< 380px) ── */
@media (max-width: 379px) {
  .hero-title { font-size: 1.4rem; }
  .site-nav a { font-size: .7rem; padding: .25rem .45rem; }
  .tl-card-with-thumb { grid-template-columns: 56px 1fr; }
  .tl-thumb { width: 56px; }
  .tl-card-content { padding: .5rem .75rem; }
}

/* ── Touch-Geräte: größere Tappable Areas ── */
@media (hover: none) and (pointer: coarse) {
  .tl-card { padding: .875rem 1rem; margin-bottom: .625rem; }
  .tl-card:hover { transform: none; border-color: #E2E8F0; }
  .epoch-tab { padding: .875rem 1rem; }
  .site-nav a { padding: .4rem .7rem; }
  .hero-btn { padding: .75rem 1.5rem; }
  /* Keine Hover-Effekte auf Touch */
  .tl-card:active { background: #F8FAFC; }
}
