/* ============================================
   THE FALSE POSITIVE — News Page Styles
   Note: .news-ryuk image styles are in home.css
   ============================================ */

/* ── News Layout ────────────────────────────── */
.news-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-xl) var(--space-3xl);
}

/* ── News Header Parallax ────────────────────── */
.news-header-parallax {
  position: relative;
  width: 100%;
  height: 50vh; /* Half of viewport height */
  min-height: 400px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin-top: var(--nav-height);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-header-parallax .parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed; /* Parallax fixed background */
  filter: brightness(0.4) saturate(0.6);
  z-index: 1;
  transition: filter var(--transition-slow);
}

.news-header-parallax:hover .parallax-bg {
  filter: brightness(0.55) saturate(0.75);
}

@supports (-webkit-touch-callout: none) {
  .news-header-parallax .parallax-bg {
    background-attachment: scroll;
  }
}

.news-header-parallax .parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(26, 29, 26, 0.9) 0%,
    rgba(26, 29, 26, 0.7) 40%,
    rgba(26, 29, 26, 0.1) 100%
  ), linear-gradient(
    to bottom,
    rgba(26, 29, 26, 0.2) 0%,
    var(--bg-primary) 100%
  );
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-xl) 5%;
}

.header-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.2) 3px,
    rgba(0, 0, 0, 0.2) 4px
  );
  z-index: 1;
  pointer-events: none;
}

.news-header-content {
  text-align: left;
  z-index: 3;
  max-width: 800px;
}

.news-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(67, 102, 113, 0.15);
  border: 1px solid var(--border-red);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--red-bright);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.news-header-content h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--white);
  margin-bottom: var(--space-sm);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.05em;
}

.news-header-sub {
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  opacity: 0.8;
}

.news-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red-bright);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 141, 161, 0.6); opacity: 1; }
  50%       { box-shadow: 0 0 0 4px transparent; opacity: 0.5; }
}

/* ── Control Bar (Filters & Refresh) ─────────── */
.news-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-card);
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-filter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.news-filter-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--silver);
}

.news-filter-btn.active {
  background: var(--red-ghost);
  border-color: var(--border-red);
  color: var(--red-bright);
  box-shadow: inset 0 0 10px rgba(67, 102, 113, 0.1);
}

.news-refresh-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#news-count-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.refresh-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

.refresh-btn:hover {
  background: var(--bg-hover);
  border-color: var(--silver);
}

/* ── News Grid ──────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

/* ── News Card ──────────────────────────────── */
.news-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-mid);
  text-decoration: none;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red-bright), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-mid) cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--border-light);
  transition: background var(--transition-fast);
}

.news-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  background: var(--bg-elevated);
}

.news-card:hover::before { transform: scaleX(1); }
.news-card:hover::after { background: var(--red-bright); }

.news-card-body {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) calc(var(--space-lg) + 6px);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: 0.25rem;
}

.news-source {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
  font-weight: 600;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.news-card-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.4;
  font-weight: 600;
  flex: 1;
}

.news-card-excerpt {
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.8;
}

.news-card-footer {
  padding: 0.75rem var(--space-lg) 0.75rem calc(var(--space-lg) + 6px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.1);
}

.news-read-link {
  color: var(--silver);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}
.news-card:hover .news-read-link { 
  gap: var(--space-sm); 
  color: var(--red-bright);
}

.news-category-tag {
  font-size: 0.65rem;
  padding: 0.25em 0.6em;
  border-radius: 12px;
  background: var(--red-ghost);
  border: 1px solid var(--border-red);
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Loading Skeleton ───────────────────────── */
.news-skeleton {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.skeleton-line {
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-full { width: 100%; }
.skeleton-line.h-tall { height: 20px; }

/* ── Error / Empty State ────────────────────── */
.news-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
}

.news-error-icon { font-size: 3rem; margin-bottom: var(--space-md); }

.news-error-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.news-error-text {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .news-layout { padding: var(--space-xl) var(--space-md) var(--space-2xl); }
  .news-grid { grid-template-columns: 1fr; }
  .news-header-parallax {
    height: 35vh;
    min-height: 280px;
    margin-top: var(--nav-height);
  }
  .news-header-parallax .parallax-overlay {
    padding: var(--space-xl) var(--space-lg);
  }
  .news-header-content h1 {
    font-size: 2rem;
  }
  
  .news-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
  .news-filters {
    justify-content: center;
  }
  .news-refresh-wrapper {
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
  }
}

