/* Article Page Styles */
/* DEBUG: Этот файл загружен */

.single-article-page {
  background-color: #ffffff !important;
  padding: 1.25rem 0 4rem !important;
  direction: rtl !important;
}

.single-article-page .article-wrapper {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Кнопка "Назад" */
.single-article-page .article-back-link {
  margin-bottom: 2rem;
  text-align: right;
}

.single-article-page .article-back-link a {
  color: #25a225;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.single-article-page .article-back-link a:hover {
  color: #1a7a1a;
}

/* Заголовок статьи */
.single-article-page .article-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0d0d0d;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-align: right;
}

/* Метаданные */
.single-article-page .article-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: #666666;
  gap: 0.5rem;
}

.single-article-page .article-date {
  color: #666666;
}

.single-article-page .article-separator {
  color: #666666;
}

.single-article-page .article-author {
  color: #666666;
  font-weight: 500;
}

/* Изображение статьи */
.single-article-page .article-image {
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 1000px;
  height: 400px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.single-article-page .article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Краткое описание */
.single-article-page .article-intro {
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #333333;
  font-size: 1.125rem;
}

/* Скрываем hr в intro */
.single-article-page .article-intro hr {
  display: none !important;
}

/* Стили для заголовков в intro */
.single-article-page .article-intro h1,
.single-article-page .article-intro h2,
.single-article-page .article-intro h3 {
  color: #25a225 !important;
  font-family: Heebo, Rubik, "Assistant Bold", Assistant, Arial, sans-serif !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  font-weight: 600 !important;
}

.single-article-page .article-intro h1 {
  font-size: 2rem !important;
}

.single-article-page .article-intro h2 {
  font-size: 1.875rem !important;
}

.single-article-page .article-intro h3 {
  font-size: 1.5rem !important;
}

/* Стили для параграфов в intro */
.single-article-page .article-intro p {
  font-size: 20px !important;
  margin: 10px 0 !important;
  line-height: 1.6 !important;
}

/* Стили для списков в intro */
.single-article-page .article-intro ul,
.single-article-page .article-intro ol {
  font-size: 20px !important;
  list-style-position: outside !important;
  margin: 15px 0 !important;
  padding-right: 1.5em !important;
  list-style-type: disc !important;
}

.single-article-page .article-intro li {
  margin-bottom: 0.5em !important;
  padding-inline-start: 0.5em !important;
}

/* Стили для ссылок в intro */
.single-article-page .article-intro a {
  color: #25a225 !important;
  text-decoration: none !important;
}

.single-article-page .article-intro a:hover {
  text-decoration: underline !important;
}

/* Стили для strong в intro */
.single-article-page .article-intro strong {
  font-family: Heebo, Rubik, "Assistant SemiBold", Assistant, Arial, sans-serif !important;
  color: #232b38 !important;
}

.single-article-page .article-intro a strong {
  color: #25a225 !important;
}

/* Основной контент */
.single-article-page .article-content hr {
  display: none !important;
}

.single-article-page .article-content h1,
.single-article-page .article-content h2,
.single-article-page .article-content h3 {
  color: #25a225 !important;
  font-family: Heebo, Rubik, "Assistant Bold", Assistant, Arial, sans-serif !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  font-weight: 600 !important;
}

.single-article-page .article-content h1 {
  font-size: 2rem !important;
}

.single-article-page .article-content h2 {
  font-size: 1.875rem !important;
}

.single-article-page .article-content h3 {
  font-size: 1.5rem !important;
}

.single-article-page .article-content p {
  font-size: 20px !important;
  margin: 10px 0 !important;
  line-height: 1.6 !important;
}

.single-article-page .article-content ul,
.single-article-page .article-content ol {
  font-size: 20px !important;
  list-style-position: outside !important;
  margin: 15px 0 !important;
  padding-right: 1.5em !important;
  list-style-type: disc !important;
}

.single-article-page .article-content a {
  color: #25a225 !important;
  text-decoration: none !important;
}

.single-article-page .article-content a:hover {
  text-decoration: underline !important;
}

.single-article-page .article-content strong {
  font-family: Heebo, Rubik, "Assistant SemiBold", Assistant, Arial, sans-serif !important;
  color: #232b38 !important;
}

.single-article-page .article-content a strong {
  color: #25a225 !important;
}

.single-article-page .article-content li {
  margin-bottom: 0.5em !important;
  padding-inline-start: 0.5em !important;
}

.single-article-page .article-content {
  line-height: 1.6;
  color: #333333;
  font-size: 1.125rem;
}

/* Таблицы — Leadya, акцент #25a225 */
.single-article-page .article-content figure.table,
.single-article-page .article-intro figure.table,
.single-article-page .article-wrapper figure.table {
  margin: 1.5rem 0;
  max-width: 100%;
}

.single-article-page .article-content table,
.single-article-page .article-intro table,
.single-article-page .article-wrapper table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
  color: #374151 !important;
  background-color: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  overflow: hidden;
}

