/* === HERO BANNER (превью с наложенным текстом) === */
.article-hero {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.article-hero__image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.article-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  /* Тёмный градиент для читаемости белого текста */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: white !important;
  z-index: 2;
}

.article-hero__category {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.9);
  color: #1a3a5e;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.article-hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.article-hero__date {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-top: 0.5rem;
  display: block;
}


.article-hero__date {
  font-size: 1.1rem;
  opacity: 0.9;
}
.article-detail {
  /* max-width: 50%;  УБРАНО, чтобы не ограничивать контейнер #print-area */
  margin: 0 auto;
  padding: 0rem;
  line-height: 1.7;
  font-size: 1.06rem;
  color: #2d3748;
}

.article-detail h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: #1a202c;
}

.category-badge {
  display: inline-block;
  background-color: #e6f0ff;
  color: #3182ce;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.publish-date {
  display: block;
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.article-section {
  margin-bottom: 0rem !important;
  padding: 0rem !important;
}

.article-section .content {
  margin-bottom: 0rem !important;
}

.article-section .content p {
  margin-bottom: 0rem !important;
}

.article-section .content p:last-child {
  margin-bottom: 0rem !important;
}

.image-wrapper {
  text-align: center;
  margin: 0.5rem 0;
}

.image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper img:hover {
  
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.image-caption {
  font-size: 0.9rem;
  color: #718096;
  text-align: center;
  max-width: 100%;
}

.empty-content {
  text-align: center;
  color: #a0aec0;
  font-style: italic;
  padding: 2rem 0;
}

.article-copyright {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #718096;
}

.article-copyright a {
  color: #3182ce;
  text-decoration: none;
}

.article-copyright a:hover {
  text-decoration: underline;
}

/* Lightbox */
#lightbox {
  display: none !important; /* !important - как временное решение, чтобы переопределить всё */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  padding: 20px;
}

#lightbox.active {
  display: flex !important; /* !important - чтобы переопределить предыдущее */
  /* Остальные стили для active состояния */
}

#lightbox img {
  max-width: 98vw; /* Используем vw/vh напрямую */
  max-height: 90vh; /* Попробуем чуть больше */
  width: auto; /* Убедимся, что ширина не фиксирована */
  height: auto; /* Убедимся, что высота не фиксирована */
}

#lightbox .lightbox-caption {
  color: #fff;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

#lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000; /* Выше, чем у основного фона */
}
.related-list {
    display: flex;
    flex-direction: column;
}

.related-list .mb-4 {
    display: flex;
    flex-direction: column;
}

.related-list .ratio {
    width: 100%;
    max-height: 200px;
}

.related-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.related-list .h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.related-list .text-muted {
    font-size: 0.875rem;
}

/* Mobile-specific styles */
@media (max-width: 576px) {
    .related-list {
        flex-direction: column; /* Ensure vertical stacking */
    }

    .related-list .mb-4 {
        max-width: 100%;
        margin-bottom: 1rem; /* Reduced spacing between cards */
    }

    .related-list .ratio {
        max-height: 120px; /* Smaller image height for mobile */
    }

    .related-list img {
        border-radius: 4px;
    }

    .related-list .h6 {
        font-size: 0.875rem; /* Smaller title font size */
    }

    .related-list .text-muted {
        font-size: 0.75rem; /* Smaller date font size */
    }

    .col-lg-3 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .sticky-top {
        position: static !important; /* Disable sticky positioning on mobile */
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
/* === КНОПКИ ПОДЕЛИТЬСЯ === */
/* (Остальные стили остаются без изменений) */

/* === РЕКОМЕНДОВАННЫЕ СТАТЬИ === */
/* (Остальные стили остаются без изменений) */

/* === ПЕЧАТЬ — ТОЛЬКО СТАТЬЯ === */
@media print {
  body * {
    visibility: hidden;
  }
  #print-area,
  #print-area * {
    visibility: visible;
  }
  #print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .article-detail {
    padding: 0;
    /* max-width: none; */
    font-size: 12pt;
  }
  .article-detail h1 {
    font-size: 18pt;
    margin-top: 0;
  }
  .article-section {
	margin-bottom: 0rem !important;
	padding: 0rem !important;
  }
	
  .article-section .content {
	margin-bottom: 0rem !important;
  }
	
  .article-section .content p {
	margin-bottom: 0rem !important;
  }
  
  .article-section .content p:last-child {
	margin-bottom: 0rem !important;
  }
  .image-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    border: 1px solid #000;
  }
  .article-copyright a {
    color: black !important;
    text-decoration: none;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .article-hero__image {
    height: 300px;
  }
  .article-hero__title {
    font-size: 1.8rem;
  }
  .article-hero__date {
    font-size: 1rem;
  }
  .article-hero__overlay {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .article-hero__image {
    height: 240px;
  }
  .article-hero__title {
    font-size: 1.5rem;
  }
  .article-hero__category {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
  }
  .article-hero__overlay {
    padding: 1.2rem;
  }
}

  /* .print-actions .btn { ... } */


@media print {
  .print-actions,
  .lightbox, /* Убедитесь, что lightbox скрыт при печати */
  .article-copyright a {
    display: none !important;
  }

  .article-detail {
    padding: 0;
    /* max-width: none; */
  }

  .article-detail h1,
  .publish-date,
  .category-badge,
  .image-caption {
    color: black !important;
  }

  .image-wrapper img {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
}