/* Внутренние страницы проектов /proekty/<проект>/ — единая подача. Только CSS. Класс на body: rubik-project-single */

/* ---------- фото ---------- */
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child .vc_single_image-wrapper {
  display: block;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child .vc_single_image-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
/* пустая правая колонка — фото на всю ширину */
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child:not(:has(.vc_media_grid .vc_grid-item, .vc_media_grid img)) .vc_col-sm-8 { width: 100%; }
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child:not(:has(.vc_media_grid .vc_grid-item, .vc_media_grid img)) .vc_col-sm-4 { display: none; }

/* галерея: главное фото на всю ширину, миниатюры рядом под ним (любая раскладка колонок: 2/3+1/3, 1/2+1/2) */
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child:has(.vc_media_grid) .vc_column_container { width: 100%; }
.rubik-project-single #content > .wpb-content-wrapper > .vc_row:first-child:has(.vc_media_grid) .vc_column_container + .vc_column_container { margin-top: 12px; }
.rubik-project-single .vc_media_grid .vc_pageable-slide-wrapper { display: flex; flex-wrap: wrap; }
.rubik-project-single .vc_media_grid .vc_grid-item { float: none; width: 20%; flex: 0 0 20%; }

/* ---------- шапка проекта ---------- */
.rubik-project-single .project > .vc_column_container > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child h2 {
  display: none;           /* дублирует H1 страницы */
}
.rubik-project-single .project hr { display: none; }

/* 3 пункта под заголовком — метки */
.rubik-project-single .project > .vc_column_container > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child ul {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 8px 0 22px; padding: 0; list-style: none;
}
.rubik-project-single .project > .vc_column_container > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child li {
  margin: 0; padding: 7px 16px;
  font-size: 14px; line-height: 1.3; font-weight: 600; color: #262b2e;
  background: #fff; border: 1px solid #dcdcdc; border-radius: 999px;
}
.rubik-project-single .project > .vc_column_container > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child li:first-child {
  color: #fff; background: #ea561b; border-color: #ea561b;
}

/* ---------- текст ---------- */
.rubik-project-single .project .wpb_text_column { font-size: 16px; line-height: 1.7; color: #262b2e; }

/* вводный абзац */
.rubik-project-single .project .wpb_text_column p:first-child > strong:only-child {
  display: block;
  padding: 4px 0 4px 18px;
  border-left: 4px solid #ea561b;
  font-size: 19px; line-height: 1.5; font-weight: 600; color: #262b2e;
}

.rubik-project-single .project h2 {
  margin: 38px 0 14px;
  font-size: 26px; line-height: 1.25; font-weight: 700; color: #262b2e;
}
.rubik-project-single .project h2::after {
  content: ""; display: block; width: 48px; height: 3px; margin-top: 10px; background: #ea561b;
}
.rubik-project-single .project h3 {
  margin: 26px 0 10px;
  font-size: 19px; line-height: 1.3; font-weight: 700; color: #262b2e;
}
.rubik-project-single .project p { margin: 0 0 14px; }

/* списки: оранжевые маркеры */
.rubik-project-single .project .wpb_text_column ul:not(:first-child),
.rubik-project-single .project .wpb_text_column p ~ ul { margin: 0 0 18px 0; padding: 0; list-style: none; }
.rubik-project-single .project .wpb_text_column p ~ ul > li {
  position: relative; margin: 0 0 10px; padding-left: 26px; font-size: 16px; line-height: 1.6;
}
.rubik-project-single .project .wpb_text_column p ~ ul > li::before {
  content: ""; position: absolute; left: 4px; top: .6em;
  width: 8px; height: 8px; border-radius: 50%; background: #ea561b;
}
.rubik-project-single .project .wpb_text_column li::marker { content: ""; }

/* таблица «Результаты» */
.rubik-project-single .project table {
  width: 100%; margin: 0 0 20px; border-collapse: separate; border-spacing: 0;
  border: 1px solid #e4e4e4; border-radius: 10px; overflow: hidden; background: #fff;
}
.rubik-project-single .project table th {
  padding: 12px 18px; text-align: left; font-size: 12px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: #8a8f93; background: #f5f5f5;
  border: 0; border-bottom: 1px solid #e4e4e4;
}
.rubik-project-single .project table td {
  padding: 14px 18px; font-size: 15px; border: 0; border-bottom: 1px solid #efefef; vertical-align: middle;
}
.rubik-project-single .project table tr:last-child td { border-bottom: 0; }
.rubik-project-single .project table td:first-child { width: 42%; color: #6b7073; }
.rubik-project-single .project table td strong { font-size: 22px; line-height: 1.2; color: #ea561b; }

/* ---------- блок «Планируете аналогичный проект?» ---------- */
.rubik-project-single .vc_row.proekt {
  padding: 28px 30px;
  background: #fff; border: 1px solid #e4e4e4; border-left: 5px solid #ea561b; border-radius: 10px;
}
.rubik-project-single .vc_row.proekt .wpb_text_column h2 { margin-top: 0; }

@media (max-width: 767px) {
  /* миниатюры галереи — по три в ряд, а не по одной на всю ширину */
  .rubik-project-single .vc_media_grid .vc_grid-item { width: 33.3333%; flex: 0 0 33.3333%; }
  .rubik-project-single .project h2 { font-size: 22px; margin-top: 30px; }
  .rubik-project-single .project .wpb_text_column p:first-child > strong:only-child { font-size: 17px; }
  .rubik-project-single .project table td, .rubik-project-single .project table th { padding: 10px 12px; }
  .rubik-project-single .project table td strong { font-size: 18px; }
  .rubik-project-single .vc_row.proekt { padding: 20px 18px; }
}
