/* ============================================================
   PORTFOLIO / SHOWREEL  –  Stylesheet
   Dunkler, reduzierter Reportage-Look. Bilder im Fokus.
   ============================================================ */

:root {
  --bg:        #0d0d0f;
  --bg-soft:   #16161a;
  --line:      #2a2a30;
  --text:      #e8e6e1;
  --text-dim:  #8a8a93;
  --accent:    #d4341f;   /* signalrot – Presse / Blaulicht-Welt */
  --gap:       3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- HEADER -------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.brand h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand .tagline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: right;
}
.contact strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.site-header.slim .header-inner {
  padding: 18px 32px;
  align-items: center;
}
.site-header.slim .back {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.site-header.slim .back:hover { color: var(--accent); }
.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- GALERIE-META -------------------------------------- */

.gallery-meta {
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px 32px 16px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.gallery-meta span:first-child {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.gallery-meta .count {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- GRID ---------------------------------------------- */

.grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 3 / 2;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1),
              filter 0.4s ease;
}
.card:hover img {
  transform: scale(1.04);
  filter: brightness(0.45);
}

/* ---------- HOVER-OVERLAY (wie Bild 3) ------------------------ */

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: linear-gradient(180deg,
              rgba(0,0,0,0.55) 0%,
              rgba(0,0,0,0.25) 40%,
              rgba(0,0,0,0.8) 100%);
}
.card:hover .overlay { opacity: 1; }

.overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.overlay-top .date {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.overlay-top .tag {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 5px 9px;
}
.overlay-body .credit {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.overlay-body .caption {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
.overlay-body .caption-desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- DETAILSEITE --------------------------------------- */

.detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 32px 70px;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}
.detail-head h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 75%;
}
.nav-arrows {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.nav-arrows a,
.nav-arrows span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
  transition: all 0.2s;
}
.nav-arrows a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-arrows .disabled { color: var(--line); }
.nav-arrows .close { font-size: 20px; }

.detail-image {
  background: #000;
  border: 1px solid var(--line);
}
.detail-image img {
  width: 100%;
  display: block;
}

.detail-info {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.info-row {
  background: var(--bg-soft);
  padding: 16px 18px;
}
.info-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.info-value {
  font-size: 14px;
  font-weight: 600;
}

.detail-desc {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 760px;
}

/* ---------- FOOTER / DIVERSES --------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 22px 32px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.empty {
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 32px;
  color: var(--text-dim);
}
.empty code {
  background: var(--bg-soft);
  padding: 2px 7px;
  border: 1px solid var(--line);
}

/* ---------- RESPONSIVE ---------------------------------------- */

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-info { grid-template-columns: 1fr; }
  .detail-head h2 { max-width: 100%; font-size: 18px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .header-inner { padding: 22px 18px; }
  .contact { text-align: left; }
  .gallery-meta, .grid, .detail { padding-left: 18px; padding-right: 18px; }
  /* auf Touch: Overlay dauerhaft halb sichtbar zeigen */
  .overlay { opacity: 1; background: linear-gradient(180deg,
             rgba(0,0,0,0) 45%, rgba(0,0,0,0.85) 100%); }
  .overlay-body .caption-desc { display: none; }
}

/* ============================================================
   BACKEND / VERWALTUNG
   ============================================================ */

.admin-page { background: var(--bg); }

.admin-nav { display: flex; gap: 18px; }
.admin-nav a {
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.admin-nav a:hover { color: var(--accent); }

.admin {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 32px 70px;
}

/* ---------- Flash-Meldungen ---------- */
.flash {
  padding: 13px 18px;
  margin-bottom: 22px;
  font-size: 13.5px;
  border-left: 3px solid;
}
.flash.ok  { background: #14241a; border-color: #3fae6b; color: #b9e6c8; }
.flash.err { background: #2a1414; border-color: var(--accent); color: #f0c2bc; }

/* ---------- Login ---------- */
.login-box {
  max-width: 360px;
  margin: 60px auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 34px 30px;
}
.login-box h2 { font-size: 19px; font-weight: 700; }
.login-box .hint { margin: 8px 0 20px; }
.login-box input {
  width: 100%;
  margin-bottom: 12px;
}

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 26px 28px;
  margin-bottom: 26px;
}
.panel h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.muted { color: var(--text-dim); font-weight: 400; }
.hint  { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.hint a { color: var(--accent); }

/* ---------- Formular ---------- */
.upload-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.upload-form label .sub {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  font-size: 11px;
}
.upload-form .row {
  display: flex;
  gap: 16px;
}
.upload-form .row label { flex: 1; }

input[type="text"],
input[type="password"],
textarea,
input[type="file"] {
  width: 100%;
  margin-top: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; }
input[type="file"] { padding: 9px 13px; cursor: pointer; }

.edit-preview {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  max-width: 280px;
}
.edit-preview img { width: 100%; display: block; }

button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.2s;
}
button:hover { filter: brightness(1.15); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.btn-ghost {
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.btn-ghost:hover { color: var(--text); }

/* ---------- Bildliste im Backend ---------- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.admin-item {
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
}
.admin-item img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.admin-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-item-info strong {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-info .muted { font-size: 11.5px; }
.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-small {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-small:hover {
  border-color: var(--text-dim);
  color: var(--text);
}
.btn-small.danger:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}
.admin-item-actions form { margin: 0; }

@media (max-width: 560px) {
  .admin { padding: 24px 16px 60px; }
  .upload-form .row { flex-direction: column; gap: 0; }
  .admin-item { flex-wrap: wrap; }
  .admin-item-actions { width: 100%; }
}
