/**
 * Article Page Styles
 */

/* CSS Variables for organization theming */
:root {
  --org-color: #1e40af; /* Default color, overridden by JS */
}

/* Breadcrumb Navigation */
.breadcrumb {
  background-color: #f8f9fa;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: #374151;
  font-weight: 500;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: #9ca3af;
}

/* Article Page Layout */
.article-page {
  min-height: calc(100vh - 80px);
  padding: 0 0 4rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 350px;
  }
}

/* Article Content */
.article-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.article-header {
  padding: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.article-org-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--org-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.article-date {
  color: #6b7280;
  font-size: 0.875rem;
}

.article-title {
  font-size: 2.5rem;
  line-height: 1.2;
  color: #111827;
  margin: 0.5rem 0 1rem;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }
}

.article-meta-bottom {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.article-author {
  font-weight: 500;
}

.article-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.article-reading-time::before {
  content: "⏱";
  font-size: 1rem;
}

/* Featured Image */
.article-featured-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article Body */
.article-body {
  padding: 2rem;
  color: #374151;
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-size: 1.75rem;
  color: #111827;
  margin: 2rem 0 1rem;
}

.article-body h3 {
  font-size: 1.375rem;
  color: #111827;
  margin: 1.5rem 0 0.75rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--org-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #4b5563;
}

/* Article Footer */
.article-footer {
  padding: 2rem;
  border-top: 1px solid #e5e7eb;
}

.article-share {
  margin-bottom: 2rem;
}

.article-share h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #374151;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.article-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-to-news {
  color: var(--org-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.back-to-news:hover {
  opacity: 0.8;
}

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Organization Info Card */
.org-info-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
}

.org-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
}

.org-info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.org-info-card p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.org-website-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--org-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.org-website-link:hover {
  opacity: 0.9;
}

/* Related Articles */
.related-articles {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.related-articles h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #111827;
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.related-article-card {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

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

.related-article-date {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.related-article-card h4 {
  margin: 0.5rem 0;
  font-size: 1.125rem;
}

.related-article-card h4 a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s;
}

.related-article-card h4 a:hover {
  color: var(--org-color);
}

.related-article-card p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.no-related {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}

/* 404 Error Styles */
#article-404 {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
  padding: 3rem;
}

.error-content h1 {
  font-size: 3rem;
  color: #111827;
  margin-bottom: 1rem;
}

.error-content p {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Print Styles */
@media print {
  .navbar,
  .breadcrumb,
  .article-sidebar,
  .article-share,
  .newsletter-section,
  .footer,
  #cookieBanner {
    display: none !important;
  }
  
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .article-content {
    box-shadow: none;
  }
  
  .article-body {
    padding: 0;
  }
  
  .back-to-news {
    display: none;
  }
}

/* Loading State */
.article-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.article-loading::after {
  content: "...";
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
}