/**
 * Luciano-only content styles (news / articles .text-page).
 * Loaded only when is_luciano — do not affect srazuvvazu or other brands.
 *
 * Global CSS reset zeroes table borders/padding; restore a clear table
 * so CKEditor tables look like in the admin editor.
 */

.article-inner__content .text-page table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0 24px;
  font-size: 14px;
  line-height: 1.45;
  color: #2d2d2d;
  background: #fff;
  border: 1px solid #cfdcab;
  border-radius: 2px;
  overflow: hidden;
}

.article-inner__content .text-page table caption {
  caption-side: top;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #6b6363;
}

.article-inner__content .text-page table th,
.article-inner__content .text-page table td {
  padding: 12px 16px;
  border: 1px solid rgba(207, 220, 171, 0.65);
  vertical-align: top;
  text-align: left;
  background: #fff;
}

.article-inner__content .text-page table th {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #cfdcab;
  color: #2d2d2d;
  border-color: #cfdcab;
}

.article-inner__content .text-page table thead th {
  border-bottom: 1px solid #b8c992;
}

.article-inner__content .text-page table tbody tr:nth-child(even) td {
  background: #f6f8ef;
}

.article-inner__content .text-page table tbody tr:hover td {
  background: #eef3e0;
}

.article-inner__content .text-page table a {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #cfdcab;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.article-inner__content .text-page table a:hover {
  background-color: rgba(207, 220, 171, 0.45);
  border-radius: 2px;
}

/* Mobile: таблица вписывается в экран, без горизонтальной прокрутки */
@media (max-width: 767px) {
  .article-inner__content .text-page table {
    display: table;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    table-layout: fixed;
  }

  .article-inner__content .text-page table th,
  .article-inner__content .text-page table td {
    min-width: 0;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }
}

/*
 * Luciano article links + «Читайте также» + CTA-блоки
 * (палитра сайта: чёрный / крем #FBE3E1 — как кнопки 8march)
 */
.article-inner__content .text-page a {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #1a1a1a;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, background-color 0.15s ease;
}

.article-inner__content .text-page a:hover,
.article-inner__content .text-page a:focus {
  color: #1a1a1a;
  text-decoration-color: #c9a9a6;
  background-color: rgba(251, 227, 225, 0.55);
  border-radius: 2px;
  outline: none;
}

.article-inner__content .sv-order-mood {
  margin: 1rem 0 1.5rem;
  padding: 1.15rem 1.35rem 1.2rem;
  border-radius: 2px;
  border: 1px solid #b8c992;
  background: #cfdcab;
  color: #2d2d2d;
  font-size: 0.98em;
  line-height: 1.6;
}

/* Фото в статье про зодиак */
.article-inner__content .sv-zodiac-photo {
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  max-width: 420px;
}

.article-inner__content .sv-zodiac-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid #cfdcab;
  background: #f6f8ef;
}

.article-inner__content .sv-zodiac-photo figcaption {
  margin-top: 0.55rem;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #6b6363;
}

.article-inner__content .sv-order-mood strong {
  color: #1a1a1a;
  font-weight: 700;
}

