/* ==================================================================
   Dodocluster — Beiträge / Posts page
   Midnight themed listing with category filter + tile cards
   ================================================================== */

/* Page layout */
.posts-page {
  position: relative;
  z-index: 5;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cream);
  opacity: 0.55;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.breadcrumb a {
  color: var(--lime-bright);
  text-decoration: none;
  border-bottom: 1px dotted rgba(164,212,58,0.4);
}
.breadcrumb a:hover { color: var(--lime-bright); border-bottom-color: var(--lime-bright); }
.breadcrumb .sep { margin: 0 10px; opacity: 0.4; }

/* Page hero */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  padding-bottom: 32px;
  border-bottom: 2px dashed rgba(164, 212, 58, 0.2);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 72px;
  color: var(--lime-bright);
  text-shadow:
    0 3px 0 var(--lime-shadow),
    0 6px 0 #1a2a0a,
    0 12px 24px rgba(0,0,0,0.6);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 14px;
}

.page-hero .eyebrow {
  font-family: var(--font-hand);
  font-size: 28px;
  color: var(--lime-bright);
  text-shadow: 0 2px 0 var(--lime-shadow), 0 3px 8px rgba(0,0,0,.5);
  transform: rotate(-3deg);
  display: inline-block;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 18px;
  opacity: 0.8;
  max-width: 560px;
  line-height: 1.5;
}

/* Search + sort bar */
.list-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
}

.search-box {
  position: relative;
}
.search-box input {
  background: rgba(10, 14, 31, 0.8);
  border: 2px solid rgba(164,212,58,0.3);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px 12px 42px;
  border-radius: 12px;
  width: 280px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input::placeholder { color: rgba(245,230,200,0.4); }
.search-box input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(164,212,58,0.15);
}
.search-box::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8e85a' stroke-width='2.5' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3-3'/></svg>");
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.8;
}

