/* 🌌 Background + Base Reset */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d2236; /* dark navy */
    color: #e0eaf3; /* soft white-blue */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

#latticeCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0d2236; /* matches site background */
  z-index: -1;               /* keeps it behind all content */
  pointer-events: none;      /* lets clicks pass through */
}

/* 🧭 Header Styling */
.site-header {
    position: fixed;
    width: 98%;
    z-index: 1000; 
    background-color: rgba(13, 34, 54, 0.9); /* semi-transparent navy */
    padding: 1.2rem 2rem;
    border-bottom: 2px solid #17365a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.header-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.content-wrapper {
    padding-top: 100px; /* Make sure this pushes below fixed header */
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    height: 100px;
    width: auto;
    vertical-align: middle;
}

.site-title {
    font-size: 2rem;
    font-weight: 800;
    color: #61a0d1;
    margin: 0;
    text-shadow: 1px 1px 2px #17365a;
}

.tagline-and-translate {
    text-align: center;
    margin-top: 0.75rem;
}

.header-tagline {
    margin: 0.25rem 0;
    font-size: 1.1rem;
    color: #e0eaf3;
    font-weight: 600;
}

.header-title-block {
    text-align: center;
    margin-top: 0.5rem;
}

.site-subtitle {
    font-size: 1.1rem;
    color: #e0eaf3;
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.language-block {
  margin-top: 0.4rem;
}

.translate-block {
    margin-top: 0auto;
}

.translate-block select {
    padding: 0.4rem;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.translate-note {
    font-size: 0.85rem;
    color: #899ab8;
    margin: 0.3;
}

tagline-and-translate select {
    margin-top: 0.3rem;
}

#language-select {
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #899ab8;
  background-color: #0d2236;
  color: #e0eaf3;
  box-shadow: none;
  outline: none;
  appearance: none;         /* 👈 hides native OS styling */
  -webkit-appearance: none; /* Safari */
  -moz-appearance: none;    /* Firefox */
}

.selector-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
}

.selector-wrapper select {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #899ab8;
  background-color: #0d2236;
  color: #e0eaf3;
  width: auto;
  max-width: 90vw;
  text-align: center;
}

.translate-note {
  font-size: 0.85rem;
  color: #899ab8;
  margin-top: 0.25rem;
  text-align: center;
} 

/* 🌐 Navigation */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
}

.nav-links li a {
    text-decoration: none;
    font-weight: 600;
    color: #e8f0fe;
    transition: color 0.2s ease;
}

.nav-links li a:hover {
    color: #61a0d1;
}

/* 📰 Main Container */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero-banner {
    padding-top: 110px; /* adjust based on your fixed header */
    padding-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #61a0d1;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: #e0eaf3;
    font-size: 1.25rem;
    font-weight: 500;
}

/* 🧠 Topic Blocks */
.topic h3 {
    font-size: 1.5rem;
    color: #3b0a98;
    font-weight: 800;
}

/* 🎯 Bias Tags */
.bias-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.bias-liberal {
    background-color: #3b82f6;
    color: white;
}

.bias-conservative {
    background-color: #ef4444;
    color: white;
}

.bias-moderate {
    background-color: #9333ea;
    color: white;
}

.bias-satire {
    background-color: #facc15;
    color: black;
}

.bias-libertarian {
    background-color: #f97316;
    color: white;
}

.badge-breaking {
  background: linear-gradient(135deg, #ff4e50, #f9d423);
  color: #0d2236;
  font-weight: bold;
  padding: 0.35em 0.6em;
  border-radius: 8px;
  font-size: 0.75rem;
  box-shadow: 0 0 8px rgba(255, 78, 80, 0.4);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 6px rgba(255, 78, 80, 0.3); }
  50% { box-shadow: 0 0 12px rgba(255, 78, 80, 0.8); }
  100% { box-shadow: 0 0 6px rgba(255, 78, 80, 0.3); }
}

/* 📸 Article Card */
.article .card {
    transition: transform 0.2s ease;
}

.article .card:hover {
    transform: translateY(-5px);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #f0f2f8;
  margin-bottom: 0.5rem;
}