.single-article-page .article-content figure.table table,
.single-article-page .article-intro figure.table table,
.single-article-page .article-wrapper figure.table table {
  margin: 0 !important;
}

.single-article-page .article-content table caption,
.single-article-page .article-intro table caption,
.single-article-page .article-wrapper table caption {
  caption-side: bottom;
  padding: 0.75rem 1rem 0;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: right;
  font-style: italic;
}

.single-article-page .article-content table thead th,
.single-article-page .article-intro table thead th,
.single-article-page .article-wrapper table thead th,
.single-article-page .article-content table:not(:has(thead)) > tbody > tr:first-child > th,
.single-article-page .article-content table:not(:has(thead)) > tbody > tr:first-child > td,
.single-article-page .article-intro table:not(:has(thead)) > tbody > tr:first-child > th,
.single-article-page .article-intro table:not(:has(thead)) > tbody > tr:first-child > td,
.single-article-page .article-wrapper table:not(:has(thead)) > tbody > tr:first-child > th,
.single-article-page .article-wrapper table:not(:has(thead)) > tbody > tr:first-child > td {
  background-color: rgba(37, 162, 37, 0.07) !important;
  color: #232b38 !important;
  font-weight: 600 !important;
  text-align: right !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid #e8eaed !important;
  border-bottom: 2px solid rgba(37, 162, 37, 0.25) !important;
  white-space: nowrap;
}

.single-article-page .article-content table th,
.single-article-page .article-content table td,
.single-article-page .article-intro table th,
.single-article-page .article-intro table td,
.single-article-page .article-wrapper table th,
.single-article-page .article-wrapper table td {
  padding: 0.65rem 1rem !important;
  border: 1px solid #e8eaed !important;
  vertical-align: top !important;
  text-align: right !important;
}

.single-article-page .article-content table tbody th,
.single-article-page .article-intro table tbody th,
.single-article-page .article-wrapper table tbody th {
  background-color: #fafafa !important;
  color: #232b38 !important;
  font-weight: 600 !important;
}

.single-article-page .article-content table tbody tr:nth-child(even) td,
.single-article-page .article-intro table tbody tr:nth-child(even) td,
.single-article-page .article-wrapper table tbody tr:nth-child(even) td {
  background-color: #fafafa !important;
}

.single-article-page .article-content table tbody tr:hover td,
.single-article-page .article-intro table tbody tr:hover td,
.single-article-page .article-wrapper table tbody tr:hover td {
  background-color: rgba(37, 162, 37, 0.04) !important;
}

.single-article-page .article-content table a,
.single-article-page .article-intro table a,
.single-article-page .article-wrapper table a {
  color: #25a225 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.single-article-page .article-content table a:hover,
.single-article-page .article-intro table a:hover,
.single-article-page .article-wrapper table a:hover {
  color: #1a7a1a !important;
}

.single-article-page .article-content table tbody td strong,
.single-article-page .article-intro table tbody td strong,
.single-article-page .article-wrapper table tbody td strong {
  color: #232b38 !important;
  font-weight: 600 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .single-article-page {
    padding: 2rem 0;
  }

  .single-article-page .article-wrapper {
    padding: 0;
    max-width: none;
  }

  .single-article-page .article-title {
    font-size: clamp(1.55rem, 6.5vw, 2rem) !important;
  }

  .single-article-page .article-content figure.table,
  .single-article-page .article-intro figure.table,
  .single-article-page .article-wrapper figure.table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .single-article-page .article-content table,
  .single-article-page .article-intro table,
  .single-article-page .article-wrapper table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
  }

  .single-article-page .article-content table thead,
  .single-article-page .article-content table tbody,
  .single-article-page .article-content table tfoot,
  .single-article-page .article-intro table thead,
  .single-article-page .article-intro table tbody,
  .single-article-page .article-intro table tfoot,
  .single-article-page .article-wrapper table thead,
  .single-article-page .article-wrapper table tbody,
  .single-article-page .article-wrapper table tfoot {
    display: table;
    width: 100%;
    min-width: 520px;
  }

  .single-article-page .article-content table tr,
  .single-article-page .article-intro table tr,
  .single-article-page .article-wrapper table tr {
    display: table-row;
  }

  .single-article-page .article-content table th,
  .single-article-page .article-content table td,
  .single-article-page .article-intro table th,
  .single-article-page .article-intro table td,
  .single-article-page .article-wrapper table th,
  .single-article-page .article-wrapper table td {
    display: table-cell;
  }
}
