/* ===== ANDOVOLAO NEWS - BLACK APP STYLE ===== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --av-primary: #10b981;
  --av-bg: #0a0a0a;
  --av-bg-card: rgba(15, 15, 15, 0.6);
  --av-text: #ffffff;
  --av-text-muted: rgba(255, 255, 255, 0.65);
  --av-text-dim: rgba(255, 255, 255, 0.45);
  --av-border: rgba(255, 255, 255, 0.08);
  --av-font-display: 'Archivo Black', sans-serif;
  --av-font-body: 'Inter', sans-serif;
}

body {
  font-family: var(--av-font-body);
  background: var(--av-bg);
  color: var(--av-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Reading Progress Bar */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--av-primary), #34d399);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 120px) 0 clamp(60px, 10vh, 100px);
}

/* Back Link */
.back-to-news {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--av-bg-card);
  border: 1px solid var(--av-border);
  border-radius: 12px;
  color: var(--av-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 32px;
}

.av-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.back-to-news:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--av-primary);
  transform: translateX(-4px);
}

/* Article Header */
.article-header {
  margin-bottom: 40px;
}

.category {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  color: var(--av-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.article-header h1 {
  font-family: var(--av-font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--av-text-dim);
  font-size: 0.9rem;
}

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

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--av-border);
}

.author-info strong {
  color: var(--av-text-muted);
}

/* Alt Link Box */
.alt-link-box {
  padding: 16px 20px;
  background: rgba(16, 185, 129, 0.05);
  border-left: 3px solid var(--av-primary);
  border-radius: 8px;
  margin-bottom: 32px;
}

.alt-link-box p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--av-text-muted);
}

.alt-link-box a {
  color: var(--av-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.3);
  transition: text-decoration-color 0.2s ease;
}

.alt-link-box a:hover {
  text-decoration-color: var(--av-primary);
}

/* Article Image */
.article-image {
  /* Ensure responsive, non-distorted scaling across desktop & mobile */
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important; /* override any HTML height attributes */
  border-radius: 20px;
  margin-bottom: 40px;
}

/* Article Content */
.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--av-text-muted);
}

.article-content .lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--av-text);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--av-border);
}

.article-content h2 {
  font-family: var(--av-font-display);
  font-size: 1.8rem;
  line-height: 1.3;
  margin: 48px 0 20px;
  color: var(--av-text);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-family: var(--av-font-display);
  font-size: 1.3rem;
  margin: 32px 0 16px;
  color: var(--av-text);
}

.article-content p {
  margin-bottom: 24px;
}

.article-content a {
  color: var(--av-primary);
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.article-content a:hover {
  text-decoration-color: var(--av-primary);
}

/* Key Takeaways */
.key-takeaways {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 28px;
  margin: 40px 0;
}

.key-takeaways h3 {
  font-family: var(--av-font-display);
  font-size: 1.1rem;
  color: var(--av-primary);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.key-takeaways ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.key-takeaways li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  color: var(--av-text-muted);
  line-height: 1.6;
}

.key-takeaways li:last-child {
  margin-bottom: 0;
}

.key-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--av-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.key-takeaways strong {
  color: var(--av-text);
  font-weight: 600;
}

/* Inline Sources */
.inline-sources {
  font-size: 0.85rem;
  color: var(--av-text-dim);
}

.inline-sources a {
  color: var(--av-text-dim);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.inline-sources a:hover {
  color: var(--av-primary);
  text-decoration-color: var(--av-primary);
}

/* Fact Box */
.fact-box {
  background: var(--av-bg-card);
  border: 1px solid var(--av-border);
  border-left: 4px solid var(--av-primary);
  border-radius: 12px;
  padding: 24px;
  margin: 40px 0;
}

.fact-box h4 {
  font-family: var(--av-font-display);
  font-size: 1.1rem;
  color: var(--av-primary);
  margin: 0 0 16px;
  text-transform: uppercase;
}

.fact-box p {
  margin-bottom: 12px;
  color: var(--av-text-muted);
  line-height: 1.6;
}

.fact-box p:last-child {
  margin-bottom: 0;
}

/* Fact Box Simple */
.fact-box-simple {
  background: rgba(16, 185, 129, 0.05);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.fact-box-simple h3 {
  font-family: var(--av-font-display);
  font-size: 1.1rem;
  color: var(--av-primary);
  margin: 0 0 16px;
  text-transform: uppercase;
}

.fact-box-simple ul {
  margin: 16px 0 0;
  padding-left: 24px;
}

.fact-box-simple li {
  margin-bottom: 12px;
  color: var(--av-text-muted);
}

/* Article Figure */
.article-figure {
  margin: 48px 0;
}

.article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  border-radius: 20px;
  display: block;
}

/* Defensive: any images inside articles with hardcoded width/height attributes must stay responsive */
.article-container img[width][height] {
  height: auto !important;
  max-width: 100%;
}

.image-caption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--av-text-dim);
  font-style: italic;
  text-align: center;
}

/* Lexicon Terms */
.lexicon-term {
  color: var(--av-primary);
  border-bottom: 1px dashed rgba(16, 185, 129, 0.4);
  cursor: help;
  transition: border-color 0.2s ease;
}

.lexicon-term:hover {
  border-color: var(--av-primary);
}

.lexicon-tooltip {
  position: absolute;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 280px;
  font-size: 0.85rem;
  line-height: 1.5;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.lexicon-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.lexicon-term-title {
  display: block;
  font-weight: 700;
  color: var(--av-primary);
  margin-bottom: 6px;
}

/* Opinion Block */
.main-comments-section {
  background: rgba(15, 15, 15, 0.4);
  padding: clamp(40px, 8vh, 80px) 0;
  margin-top: clamp(60px, 10vh, 100px);
}

.comments-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

.comments-container h3 {
  font-family: var(--av-font-display);
  font-size: 1.5rem;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.opinion-block {
  background: var(--av-bg-card);
  border: 1px solid var(--av-border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
}

.opinion-header {
  margin-bottom: 20px;
}

.opinion-author-info {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.opinion-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--av-border);
}

.opinion-meta h4 {
  font-family: var(--av-font-display);
  font-size: 1rem;
  margin: 0 0 4px;
  color: var(--av-text);
}

.opinion-disclaimer {
  font-size: 0.8rem;
  color: var(--av-text-dim);
}

.opinion-content p {
  margin-bottom: 16px;
  color: var(--av-text-muted);
  line-height: 1.7;
}

.opinion-content strong {
  color: var(--av-primary);
  font-weight: 600;
}

.opinion-cta {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--av-border);
}

.btn-discuss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  color: var(--av-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-discuss:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--av-primary);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .article-wrap {
    padding: 60px 0 80px;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content .lead {
    font-size: 1.1rem;
  }

  .key-takeaways,
  .fact-box,
  .opinion-block {
    padding: 20px;
  }
}
