/* ── Layout ── */
.news-main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 24px 80px;
}

/* ── Masthead ── */
.np-masthead {
  text-align: center;
  padding: 24px 0 20px;
}

.np-masthead h1 {
  font-size: 2.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #3399ff, #66d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.np-masthead-sub {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
}

/* ── Trennlinien ── */
.np-rule {
  border: none;
  border-top: 2px solid rgba(51, 153, 255, 0.3);
  margin: 18px 0 40px;
}

.np-rule-thin {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 40px 0;
}

/* ── Quell-Badge ── */
.np-source {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.np-source.src-thn    { background: rgba(239, 68, 68, 0.12);   color: #f87171; -webkit-text-fill-color: #f87171;  border: 1px solid rgba(239, 68, 68, 0.3); }
.np-source.src-bc     { background: rgba(51, 153, 255, 0.12);  color: #60a5fa; -webkit-text-fill-color: #60a5fa;  border: 1px solid rgba(51, 153, 255, 0.3); }
.np-source.src-krebs  { background: rgba(245, 158, 11, 0.12);  color: #fbbf24; -webkit-text-fill-color: #fbbf24;  border: 1px solid rgba(245, 158, 11, 0.3); }
.np-source.src-ars    { background: rgba(249, 115, 22, 0.12);  color: #fb923c; -webkit-text-fill-color: #fb923c;  border: 1px solid rgba(249, 115, 22, 0.3); }
.np-source.src-sw     { background: rgba(168, 85, 247, 0.12);  color: #c084fc; -webkit-text-fill-color: #c084fc;  border: 1px solid rgba(168, 85, 247, 0.3); }
.np-source.src-other  { background: rgba(148, 163, 184, 0.1);  color: #94a3b8; -webkit-text-fill-color: #94a3b8;  border: 1px solid rgba(148, 163, 184, 0.25); }

/* ── Featured Artikel (Aufmacher) ── */
.np-featured {
  background: var(--bg-card);
  border: 1px solid rgba(51, 153, 255, 0.18);
  border-left: 4px solid #3399ff;
  border-radius: 0 14px 14px 0;
  padding: 30px 36px;
  margin-bottom: 4px;
}

.np-featured-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  -webkit-text-fill-color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.np-featured-desc {
  font-size: 0.97rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
  max-width: 760px;
  margin-bottom: 20px;
}

/* ── Meta (Datum + Link) ── */
.np-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 4px;
}

.np-date {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.28);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.28);
}

.np-readmore {
  font-size: 0.8rem;
  font-weight: 700;
  color: #3399ff;
  -webkit-text-fill-color: #3399ff;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.np-readmore:hover {
  color: #66d9ff;
  -webkit-text-fill-color: #66d9ff;
}

/* ── Sekundäre Artikel (2-spaltig) ── */
.np-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.np-article {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 2px solid rgba(51, 153, 255, 0.25);
  border-radius: 12px;
  padding: 22px 24px;
  transition: border-color 0.2s;
}

.np-article:hover {
  border-color: rgba(51, 153, 255, 0.3);
  border-top-color: #3399ff;
}

/* ── Titel ── */
.np-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  -webkit-text-fill-color: #fff;
  margin: 0 0 10px;
}

/* ── Beschreibung ── */
.np-desc {
  font-size: 0.83rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  flex: 1;
}

/* ── Klein-Grid (3-spaltig) ── */
.np-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.np-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.15s;
}

.np-card:hover {
  border-color: rgba(51, 153, 255, 0.28);
  transform: translateY(-2px);
}

.np-card .np-title { font-size: 0.88rem; margin-bottom: 8px; }
.np-card .np-desc  { font-size: 0.78rem; }

/* ── Lade / Fehler ── */
.np-loading {
  padding: 80px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
  animation: npPulse 1.5s ease-in-out infinite;
}

@keyframes npPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.np-error {
  padding: 80px 20px;
  text-align: center;
  color: #f87171;
  -webkit-text-fill-color: #f87171;
}

/* ── Light Theme ── */
[data-theme="light"] .np-featured {
  background: rgba(51, 153, 255, 0.04);
  border-color: rgba(51, 153, 255, 0.25);
  border-left-color: #3399ff;
}

[data-theme="light"] .np-featured-title,
[data-theme="light"] .np-title {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

[data-theme="light"] .np-featured-desc,
[data-theme="light"] .np-desc {
  color: rgba(15, 23, 42, 0.6);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.6);
}

[data-theme="light"] .np-article,
[data-theme="light"] .np-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .np-date {
  color: rgba(15, 23, 42, 0.35);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .np-masthead-sub {
  color: rgba(15, 23, 42, 0.4);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .np-masthead h1    { font-size: 2rem; }
  .np-featured       { padding: 22px 20px; border-radius: 0 10px 10px 0; }
  .np-featured-title { font-size: 1.4rem; }
  .np-secondary      { grid-template-columns: 1fr; }
  .np-grid           { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .np-grid { grid-template-columns: 1fr; }
}

/* ── Light-Theme ── */
[data-theme="light"] .np-masthead-sub {
  color: rgba(15, 23, 42, 0.4);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.4);
}

[data-theme="light"] .np-rule      { border-top-color: rgba(51, 153, 255, 0.4); }
[data-theme="light"] .np-rule-thin { border-top-color: rgba(15, 23, 42, 0.08); }

[data-theme="light"] .np-featured-title,
[data-theme="light"] .np-title {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

[data-theme="light"] .np-featured-desc,
[data-theme="light"] .np-desc {
  color: rgba(15, 23, 42, 0.65);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.65);
}

[data-theme="light"] .np-date {
  color: rgba(15, 23, 42, 0.4);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.4);
}

[data-theme="light"] .np-card {
  background: #fff;
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .np-secondary .np-article {
  border-left-color: rgba(51, 153, 255, 0.3);
}


.news-main h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #3399ff, #66d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.news-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* ── Status-Zeile ── */
.news-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
}

.news-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(51, 153, 255, 0.1);
  border: 1px solid rgba(51, 153, 255, 0.2);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #66d9ff;
  -webkit-text-fill-color: #66d9ff;
}

/* ── Lade- / Fehler-State ── */
.news-loading,
.news-error {
  text-align: center;
  padding: 60px 20px;
  font-size: 0.9rem;
}

.news-loading {
  color: rgba(255, 255, 255, 0.4);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.news-error {
  color: #f87171;
  -webkit-text-fill-color: #f87171;
}

/* ── Grid ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

/* ── News-Card ── */
.news-card {
  background: var(--bg-card);
  border: 1px solid rgba(51, 153, 255, 0.16);
  border-radius: 16px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.15s;
}

.news-card:hover {
  border-color: rgba(51, 153, 255, 0.4);
  transform: translateY(-2px);
}

/* ── Badges ── */
.news-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.news-cve {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  background: rgba(51, 153, 255, 0.12);
  border: 1px solid rgba(51, 153, 255, 0.25);
  border-radius: 6px;
  color: #93c5fd;
  -webkit-text-fill-color: #93c5fd;
  font-family: monospace;
}

.news-ransomware-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 9px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #f87171;
  -webkit-text-fill-color: #f87171;
  letter-spacing: 0.04em;
}

/* ── Titel ── */
.news-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  -webkit-text-fill-color: #fff;
  line-height: 1.4;
}

/* ── Vendor + Produkt ── */
.news-card-vendor {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.45);
}

/* ── Beschreibung ── */
.news-card-desc {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  flex: 1;
}

/* ── Fuss ── */
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.news-card-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
}

.news-card-link {
  font-size: 0.78rem;
  color: #3399ff;
  -webkit-text-fill-color: #3399ff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

/* ── Light Theme ── */
[data-theme="light"] .news-card {
  background: #ffffff;
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .news-card:hover {
  border-color: #93c5fd;
}

[data-theme="light"] .news-card-title {
  color: #1e293b;
  -webkit-text-fill-color: #1e293b;
}

[data-theme="light"] .news-card-vendor {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

[data-theme="light"] .news-card-desc {
  color: #475569;
  -webkit-text-fill-color: #475569;
}

[data-theme="light"] .news-card-date {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

[data-theme="light"] .news-subtitle {
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}

[data-theme="light"] .news-status-bar {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
}
