/* assets/blog.css */

/* Retro Tokens (Blog-only) */
html[data-blog-theme="retro"]{
  --retro-bg1: #0b0b12;
  --retro-bg2: #140b2d;
  --retro-neon: #ff3bd4;
  --retro-cyan: #00f5ff;
  --retro-yellow: #ffe066;

  --accent: var(--retro-neon);
}

/* Page transition */
.page-transition{
  transition: opacity .28s ease, filter .28s ease;
}
.page-transition.is-leaving{
  opacity: 0;
  filter: blur(12px);
}

/* Retro Background */
body{
  background:
    radial-gradient(900px 500px at 50% 10%, rgba(255,59,212,.18), transparent 60%),
    radial-gradient(900px 500px at 20% 80%, rgba(0,245,255,.12), transparent 60%),
    linear-gradient(180deg, var(--retro-bg1), var(--retro-bg2));
}

/* Subtle Scanlines */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.06) 0px,
    rgba(255,255,255,.06) 1px,
    transparent 2px,
    transparent 6px
  );
  mix-blend-mode: soft-light;
  opacity: .35;
  z-index: 0;
}

.site-header, main, footer{ position: relative; z-index: 1; }

/* Header in Seitenfarbe, Nav sticht raus */
html[data-blog-theme="retro"] .site-header{
  backdrop-filter: none;
  background: color-mix(in oklab, #000 35%, transparent);
  border-bottom: 1px solid rgba(0,245,255,.18);
}

html[data-blog-theme="retro"] .nav a{
  font-family: "Press Start 2P", system-ui;
  font-size: 11px;
  letter-spacing: .06em;
  color: #ffffff;
  opacity: .95;
  text-shadow: 0 0 14px rgba(0,245,255,.18);
}
html[data-blog-theme="retro"] .nav a:hover{
  color: var(--retro-cyan);
  text-shadow: 0 0 18px rgba(0,245,255,.28), 0 0 18px rgba(255,59,212,.12);
}
html[data-blog-theme="retro"] .nav a.is-active{
  color: var(--retro-yellow);
  opacity: 1;
  text-shadow: 0 0 18px rgba(255,224,102,.25);
}

/* Typography */
.blog-title{
  font-family: "Press Start 2P", system-ui;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: .02em;
  margin: 0 0 14px;
  text-shadow: 0 0 22px rgba(255,59,212,.35);
  color: #fff;
}
.blog-subtitle{
  font-family: "VT323", ui-monospace;
  font-size: 24px;
  opacity: .95;
  color: #fff;
}
.blog-hero .wrap{ max-width: 980px; }

/* Search */
.blog-search{
  margin-top: 18px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.blog-search input{
  width: min(860px, 100%);
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--retro-cyan) 45%, rgba(255,255,255,.08));
  background: color-mix(in oklab, #000 55%, transparent);
  color: #ffffff;         /* text visible */
  caret-color: #ffffff;
  outline: none;
  font-family: "VT323", ui-monospace;
  font-size: 22px;
  box-shadow: 0 0 0 1px rgba(0,245,255,.12), 0 18px 38px rgba(0,0,0,.35);
}
.blog-search input::placeholder{ color: rgba(255,255,255,.55); }
.blog-search input:focus{
  box-shadow:
    0 0 0 1px rgba(0,245,255,.20),
    0 0 26px rgba(0,245,255,.18),
    0 0 26px rgba(255,59,212,.12);
}
.blog-search-hint{
  font-family: "VT323", ui-monospace;
  font-size: 18px;
  opacity: .85;
  color: rgba(255,255,255,.9);
}

/* Language toggle */
.lang-toggle{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top: 14px;
}
.lang-btn{
  border-radius: 12px;
  border: 1px solid rgba(0,245,255,.18);
  background: color-mix(in oklab, #000 55%, transparent);
  color:#fff;
  padding: 10px 12px;
  font-family: "Press Start 2P", system-ui;
  font-size: 10px;
  cursor:pointer;
}
.lang-btn.is-active{
  border-color: rgba(255,224,102,.35);
  color: var(--retro-yellow);
  box-shadow: 0 0 24px rgba(255,224,102,.12);
}

/* Grid */
.blog-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1024px){ .blog-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .blog-grid{ grid-template-columns: 1fr; } }

/* Cards */
.blog-card{
  border-radius: 18px;
  border: 1px solid rgba(0,245,255,.18);
  background: color-mix(in oklab, #000 45%, rgba(20,11,45,.55));
  box-shadow: 0 16px 42px rgba(0,0,0,.38);
  overflow: hidden;
  position: relative;
}
.blog-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: radial-gradient(500px 220px at 30% 20%, rgba(255,59,212,.18), transparent 60%);
  opacity: .8;
}

.blog-card-link{
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}

/* Retro thumb placeholder */
.blog-thumb{
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,245,255,.14);
  background:
    linear-gradient(135deg, rgba(255,59,212,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,245,255,.12), transparent 55%),
    color-mix(in oklab, #000 55%, transparent);
}

.blog-thumb-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;      /* wichtig: füllt ohne Verzerrung */
  object-position: center;
  filter: contrast(1.05) saturate(1.05);
}
.blog-thumb-img{
  image-rendering: auto;
}
.blog-thumb{
  box-shadow: inset 0 0 0 1px rgba(0,245,255,.12);
}


