/* SCH NEWS PLUS – sch-news-plus.css */

/* ── 1. MARGINS FIX: gleich links & rechts ── */
.section-news-archive,
.wp-block-query.section-news-archive {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: clamp(18px, 4vw, 52px) !important;
  padding-right: clamp(18px, 4vw, 52px) !important;
  box-sizing: border-box !important;
}

/* ── 2. FILTER BAR ── */
.sch-np-bar {
  width: 100%;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0,0,107,0.12);
}
.sch-np-bar__inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;
}
.sch-np-bar__inner::-webkit-scrollbar { display: none; }

.sch-np-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-family: "General Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,107,0.50);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .18s, border-color .18s;
}
.sch-np-tab:hover,
.sch-np-tab.is-active {
  color: #00006b;
  border-color: #00006b;
  text-decoration: none;
}
.sch-np-tab--icon { color: rgba(0,0,107,0.40); }
.sch-np-tab--icon.is-active,
.sch-np-tab--icon:hover { color: #00006b; }

/* ── 3. GALLERY BADGE ── */
.sch-np-gallery-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: rgba(0,0,107,0.90);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Hover-Effekt auf Gallery-Karten */
.sch-np-is-gallery { cursor: pointer; }
.sch-np-is-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0,0,107,0.06);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 5;
}
.sch-np-is-gallery:hover::after { opacity: 1; }

/* Galerie-Blöcke in einzelnen Beiträgen */
.sch-np-wp-gallery {
  width: min(100%, 1120px) !important;
  max-width: calc(100vw - (clamp(18px, 4vw, 52px) * 2)) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

.sch-np-wp-gallery.has-nested-images {
  align-items: stretch !important;
  gap: clamp(8px, 1.4vw, 14px) !important;
}

.sch-np-wp-gallery.has-nested-images figure.wp-block-image {
  width: 100% !important;
  margin: 0 !important;
}

.sch-np-wp-gallery .sch-np-gallery-trigger,
.sch-np-wp-gallery img {
  cursor: zoom-in;
}

.sch-np-wp-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* ── 4. LIGHTBOX ── */
.sch-np-lb {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.sch-np-lb.is-open {
  opacity: 1;
  pointer-events: all;
}

.sch-np-lb__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
  z-index: 2;
}
.sch-np-lb__title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.sch-np-lb__meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sch-np-lb__count {
  color: rgba(255,255,255,0.60);
  font-size: 13px;
  font-weight: 500;
}
.sch-np-lb__close {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 0;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  line-height: 1;
}
.sch-np-lb__close:hover { background: rgba(255,255,255,0.28); }

.sch-np-lb__img-wrap {
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sch-np-lb__img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  transition: opacity .2s;
}

.sch-np-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 0;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  z-index: 2;
  user-select: none;
}
.sch-np-lb__nav:hover { background: rgba(255,255,255,0.28); }
.sch-np-lb__nav--prev { left: 16px; }
.sch-np-lb__nav--next { right: 16px; }
.sch-np-lb__nav:disabled { opacity: 0.28; cursor: default; }

.sch-np-lb__thumbs {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 20px 18px;
  display: flex;
  gap: 7px;
  justify-content: center;
  overflow-x: auto;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  scrollbar-width: none;
  z-index: 2;
}
.sch-np-lb__thumbs::-webkit-scrollbar { display: none; }
.sch-np-lb__thumb {
  width: 54px; height: 40px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.50;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity .18s, border-color .18s;
}
.sch-np-lb__thumb.is-active {
  opacity: 1;
  border-color: #00006b;
}
.sch-np-lb__msg {
  color: rgba(255,255,255,0.60);
  font-size: 14px;
  text-align: center;
  padding: 8px 0;
}

/* ── 5. ADMIN STYLES ── */
.sch-np-wrap { max-width: 1100px; }
.sch-np-box {
  background: #fff;
  border: 1px solid #ccd0d4;
  border-radius: 6px;
  padding: 22px 24px;
  margin: 20px 0;
}
.sch-np-box h3 { margin-top: 0; color: #00006b; }

.sch-np-import-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.sch-np-import-table th {
  background: #00006b;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.sch-np-import-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  vertical-align: middle;
}
.sch-np-import-table tr:last-child td { border-bottom: 0; }
.sch-np-import-table tr:hover td { background: #f4f7ff; }

.sch-np-status-neu     { color: #000050; font-weight: 700; }
.sch-np-status-draft   { color: #856404; font-weight: 700; }
.sch-np-status-publish { color: #0a5236; font-weight: 700; }

.sch-np-btn-import {
  background: #00006b;
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .18s;
}
.sch-np-btn-import:hover { background: #000050; }
.sch-np-btn-import:disabled { background: #aaa; cursor: default; }
.sch-np-btn-done { background: #0a5236 !important; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .section-news-archive,
  .wp-block-query.section-news-archive {
    padding-right: clamp(16px, 5vw, 24px) !important;
    padding-left: clamp(16px, 5vw, 24px) !important;
  }

  .sch-np-wp-gallery {
    max-width: calc(100vw - (clamp(16px, 5vw, 24px) * 2)) !important;
  }

  .sch-np-wp-gallery.has-nested-images {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .sch-np-tab { padding: 12px 10px; font-size: 12px; }
  .sch-np-lb__nav { width: 40px; height: 40px; font-size: 20px; }
  .sch-np-lb__nav--prev { left: 6px; }
  .sch-np-lb__nav--next { right: 6px; }
  .sch-np-lb__img-wrap { max-width: 96vw; max-height: 72vh; }
  .sch-np-lb__img { max-width: 96vw; max-height: 72vh; }
}
