/* /assets/css/news.css
   Layout & Look für die Blog-Übersichtsseite
   – nutzt die Grundstyles aus post.css (Nav, Buttons, Footer)
*/

/* Container für die gesamte Seite unterhalb der Navi */
.news-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6.5rem 1.5rem 3.5rem;
  box-sizing: border-box;
}

/* ===========================
   Hero-Bereich / Titel
   =========================== */

.news-hero {
  text-align: center;
  margin-bottom: 2.4rem;
}

.news-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.9);
  margin-bottom: 0.4rem;
}

.news-title {
  font-size: var(--section-title-font-size, 2.1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--section-title-color, var(--yellow));
  margin-bottom: 0.4rem;
}

.news-subtitle {
  font-size: 0.9rem;
  color: rgba(229, 231, 235, 0.78);
}

/* ===========================
   Suche & Filter
   =========================== */

.news-filters {
  margin-bottom: 2.2rem;
}

.news-search {
  max-width: 520px;
  margin: 0 auto 1.4rem;
}

.news-search-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.65rem 1.2rem;
  background: rgba(15, 23, 42, 0.9);
  color: #E5E7EB;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.news-search-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

/* Kategorien */

.news-filterbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.8);
  color: #E5E7EB;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.95);
  background: rgba(17, 24, 39, 0.95);
}

.filter-pill--active {
  background: var(--section-title-color, var(--yellow));
  color: #111827;
  border-color: var(--section-title-color, var(--yellow));
}

/* ===========================
   Grid der Beiträge
   =========================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

/* Einzelne Karte */

.news-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--card-radius, 1.4rem);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: var(--card-shadow, 0 24px 65px rgba(15, 23, 42, 0.96));
  overflow: hidden;
  position: relative;

  /* dünner Farbakzent links – Standard transparent,
     wird per nth-child eingefärbt */
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: transparent;
}

/* Farbakzente wie im Admin-Dashboard: gelb, blau, rot im Wechsel */
.news-card:nth-child(3n+1) {
  border-left-color: var(--yellow);
  box-shadow:
    var(--card-shadow, 0 24px 65px rgba(15, 23, 42, 0.96)),
    0 0 0 1px rgba(15, 23, 42, 0.85),
    -4px 0 18px rgba(232, 255, 58, 0.45);
}

.news-card:nth-child(3n+2) {
  border-left-color: #38bdf8;
  box-shadow:
    var(--card-shadow, 0 24px 65px rgba(15, 23, 42, 0.96)),
    0 0 0 1px rgba(15, 23, 42, 0.85),
    -4px 0 18px rgba(56, 189, 248, 0.45);
}

.news-card:nth-child(3n+3) {
  border-left-color: #fb7185;
  box-shadow:
    var(--card-shadow, 0 24px 65px rgba(15, 23, 42, 0.96)),
    0 0 0 1px rgba(15, 23, 42, 0.85),
    -4px 0 18px rgba(251, 113, 133, 0.45);
}

/* Bildbereich – sorgt für gleichmäßigen Rahmen */
.news-card-media {
  padding: 0.85rem 0.85rem 0;
}

.news-card-cover-link {
  display: block;
}

.news-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--card-radius, 1.4rem) - 0.3rem);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.9);
  margin: 0 auto;
}

/* Inhalt (Blog-Seite) */

.news-card-body {
  padding: 0.95rem 1.15rem 0.6rem;
}

/* Startseiten-News (Teaser auf der Index-Seite) */
.news-body {
  padding: 0.95rem 1.15rem 0.9rem;
}

.news-body .news-meta {
  font-size: 0.78rem;
  color: rgba(156, 163, 175, 0.95);
  margin-top: 0.55rem;
  margin-bottom: 0.4rem;
}

.news-card-title {
  font-size: calc(var(--page-text-font-size, 1rem) * 1.2);
  margin-bottom: 0.15rem;
  color: var(--section-title-color, var(--yellow));
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
}

.news-card-title a:hover {
  text-decoration: underline;
}

.news-card-meta {
  font-size: 0.78rem;
  color: rgba(156, 163, 175, 0.95);
  margin-bottom: 0.4rem;
}