.blog-thumb-inner{
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.blog-thumb-label{
  font-family: "Press Start 2P", system-ui;
  font-size: 16px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.9);
  text-shadow: 0 0 18px rgba(0,245,255,.18);
}

.blog-card-body{
  padding: 12px 14px 10px; /* extra rechts padding für sauberes Wrapping */
}

.blog-meta{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  font-family: "VT323", ui-monospace;
  font-size: 18px;
  opacity: .95;
  color: #fff;
}
.blog-date{ color: var(--retro-yellow); }
.blog-tags{
  color: var(--retro-cyan);
  text-shadow: 0 0 14px rgba(0,245,255,.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58%;
}

/* TITLE FIX: smaller + wrap + no right cut */
.blog-card-title{
  margin: 10px 0 6px;
  font-family: "Press Start 2P", system-ui;
  font-size: 12px;
  line-height: 1.45;
  color: #fff;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;

  max-height: calc(1.45em * 2); /* max 2 lines */
  overflow: hidden;
}

.blog-card-excerpt{
  margin: 0;
  font-family: "VT323", ui-monospace;
  font-size: 20px;
  line-height: 1.2;
  color: rgba(255,255,255,.92);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-actions{
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(0,245,255,.10);
  justify-content: flex-start;
}

.blog-mini-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,245,255,.18);
  background: color-mix(in oklab, #000 50%, transparent);
  color: #fff;
  text-decoration: none;
  font-family: "Press Start 2P", system-ui;
  font-size: 10px;
  letter-spacing: .06em;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.blog-mini-btn:hover{
  border-color: rgba(255,59,212,.25);
  box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px rgba(255,59,212,.10);
}

.blog-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(0,0,0,.48), 0 0 36px rgba(255,59,212,.10);
  border-color: rgba(255,59,212,.22);
}

.blog-no-results{
  margin-top: 18px;
  font-family: "VT323", ui-monospace;
  font-size: 22px;
  opacity: .9;
  color: #fff;
}

/* Detail */
.blog-post-wrap{ max-width: 980px; }

.blog-back{
  display:inline-block;
  margin-bottom: 14px;
  font-family: "VT323", ui-monospace;
  font-size: 22px;
  color: var(--retro-cyan);
  text-decoration: none;
}
.blog-back:hover{ text-shadow: 0 0 18px rgba(0,245,255,.25); }

.blog-post-title{
  font-family: "Press Start 2P", system-ui;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.5;
  margin: 16px 0 10px;
  color: #fff;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.blog-meta-post{ margin-bottom: 14px; }

.blog-post-video{ margin: 14px 0 18px; }

.video-embed{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(0,245,255,.14);
  box-shadow: 0 18px 52px rgba(0,0,0,.35);
}
.video-embed iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Article formatting */
.blog-article{
  background: color-mix(in oklab, #000 35%, rgba(20,11,45,.55));
  border: 1px solid rgba(0,245,255,.14);
  border-radius: 18px;
  padding: 18px 18px 20px;
  box-shadow: 0 18px 52px rgba(0,0,0,.35);
}
.blog-article p{
  font-family: "VT323", ui-monospace;
  font-size: 23px;
  line-height: 1.45;
  margin: 0 0 16px;
  color: #fff;
}
.blog-article h2{
  font-family: "Press Start 2P", system-ui;
  font-size: 13px;
  line-height: 1.5;
  margin: 18px 0 10px;
  color: var(--retro-yellow);
  text-shadow: 0 0 18px rgba(255,224,102,.18);
}
.blog-article ul{
  margin: 0 0 18px;
  padding-left: 20px;
  font-family: "VT323", ui-monospace;
  font-size: 22px;
  color: #fff;
}
.blog-article li{
  margin: 8px 0;
  line-height: 1.35;
}

.blog-callout{
  border: 1px dashed rgba(0,245,255,.35);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 16px 0 18px;
  background: color-mix(in oklab, #000 55%, transparent);
}

/* Screenreader */
.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;
}

.blog-grid .blog-card .blog-excerpt{
  color: rgba(220,220,220,.85);
  text-shadow: 0 0 10px rgba(0,245,255,.08);
}

/* Blog-Artikel: echte Mitte + angenehme Lesebreite */
.blog-post {
  max-width: 78ch;
  margin: 0 auto;
  text-align: center;
}

.blog-post p,
.blog-post h1,
.blog-post h2 {
  margin-left: auto;
  margin-right: auto;
}


/* Kachel-Untertitel (Excerpt): hellgrau + Retro-Neon */
.blog-card .blog-excerpt{
  color: rgba(235,235,235,.88);
  text-shadow:
    0 0 10px rgba(0, 245, 255, .20),
    0 0 18px rgba(255, 45, 149, .14);
  letter-spacing: .02em;
  font-size: 0.95rem;
  line-height: 1.35;
}



/* BLOG GRID CARD: Excerpt heller + Retro-Neon */
.blog-grid .blog-card .excerpt,
.blog-grid .blog-card .blog-excerpt,
.blog-grid .blog-card p[data-excerpt],
.blog-grid .blog-card p {
  color: rgba(245, 245, 245, 0.92) !important;
  text-shadow:
    0 0 6px rgba(0, 245, 255, 0.35),
    0 0 14px rgba(0, 245, 255, 0.22),
    0 0 10px rgba(255, 45, 149, 0.18),
    0 0 18px rgba(255, 45, 149, 0.12);
}


