/* ==========================================================
   WIDOK ARTYKUŁU (ARTICLE VIEW)
   ========================================================== */
.article-view {
  animation: fadeIn 0.4s ease;
}

.article__nav {
  margin-bottom: 20px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 30px;
  align-items: start;
}

/* --- LEWA KOLUMNA (GŁÓWNA TREŚĆ) --- */
.article-main {
  padding: 40px !important; /* Szerszy margines wewnętrzny dla czytelności */
}

.article-header {
  margin-bottom: 30px;
  border-bottom: 1px dashed var(--overlay-10);
  padding-bottom: 25px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.article-date {
  color: var(--text-muted);
  font-size: 13px;
}

.article-title {
  font-size: 32px;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 20px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  color: var(--text-main);
  font-weight: bold;
  font-size: 14px;
}

.author-role {
  color: var(--neon-cyan);
  font-size: 12px;
}

/* TYPOGRAFIA ARTYKUŁU */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-soft);
}

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

.article-content h2 {
  color: var(--text-main);
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--overlay-10);
  padding-bottom: 8px;
}

.article-content h3 {
  color: var(--text-main);
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 12px;
}

.article-content strong {
  color: var(--text-main);
}

.article-content a {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--neon-cyan);
  transition: all 0.2s;
}

.article-content a:hover {
  color: #fff;
  border-bottom-style: solid;
}

.article-content blockquote {
  border-left: 4px solid var(--neon-cyan);
  background: var(--overlay-03);
  padding: 15px 20px;
  margin: 25px 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

.article-tags {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed var(--overlay-10);
}

/* --- PRAWY SIDEBAR (STICKY) --- */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 5px;
}

.article-sidebar::-webkit-scrollbar { width: 4px; }
.article-sidebar::-webkit-scrollbar-track { background: transparent; }
.article-sidebar::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 4px; }
.article-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.5); }
.article-sidebar::after { content: ''; display: block; min-height: 80px; flex-shrink: 0; width: 100%; }

.company-context-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.company-context-name {
  margin: 0;
  font-size: 16px;
  color: var(--text-main);
}

.company-context-ticker {
  font-size: 12px;
  color: var(--text-muted);
}

.company-context-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--overlay-03);
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--overlay-05);
}

.company-context-price .price-val {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-main);
}

/* POWIĄZANE ARTYKUŁY LISTA */
.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.related-article-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--overlay-10);
  transition: transform 0.2s ease;
}

.related-article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-article-item:hover {
  transform: translateX(5px);
}

.related-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.related-title {
  font-size: 14px;
  color: var(--text-main);
  margin: 0 0 6px 0;
  line-height: 1.4;
  transition: color 0.2s;
}

.related-article-item:hover .related-title {
  color: var(--neon-cyan);
}

.related-ticker {
  font-size: 10px;
  align-self: flex-start;
  background: rgba(0, 212, 255, 0.1);
  color: var(--neon-cyan);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- PLACEHOLDERY REKLAMOWE --- */
.ad-placeholder {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.ad-placeholder::before {
  content: 'AD';
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  font-size: 9px;
  border-bottom-left-radius: 8px;
}

.ad-top {
  width: 100%;
  height: 100px;
  margin-bottom: 30px;
}

.ad-bottom {
  width: 100%;
  height: 150px;
  margin-top: 30px;
}

.ad-sidebar {
  width: 100%;
  height: 400px;
}

/* RWD */
@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }
  .ad-sidebar {
    height: 200px; /* Na telefonie skyscraper zmienia się w prostokąt */
  }
}

@media (max-width: 768px) {
  .article-main {
    padding: 20px !important;
  }
  .article-title {
    font-size: 24px;
  }
  .article-content {
    font-size: 15px;
  }
}