.news-card-excerpt {
  font-size: var(--page-text-font-size, 0.9rem);
  color: rgba(226, 232, 240, 0.95);
}

/* Footer (allgemein, falls klassisch genutzt) */

.news-card-footer {
  padding: 0.75rem 1.15rem 1rem;
}

.btn.btn-small {
  padding: 0.45rem 1.1rem;
  font-size: 0.82rem;
}

.see-all {
  margin-top: 3rem;
  padding-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

/* ===========================
   Empty state
   =========================== */

.news-empty {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.news-empty-card {
  max-width: 520px;
  text-align: center;
  background: rgba(15, 23, 42, 0.92);
  border-radius: var(--card-radius, 1.4rem);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: var(--card-shadow, 0 24px 65px rgba(15, 23, 42, 0.96));
  padding: 1.7rem 1.6rem 1.9rem;
}

.news-empty-title {
  font-size: calc(var(--page-text-font-size, 1rem) * 1.2);
  color: var(--section-title-color, var(--yellow));
  margin-bottom: 0.3rem;
}

.news-empty-text {
  font-size: var(--page-text-font-size, 0.9rem);
  color: rgba(226, 232, 240, 0.92);
  margin-bottom: 1rem;
}

/* ===========================
   Pagination
   =========================== */

.news-pagination {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.news-page-btn {
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
}

.news-page-btn--active {
  filter: brightness(1.05);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .news-main {
    padding: 6rem 1.1rem 3rem;
  }

  .news-title {
    font-size: calc(var(--section-title-font-size, 2.1rem) * 0.7);
  }

  .news-grid {
    gap: 1.4rem;
  }

  .news-card-cover {
    aspect-ratio: 4 / 3;
  }
}

/* Überschrift in den Startseiten-News-Karten (falls .news-title im Card-Kontext genutzt wird) */
.news-card .news-title {
  font-size: calc(var(--page-text-font-size, 1rem) * 1.2);
  letter-spacing: 0.16em;
}

/* Startseiten-Karten – altes Bild-Markup */
.news-card .news-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--card-radius, 1.4rem) - 0.2rem);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.9);
}

/* ===========================
   Tennisball-"Weiterlesen"-Button
   =========================== */

/* Footerzeile für den Ball – sitzt am unteren Rand der Karte */
.blog-card-footer {
  margin-top: auto;
  padding: 0.55rem 1.15rem 0.9rem;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

/* Screenreader-only-Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* kleiner, glühender Tennisball */
.blog-card-ball {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 20%, #fffbe6 0, #fef08a 26%, #facc15 50%, #eab308 72%, #b45309 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 18px rgba(232, 255, 58, 0.9),
    0 10px 22px rgba(15, 23, 42, 0.95);
  transition:
    transform 0.18s cubic-bezier(.22,.61,.36,1),
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

/* Tennis-Nähte */
.blog-card-ball::before,
.blog-card-ball::after {
  content: "";
  position: absolute;
  inset: 18% 22%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left-color: transparent;
  border-right-color: transparent;
  mix-blend-mode: screen;
}

.blog-card-ball::before {
  transform: rotate(20deg);
}

.blog-card-ball::after {
  transform: rotate(-20deg);
}

/* SVG für den Textpfad */
.blog-card-ball-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;

  transform-origin: 50% 50%;
  transform-box: fill-box;
  transform: rotate(-180deg);
}

.blog-card-ball-text {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  fill: #111827;
}

/* Hover/Active-States */
.blog-card-ball:hover,
.blog-card-ball:focus-visible {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.04);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.32),
    0 0 24px rgba(252, 255, 164, 1),
    0 14px 26px rgba(15, 23, 42, 0.98);
}

.blog-card-ball:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 10px 22px rgba(15, 23, 42, 0.95);
}

/* etwas kleiner auf sehr schmalen Screens */
@media (max-width: 480px) {
  .blog-card-ball {
    width: 42px;
    height: 42px;
  }

  .blog-card-ball-text {
    font-size: 13px;
    letter-spacing: 1.8px;
  }
}