.sort-select {
  background: rgba(10, 14, 31, 0.8);
  border: 2px solid rgba(164,212,58,0.3);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 38px 12px 14px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8e85a' stroke-width='2.5' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Category pill filter */
.category-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 18px;
  background: rgba(10, 14, 31, 0.55);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(164,212,58,0.15);
  border-radius: 18px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(26, 21, 48, 0.6);
  border: 2px solid transparent;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(.4,1.5,.5,1);
  user-select: none;
}
.cat-pill .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}
.cat-pill .count {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 20px;
  opacity: 0.7;
}
.cat-pill:hover {
  background: rgba(164,212,58,0.12);
  transform: translateY(-2px);
  border-color: rgba(164,212,58,0.3);
}
.cat-pill.active {
  background: var(--lime);
  color: #1a2a0a;
  border-color: var(--lime-bright);
  box-shadow: 0 4px 0 var(--lime-shadow), 0 0 24px rgba(164,212,58,0.35);
  transform: translateY(-2px);
}
.cat-pill.active .count {
  background: rgba(26,42,10,0.3);
  color: #1a2a0a;
  opacity: 1;
}
.cat-pill.active .dot { background: #1a2a0a !important; box-shadow: none; }

/* Category colors via data-cat */
.cat-pill[data-cat="news"] { color: #8ab4ff; }
.cat-pill[data-cat="news"] .dot { background: #8ab4ff; }
.cat-pill[data-cat="events"] { color: #ff9a6b; }
.cat-pill[data-cat="events"] .dot { background: #ff9a6b; }
.cat-pill[data-cat="guides"] { color: #c8e85a; }
.cat-pill[data-cat="guides"] .dot { background: #c8e85a; }
.cat-pill[data-cat="updates"] { color: #d89aff; }
.cat-pill[data-cat="updates"] .dot { background: #d89aff; }
.cat-pill[data-cat="community"] { color: #ff6bb3; }
.cat-pill[data-cat="community"] .dot { background: #ff6bb3; }
.cat-pill[data-cat="server"] { color: #6be0d8; }
.cat-pill[data-cat="server"] .dot { background: #6be0d8; }
.cat-pill.active[data-cat] .dot { background: #1a2a0a !important; }

/* Tile grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Featured tile spans 2 cols on wide screens */
.post-grid .post-tile.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 340px;
}
@media (max-width: 860px) {
  .post-grid .post-tile.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
}

/* Post tile */
.post-tile {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 21, 48, 0.92), rgba(10, 14, 31, 0.96));
  border: 2px solid rgba(164,212,58,0.18);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.32s cubic-bezier(.3,1.4,.4,1), border-color 0.25s, box-shadow 0.3s;
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  cursor: pointer;
}
.post-tile:hover {
  transform: translateY(-8px);
  border-color: var(--lime);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 0 2px rgba(164,212,58,0.2);
}
.post-tile:hover .post-cover { transform: scale(1.06); }
.post-tile:hover .post-title { color: var(--lime-bright); }

.post-cover-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0e1f;
}
.post-tile.featured .post-cover-wrap { aspect-ratio: auto; height: 100%; }

.post-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.9,.3,1);
}

/* Artwork gradient fallback — a chunky SVG emblem */
.post-cover-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.post-cover-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.3) 0, transparent 40%);
}
.post-cover-art svg {
  width: 56%;
  height: 56%;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
  position: relative;
  z-index: 1;
}

/* Category-themed cover backgrounds */
.post-cover-art[data-cat="news"]      { background: linear-gradient(135deg, #2a3a6a 0%, #1a2245 60%, #0d1428 100%); }
.post-cover-art[data-cat="events"]    { background: linear-gradient(135deg, #6a3a1a 0%, #3d1f0d 100%); }
.post-cover-art[data-cat="guides"]    { background: linear-gradient(135deg, #3a5a1a 0%, #1f3008 100%); }
.post-cover-art[data-cat="updates"]   { background: linear-gradient(135deg, #4a1f5a 0%, #22102d 100%); }
.post-cover-art[data-cat="community"] { background: linear-gradient(135deg, #5a1f4a 0%, #2d0f24 100%); }
.post-cover-art[data-cat="server"]    { background: linear-gradient(135deg, #1a4a5a 0%, #0d222a 100%); }

/* Category chip on cover */
.post-cat-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(10,14,31,0.88);
  backdrop-filter: blur(6px);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  border-radius: 20px;
  border: 1px solid rgba(164,212,58,0.3);
  z-index: 2;
}
.post-cat-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.post-cat-chip[data-cat="news"] { color: #8ab4ff; }
.post-cat-chip[data-cat="news"] .dot { background: #8ab4ff; }
.post-cat-chip[data-cat="events"] { color: #ff9a6b; }
.post-cat-chip[data-cat="events"] .dot { background: #ff9a6b; }
.post-cat-chip[data-cat="guides"] { color: #c8e85a; }
.post-cat-chip[data-cat="guides"] .dot { background: #c8e85a; }
.post-cat-chip[data-cat="updates"] { color: #d89aff; }
.post-cat-chip[data-cat="updates"] .dot { background: #d89aff; }
.post-cat-chip[data-cat="community"] { color: #ff6bb3; }
.post-cat-chip[data-cat="community"] .dot { background: #ff6bb3; }
.post-cat-chip[data-cat="server"] { color: #6be0d8; }
.post-cat-chip[data-cat="server"] .dot { background: #6be0d8; }

/* Pinned ribbon */
.pinned-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #ffc23a 0%, #d48a1a 100%);
  color: #2a1a00;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.2px;
  border-radius: 20px;
  box-shadow: 0 3px 0 #6b4500, 0 6px 16px rgba(255,194,58,0.35);
  z-index: 2;
}

/* Post body */
.post-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.post-tile.featured .post-body {
  padding: 32px 32px 28px;
  justify-content: center;
}

.post-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--cream);
  line-height: 1.2;
  transition: color 0.2s;
}
.post-tile.featured .post-title { font-size: 32px; }

.post-excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.72;
  flex: 1;
}
.post-tile.featured .post-excerpt { font-size: 16px; }

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(164,212,58,0.15);
  font-size: 13px;
  opacity: 0.7;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ork-orange) 0%, var(--ork-orange-deep) 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: #2a1000;
  border: 2px solid rgba(164,212,58,0.3);
  flex-shrink: 0;
}

.post-date {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--lime-bright);
  opacity: 0.9;
  white-space: nowrap;
}

.post-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  opacity: 0.65;
}
.post-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* No results state */
.no-results {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: var(--cream);
  opacity: 0.5;
}
.no-results .emoji {
  font-size: 72px;
  margin-bottom: 16px;
  display: block;
}
.no-results h3 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--lime-bright);
  margin-bottom: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
  font-family: var(--font-display);
}
.pagination button {
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  background: rgba(26, 21, 48, 0.7);
  border: 2px solid rgba(164,212,58,0.2);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s;
}
.pagination button:hover:not(:disabled) {
  border-color: var(--lime);
  transform: translateY(-2px);
}
.pagination button.active {
  background: var(--lime);
  color: #1a2a0a;
  border-color: var(--lime-bright);
  box-shadow: 0 3px 0 var(--lime-shadow);
}
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 700px) {
  .posts-page { padding: 40px 20px 60px; }
  .page-hero h1 { font-size: 48px; }
  .list-controls { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
}

/* ── Standard page content ─────────────────────────────────────── */
.page-content {
  background: rgba(10, 14, 31, 0.6);
  border: 1px solid rgba(164, 212, 58, 0.1);
  border-radius: 20px;
  padding: 40px 48px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--cream);
  max-width: 820px;
}
.page-content h2,
.page-content h3,
.page-content h4 {
  font-family: var(--font-display);
  color: var(--lime-bright);
  margin: 1.6em 0 0.5em;
}
.page-content h2 { font-size: 32px; }
.page-content h3 { font-size: 24px; }
.page-content a { color: var(--lime-bright); text-decoration: underline; text-underline-offset: 3px; }
.page-content a:hover { opacity: 0.8; }
.page-content p { margin-bottom: 1.1em; }
.page-content ul,
.page-content ol { padding-left: 1.5em; margin-bottom: 1.1em; }
.page-content li { margin-bottom: 0.4em; }
.page-content img { max-width: 100%; border-radius: 12px; }
.page-content blockquote {
  border-left: 3px solid var(--lime);
  margin: 1.5em 0;
  padding: 0.6em 1.2em;
  opacity: 0.75;
  font-style: italic;
}
.page-content hr {
  border: none;
  border-top: 1px dashed rgba(164, 212, 58, 0.2);
  margin: 2em 0;
}

@media (max-width: 700px) {
  .page-content { padding: 24px 20px; }
  .page-content h2 { font-size: 24px; }
}