.article-inner__content .sv-order-mood a {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #2d2d2d;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.article-inner__content .sv-order-mood a:hover,
.article-inner__content .sv-order-mood a:focus {
  color: #1a1a1a;
  text-decoration-color: #1a1a1a;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  outline: none;
}

/* Подпись в конце статьи — дата, автор, SEO */
.article-inner__content .text-page .news-article-byline {
  margin: 1.75rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8e8e8;
}

.article-inner__content .text-page .news-article-byline small {
  display: block;
  font-size: 11px;
  line-height: 1.55;
  color: #8a8a8a;
}

.article-inner__content .text-page .news-article-byline a {
  font-weight: 600;
}

/* Сайдбар related news */
.article-inner__content {
  width: calc(100% - 320px);
  padding: 40px 48px 40px 56px;
}

.article-inner__side {
  width: min(300px, 32%);
  flex-shrink: 0;
}

.article-inner__side .side-menu {
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  box-shadow: none;
  overflow: hidden;
  background: #fff;
}

.sv-related-news__title {
  margin: 0;
  padding: 0.85rem 1rem;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fbe3e1;
  background: #1a1a1a;
}

.sv-related-news__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.sv-related-news__item {
  margin: 0;
  border-bottom: 1px solid #eee;
}

.sv-related-news__item:last-child {
  border-bottom: 0;
}

.article-inner__side .side-menu .sv-related-news__link,
.sv-related-news__link {
  display: flex !important;
  align-items: flex-start;
  gap: 0.65rem;
  height: auto !important;
  min-height: 0;
  margin: 0;
  padding: 0.85rem 1rem !important;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1a1a !important;
  text-decoration: none !important;
  background: transparent;
  white-space: normal;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.article-inner__side .side-menu .sv-related-news__link:before,
.sv-related-news__link:before {
  display: none !important;
  content: none !important;
}

.sv-related-news__text {
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.sv-related-news__arrow {
  flex: 0 0 auto;
  margin-top: 0.1em;
  color: #c9a9a6;
  font-weight: 700;
  line-height: 1;
}

.sv-related-news__link:hover,
.sv-related-news__link:focus {
  color: #1a1a1a !important;
  background: #fbe3e1 !important;
  outline: none;
}

.sv-related-news__link:hover .sv-related-news__arrow,
.sv-related-news__link:focus .sv-related-news__arrow {
  color: #1a1a1a;
}

/* Новости: тело статьи крупнее на десктопе (main.css: .text-page p = 14px / 18px) */
@media (min-width: 768px) {
  .article-inner__content .text-page {
    font-size: 18px;
    line-height: 1.55;
  }

  .article-inner__content .text-page p:not(.sv-order-mood),
  .article-inner__content .text-page li {
    font-size: 18px !important;
    line-height: 1.55 !important;
  }

  /* Зелёные блоки «Коротко» / CTA */
  .article-inner__content .text-page .sv-order-mood,
  .article-inner__content .text-page .sv-order-mood p,
  .article-inner__content .text-page .sv-order-mood li,
  .article-inner__content .text-page p.sv-order-mood {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
}

/* Статьи: H2 на десктопе как у SV (~30px), не глобальные 50px с главной */
.article-inner__content .text-page h2 {
  font-size: 30px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 1.5rem 0 0.85rem !important;
}

@media (max-width: 991px) {
  .article-inner__side {
    width: 240px;
  }

  .article-inner__content {
    width: calc(100% - 260px);
    padding: 30px 20px;
  }
}

@media (max-width: 767px) {
  .article-inner__content {
    width: 100%;
    padding: 0 15px;
  }

  /* Новости: заголовки в тексте статьи — компактнее (custom CSS даёт h1 30px / h2 36px) */
  .article-inner__content .text-page h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: auto !important;
    margin: 0.35rem 0 1rem !important;
  }

  .article-inner__content .text-page h2 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 1.35rem 0 0.65rem !important;
  }

  .article-inner__content .text-page h3 {
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 1.1rem 0 0.5rem !important;
  }
}

/* ========== Luciano каталог: SEO-текст (/catalog/, категории) — как на проде ========== */
body.design-8march.inner-page section.section:has(.catalog-menu.catalog-categories-block),
body.design-8march.inner-page section.section:has(.category-root-page .catalog-menu) {
  padding-bottom: 8px;
}

body.design-8march.inner-page .lu-catalog-seo-section {
  padding-top: 0;
  padding-bottom: 2rem;
}

body.design-8march.inner-page .lu-catalog-seo-text {
  font-family: Cormorant, Georgia, serif !important;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: #2d2d2d;
  padding-top: 12px !important; /* custom_styles даёт .section .text-page { padding-top: 60px } */
}

body.design-8march.inner-page .lu-catalog-seo-text p {
  font-family: Cormorant, Georgia, serif !important;
  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.45;
  color: #2d2d2d;
  margin-bottom: 1em;
}

body.design-8march.inner-page .lu-catalog-seo-text p:first-of-type {
  font-family: Cormorant, Georgia, serif !important;
  font-size: 22.95px !important;
  font-weight: 600 !important;
  line-height: 1.25;
  color: #2d2d2d;
}

/*
 * Список новостей: «Подробнее» как чёрная кнопка героя (.black-button).
 * Шаблон общий с SV — только CSS Luciano. Не трогаем 8march_manipulators.css.
 */
body.design-8march .main-action a.btn-border.button-theme_secondary {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 2rem !important;
  border: none !important;
  border-radius: 0 !important;
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  color: #fbe3e1 !important;
  font-family: Inter, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.design-8march .main-action a.btn-border.button-theme_secondary:hover,
body.design-8march .main-action a.btn-border.button-theme_secondary:focus {
  background: #2d2d2d !important;
  background-color: #2d2d2d !important;
  color: #fbe3e1 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px #fbe3e1 !important;
  outline: none;
}

@media (max-width: 767px) {
  body.design-8march .main-action a.btn-border.button-theme_secondary {
    width: 100% !important;
  }
}

/*
 * Статья: одна кнопка «В каталог» после текста.
 * Класс без слова button — иначе 8march_design вешает розовую тень на [class*="button"].
 * Rollback: удалить этот блок и if is_luciano в news/item_details.html.
 */
.article-inner__content .text-page .lu-news-catalog-cta {
  margin: 1.5rem 0 0.25rem;
}

.article-inner__content .text-page a.lu-news-catalog-cta__btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: 100%;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 2rem !important;
  border: none !important;
  border-radius: 0 !important;
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  color: #fbe3e1 !important;
  font-family: Inter, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  text-underline-offset: unset !important;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.article-inner__content .text-page a.lu-news-catalog-cta__btn:hover,
.article-inner__content .text-page a.lu-news-catalog-cta__btn:focus {
  background: #2d2d2d !important;
  background-color: #2d2d2d !important;
  color: #fbe3e1 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px #fbe3e1 !important;
  outline: none;
}

@media (max-width: 767px) {
  .article-inner__content .text-page a.lu-news-catalog-cta__btn {
    width: 100% !important;
  }
}