.bookmark-btn {
  background: none;
  border: none;
  color: gold;
  font-size: 1.1em;
  cursor: pointer;
  margin-left: 0.4em;
  vertical-align: middle;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bookmark-btn:hover {
  transform: scale(1.15);
  opacity: 0.8;
}

.bookmark-btn.saved {
  color: orange;
  text-shadow: 0 0 3px #ffa500;
  transform: scale(1.2);
}

@keyframes favorited-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.15); }
}

.bookmark-btn.active {
  color: orange;
  text-shadow: 0 0 6px #ffa500, 0 0 12px #ffa500;
  transform: scale(1.15);
  animation: favorited-pop 0.3s ease-in-out;
}

/* Favorites Dock Container */

.favorite-dock {
  position: fixed;
  top: 4rem;
  right: 0;
  width: 320px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(13, 34, 54, 0.95); /* Match header navy */
  border-left: none !important;
  background-color: transparent !important;
  padding: 1rem;
  box-shadow: none !important;
  z-index: 9999;
}

.fav-item.dragging {
  opacity: 0.6;
  transform: scale(0.98);
}

.fav-item.shred-away {
  animation: shred 0.4s ease-out forwards;
}

@keyframes shred {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-150%) rotate(-15deg); opacity: 0; }
}


/* 🧾 Favorite Card */

.fav-card {
  display: flex;
  align-items: center;
  background-color: #1c2736;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  max-width: 320px;
}

.fav-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}

.fav-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.fav-title {
  color: #f0f0f0;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin-bottom: 4px;
}

.fav-meta {
  font-size: 0.8rem;
  color: #ccc;
}

.fav-meta .bias-badge {
  margin-right: 6px;
}

.fav-item .remove-btn {
  background: transparent;
  color: #aaa;
  border: none;
  font-size: 1.2rem;
  margin-left: 6px;
  cursor: pointer;
}

/* ⭐ Active Star Icon */

.star-fav {
  margin-left: 0.5rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  vertical-align: middle;
  transform: translateY(1px); /* optional — tweak if misaligned */
  transition: transform 0.1s ease, color 0.2s ease;
}

.star-fav.active {
  color: gold;
  text-shadow: 0 0 4px gold;
  transform: scale(1.2);
}

/* 🖼️ Article Images – Base Style */
.card-img-top {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  margin: 0;
  background-color: #1e293b;
  box-sizing: border-box;
}

.article img,
img.article-preview {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  margin: 0;
  background-color: #1e293b;
  box-sizing: border-box;
}

/* 🦶 Footer */
footer {
    text-align: center;
    font-size: 0.9rem;
    color: #899ab8;
    margin-top: 4rem;
}

/* 🔎 Framing Analysis */
.framing-analysis {
    background-color: #112f45;
    border-top: 1px solid #3b0a98;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
}

.framing-analysis summary {
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    color: #e8f0fe;
    margin-bottom: 0.5rem;
}

.framing-analysis ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.framing-analysis li {
    margin-bottom: 0.3rem;
    color: #e0eaf3;
}

.framing-analysis p.text-muted {
    color: #a0b3c9;
    margin-top: 0.5rem;
}

/* 🎭 Framing Tags */
.framing-tag {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid transparent;
}

.framing-tag.framing-light {
    background-color: #e8f0fe;
    border-color: #a7c0f2;
    color: #2c5282;
}

.framing-tag.framing-heavy {
    background-color: #fdf6e3;
    border-color: #facc15;
    color: #92400e;
}

.framing-tag.propaganda-soft {
    background-color: #fff5f5;
    border-color: #feb2b2;
    color: #c53030;
}

.framing-tag.propaganda-hard {
    background-color: #ffe4e6;
    border-color: #f87171;
    color: #9b1c1c;
}

@media (max-width: 768px) {
  .site-header {
    position: static !important;
  }

  .global-meta-bar {
    background-color: #0d2236;
    border-bottom: 1px solid #17365a;
    font-family: monospace;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .clock-strip span {
    white-space: nowrap;
  }

  .global-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.75rem;
  }

  .translate-strip {
    width: 100%;
    margin-top: 6px;
  }
}


