.page-header-and-image {
  display: flex;
}

/**
 * Файл: media/templates/site/cassiopeia/css/neygen/article.css
 * Блок: сворачивание описания категории.
 * Назначение: показывает первые 3 строки описания и кнопку раскрытия.
 */

.category-desc {
  position: relative;
  /* max-width: 980px; */
  margin: 0 0 26px;
  color: #5f6f86;
  font-size: 16px;
  line-height: 1.65;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-desc__content {
  position: relative;
}

.category-desc.is-collapsed .category-desc__content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-desc.is-collapsed .category-desc__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      #ffffff 86%);
}

.category-desc.is-expanded .category-desc__content {
  display: block;
  overflow: visible;
}

.category-desc__toggle {
  padding: 3px 0 3px 10px;
  border: 5px;
  color: #5f6f86;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  position: absolute;
  right: 0;
  bottom: -2px;
  background: white;
}

.category-desc__toggle:hover {
  color: #2e5db5;
}

.category-desc__toggle:focus-visible {
  outline: 3px solid rgba(63, 110, 203, 0.22);
  outline-offset: 4px;
  border-radius: 8px;
}

.category-desc p {
  margin-top: 10px;
  margin-bottom: 0px;
  /* max-width: 980px; */
  line-height: 1.65;
}

.category-desc-image {}

.category-desc-image img {
  max-height: 180px;
  max-width: 270px;
}

.article-toc {
  margin: 0 0 34px !important;
  padding: 30px !important;
  background: linear-gradient(180deg, #f8faff 0%, #f2f6ff 100%) !important;
  border: 1px solid #dfe8ff !important;
  border-radius: 24px !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06) !important;
}

.article-toc li:before {
  width: 0 !important;
  height: 0 !important;
}

.article-toc h2 {
  margin: 0 0 22px !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #1f2d3d !important;
}

.article-toc ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.article-toc>ul {
  display: grid !important;
  gap: 14px !important;
  margin: 0 !important;
}

.article-toc>ul>li {
  padding: 16px 18px !important;
  background: #ffffff !important;
  border: 1px solid #e4ebff !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

.article-toc>ul>li>a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #17233c;
}

.article-toc>ul>li>a::before {
  content: "";
  flex: 0 0 4px !important;
  width: 4px;
  height: 26px !important;
  border-radius: 999px;
  background: #3f6ecb;
}

.article-toc>ul>li>ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px !important;
}

.article-toc>ul>li>ul>li>a {
  display: flex;
  align-items: center;
  min-height: 44px !important;
  padding: 10px 12px 8px !important;
  background: #f9fbff;
  box-shadow: none;
  border: 1px solid #edf2ff;
  border-radius: 12px !important;
  color: #344054;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

.article-toc a {
  text-decoration: none;
  transition: 0.2s ease;
}

.article-toc a:hover {
  color: #3f6ecb;
  transform: translateY(-1px);
}

.article-toc>ul>li>ul>li>a:hover {
  background: #eef4ff;
  border-color: #d8e5ff;
}

.article-keypoints {
  margin: 26px 0;
  padding: 22px 24px;
  background: #f8faff;
  border: 1px solid #e4ebff;
  border-radius: 16px;
}

.article-keypoints h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #1f2d3d;
}

.article-keypoints p,
.service-section .article-keypoints p {
  margin: 0 0 14px;
  font-size: 20px;
  color: #1f2d3d;
}

.article-keypoints ul {
  margin: 0 !important;
}

.article-keypoints li:last-child {
  margin-bottom: 0 !important;
}

.category-desc-bottom {
  background: #fff;
  margin: 40px 0 20px 0;
  padding: 34px;
  width: calc(100% - 275px);
  border-radius: 22px;
}

.category-desc-bottom img {
  border-radius: 22px;
  ;
}

.category-desc-bottom h2,
.service-section h2 {
  margin: 0 0 14px;
  padding: 0;
  color: #263243 !important;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.category-desc-bottom h3,
.service-section h3 {
  color: #263243 !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.category-desc-bottom a {
  color: #3f6dcb;
}

.category-desc-bottom p,
.service-section p {
  margin: 0 0 14px;
  color: #3f4858;
  font-size: 16px;
  line-height: 1.75;
}

.category-desc-bottom p:last-child,
.service-section p:last-child {
  margin-bottom: 0;
}

.category-desc-bottom ul,
.service-section ul {
  padding: 0;
  list-style-type: none;
  margin: 0 0 20px;
}

.category-desc-bottom ul li,
.service-section ul li {
  position: relative;
  padding-left: 35px;
  margin-bottom: 10px;
  line-height: 1.65;
}

.category-desc-bottom ul li:before,
.service-section ul li:before {
  position: absolute;
  left: 13px;
  top: 9px;
  color: #3f6dcb;
  background-color: #3f6dcb;
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 55%;
}

.ai-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-desc-bottom table,
.ai-table {
  width: 100%;
  max-width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.6;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.category-desc-bottom table th,
.ai-table th {
  background: #3f6dcb;
  color: #fff;
  text-align: left;
  padding: 16px;
  font-weight: 700;
}

.category-desc-bottom table td,
.ai-table td {
  padding: 16px;
  border-bottom: 1px solid #e9edf5;
  background: #fff;
}

.category-desc-bottom table tr:last-child td,
.ai-table:last-child td {
  border-bottom: none;
}

.category-desc-bottom table tr:hover td,
.ai-table tr:hover td {
  background: #f7f9ff;
  transition: 0.2s ease;
}

.author-comment {
  margin: 28px 0;
  padding: 20px 24px;
  background: #f7f9ff;
  border-left: 5px solid #3f6dcb;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.7;
  color: #263238;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.author-comment strong {
  display: inline-block;
  margin-bottom: 8px;
  color: #3f6dcb;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.faq-block {
  margin: 35px 0;
}

.faq-item {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  transition: 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.faq-item summary {
  position: relative;
  padding: 20px 58px 20px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #1f2d3d;
  transition: 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 300;
  color: #6183f1;
  transition: 0.25s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item[open] summary {
  background: #f7f9ff;
}

.faq-item[open] .faq-answer {
  opacity: 1;
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

.faq-answer-inner {
  padding: 22px;
}

.faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: #4a5568;
}

.article-disclaimer {
  margin: 32px 0;
  padding: 18px 22px;
  background: #f8faff;
  border: 1px solid #e1e8ff;
  border-left: 5px solid #3f6dcb;
  border-radius: 14px;
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
}

.article-disclaimer p {
  margin: 0;
}

@media (width <=970px) {
  .category-desc-bottom {
    width: 100%;
  }

  .category-desc-image {
    display: none;
  }
}

@media (max-width: 768px) {
  .category-desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .article-toc {
    padding: 22px;
    border-radius: 20px;
  }

  .article-toc>ul>li {
    padding: 16px;
  }

  .article-toc>ul>li>ul {
    display: none;
  }

  .article-toc>ul>li>a {
    font-size: 17px;
  }
}

@media (width <=720px) {
  .category-desc-bottom {
    padding: 15px;
  }

  .article-toc {
    padding: 10px !important;
  }
}

@media (max-width: 480px) {

  .category-desc-bottom table,
  .ai-table {
    font-size: 14px;
    line-height: 1.45;
  }
}