/* taxonomy-service_category.css */

/* Общий контейнер страницы категории */
.service-category-page {
    font-family: 'Open Sans', sans-serif;
    background-color: #F5F7FA;
    color: #333;
}


.hero-image {
  flex: 0 0 35%;
}

.hero-image img {
  width: 100%;
  max-width: 250px; 
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}


/* Адаптив */
@media (max-width: 1028px) {
  .hero-image {
    flex: 0 0 40%;
  }
}

@media (max-width: 768px) {
  .hero-image {
    max-width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 480px) {
  .seo-wrapper {
    margin-top: -40px;
  }
}

@media (max-width: 400px) {
  .hero-seo {
    font-size: 14px;
  }
  .hero-image img {
    max-width: 180px;
  }
}

@media (max-width: 375px) {
  .hero-image img {
    max-width: 160px;
  }
}



.subcategory-title {
  font-size: clamp(22px, 1.5rem + 0.5vw, 28px);
  margin: 0 7%;
  margin-bottom: 30px;
  color: #333;
  border-bottom: 1.5px solid #000;
  display: block;
  padding-bottom: 5px;
}

.subcategory-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px; 
}

.subcategory-card {
  flex: 0 0 calc(33.333% - 20px); 
  background-color: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.subcategory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.subcategory-card a {
  display: block;
  text-decoration: none;
  color: #333;
  padding: 20px;
}

.subcategory-card a h3 {
  font-size: clamp(18px, 1.2rem + 0.5vw, 22px);
  margin: 0 0 10px 0;
  position: relative;
  padding-bottom: 4px;
}

.subcategory-card a h3::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s;
  margin-top: 4px;
  width: 100%;
}

.subcategory-card img {
  width: 100%;
  height: auto;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
  margin-bottom: 15px;
}

.subcategory-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  max-height: none;      
  overflow: visible;   
  text-overflow: unset;  
  margin: 0;             
}

@media (max-width: 1028px) {
  .subcategory-cards { gap: 20px; justify-content: center; }
  .subcategory-card { flex: 0 0 calc(50% - 10px); margin-bottom: 20px; }
  .subcategory-card a h3 { font-size: 18px; }
  .subcategory-card p { font-size: 14px; }
}

@media (max-width: 900px) {
  .subcategory-cards { gap: 18px; }
  .subcategory-card { flex: 0 0 calc(50% - 9px); }
  .subcategory-card a h3 { font-size: 17px; }
  .subcategory-card p { font-size: 13px; }
}

@media (max-width: 768px) {
  .subcategory-cards { gap: 15px; justify-content: center; }
  .subcategory-card { flex: 0 0 calc(50% - 7.5px); margin-bottom: 18px; }
  .subcategory-card a { padding: 16px; }
  .subcategory-card a h3 { font-size: 16px; }
  .subcategory-card p { font-size: 12px; }
}

@media (max-width: 520px) {
  .subcategory-cards { gap: 12px; }
  .subcategory-card { flex: 0 0 calc(50% - 6px); }
  .subcategory-card a { padding: 14px; }
  .subcategory-card a h3 { font-size: 15px; }
  .subcategory-card p { font-size: 11px; }
}

@media (max-width: 480px) {
  .subcategory-cards { gap: 10px; }
  .subcategory-card { flex: 0 0 calc(50% - 5px); }
  .subcategory-card a h3 { font-size: 14px; }
  .subcategory-card p { font-size: 10px; }
}

@media (max-width: 375px) {
  .subcategory-cards { gap: 8px; }
  .subcategory-card { flex: 0 0 calc(50% - 4px); }
  .subcategory-card a h3 { font-size: 13px; }
  .subcategory-card p { font-size: 9px; }
}


.services-table {
  padding: 0px 0%;
  background-color: #fff;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  margin-top: 0px; 
}

.services-table h2 {
  font-size: clamp(20px, 2vw, 32px);
  margin-bottom: 30px;
  text-align: left;
  color: #333;
}

.services-table table {
  width: 100%;
  border-collapse: collapse;
}

.services-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 12px 15px;
  border-bottom: 2px solid #ddd;
  color: #333;
}

.services-table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  color: #555;
}

.services-table tbody td:nth-child(2) {
  max-width: 50%;
}

.service-desc .desc-full { display: inline; }
.service-desc .desc-half { display: none; }

.services-table td:nth-child(3) {
  white-space: nowrap;
}
.services-table .btn {
  display: inline-block;
  padding: 14px 28px;
  background-color: #b2763c;
  color: #fff;
  font-size: 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: .3s;
}

.services-table .btn:hover {
  background-color: #945f2f;
}


@media (max-width: 1028px) {

  .services-table h2 {
    font-size: 28px;
  }
  .services-table tbody td {
    font-size: 15px;
  }
  .services-table .btn {
    font-size: 15px;
    padding: 12px 24px;
  }
}

@media (max-width: 768px) {


  .services-table h2 {
    font-size: 28px;
    text-align: center;
  }

  .services-table thead th {
    font-size: 14px;
    padding: 8px 10px;
  }

  .services-table tbody td {
    font-size: 13px;
    padding: 8px 10px;
  }

  .services-table tbody td:nth-child(1) {
    font-weight: 600;
    font-size: 14px;
  }

  .services-table .btn {
    font-size: 13px;
    padding: 8px 16px;
  }
}

@media (max-width: 625px) {
  .service-desc .desc-full { display: none; }
  .service-desc .desc-half { display: inline; }
}

@media (max-width: 520px) {
  .services-table h2 {
    font-size: 26px;
    text-align: center;
  }

  .services-table table,
  .services-table thead th,
  .services-table tbody td {
    font-size: 10px !important; 
    line-height: 1.3;
  }

  .services-table .btn {
    font-size: 8px !important;
    padding: 6px 14px !important;
  }
}

@media (max-width: 400px) {

  .services-table h2 {
    font-size: 24px;
  }
  .services-table td:nth-child(1) {
    font-size: 15px;
  }
  .services-table td:nth-child(2) {
    font-size: 13px;
  }
  .services-table .btn {
    font-size: 12px;
    padding: 8px 16px;
  }
}

@media (max-width: 390px) {

  .services-table table,
  .services-table thead th,
  .services-table tbody td {
    font-size: 8px !important;
    line-height: 1.2;
    padding: 6px 8px; 
  }

  .services-table .btn {
    font-size: 6px !important;
    padding: 4px 10px;
  }
}
/* Мобильные карточки: скрыты по умолчанию */
.services-mobile-cards {
  display: none;
}

@media (max-width: 500px) {
  /* Скрываем таблицу */
  .services-desktop-table {
    display: none;
  }

  /* Показываем карточки */
  .services-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .service-mobile-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
  }

  .service-mobile-card:active {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  .smc-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: underline;
    line-height: 1.3;
  }

  .smc-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
  }

.smc-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.smc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 220px;
  min-width: 0;
}

.smc-price {
  font-size: 14px;
  font-weight: 600;
  color: #b2763c;
  white-space: normal;
  line-height: 1.4;
}

.smc-code {
  font-size: 11px;
  color: #999;
}

.services-mobile-cards .btn {
  font-size: 12px !important;
  padding: 9px 16px !important;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-left: auto;
}
}

/* SEO-текст снизу под таблицей услуг */
.service-category-page .seo-services-bottom,
.service-category-page .seo-services-bottom * {
  box-sizing: border-box;
}

.service-category-page .seo-services-bottom {
  clear: both;
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  background: #fff;
  padding: 18px 0 34px;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  overflow: visible !important;
}

/* Контейнер блока */
.service-category-page .seo-services-bottom > .container {
  display: block;
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  overflow: visible !important;
}

/* Основной SEO-блок */
.service-category-page .seo-services-bottom__inner {
  display: flow-root;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0;
  max-height: none !important;

  background: #F5F7FA;
  border: 1px solid rgba(178, 118, 60, 0.16);
  border-left: 3px solid #b2763c;
  border-radius: 14px;
  padding: clamp(14px, 2vw, 22px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.035);

  overflow: visible !important;

  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner > *:first-child {
  margin-top: 0;
}

.service-category-page .seo-services-bottom__inner > *:last-child {
  margin-bottom: 0;
}

/* Заголовки */
.service-category-page .seo-services-bottom__inner h2,
.service-category-page .seo-services-bottom__inner h3,
.service-category-page .seo-services-bottom__inner h4 {
  margin: 0 0 10px;
  color: #333;
  font-weight: 600;
  line-height: 1.25;

  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner h2 {
  font-size: clamp(20px, 1.8vw, 26px);
}

.service-category-page .seo-services-bottom__inner h3 {
  font-size: clamp(17px, 1.4vw, 21px);
}

.service-category-page .seo-services-bottom__inner h4 {
  font-size: clamp(15px, 1.2vw, 18px);
}

/* Обычный текст */
.service-category-page .seo-services-bottom__inner p,
.service-category-page .seo-services-bottom__inner li {
  max-width: 100%;
  min-width: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #555;

  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner p {
  margin: 0 0 10px;
}

.service-category-page .seo-services-bottom__inner ul,
.service-category-page .seo-services-bottom__inner ol {
  margin: 8px 0 12px;
  padding-left: 20px;
}

.service-category-page .seo-services-bottom__inner li {
  margin-bottom: 5px;
}

/* Ссылки */
.service-category-page .seo-services-bottom__inner a {
  color: #b2763c;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;

  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner a:hover {
  color: #945f2f;
}

/* Картинки, графики, figure, iframe */
.service-category-page .seo-services-bottom__inner figure,
.service-category-page .seo-services-bottom__inner .wp-caption {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  margin: 14px 0;
  overflow: visible !important;
}

.service-category-page .seo-services-bottom__inner img,
.service-category-page .seo-services-bottom__inner iframe,
.service-category-page .seo-services-bottom__inner video,
.service-category-page .seo-services-bottom__inner canvas,
.service-category-page .seo-services-bottom__inner svg {
  display: block;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  border-radius: 10px;
}

/* =========================================================
   ТАБЛИЦЫ ИЗ WYSIWYG — ВСЕГДА КАРТОЧКАМИ
   ========================================================= */

.service-category-page .seo-services-bottom__inner table,
.service-category-page .seo-services-bottom__inner thead,
.service-category-page .seo-services-bottom__inner tbody,
.service-category-page .seo-services-bottom__inner tr,
.service-category-page .seo-services-bottom__inner th,
.service-category-page .seo-services-bottom__inner td {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  overflow: visible !important;
}

/* Таблица как обычная оболочка */
.service-category-page .seo-services-bottom__inner table {
  margin: 14px 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;

  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

/* Шапку таблицы скрываем */
.service-category-page .seo-services-bottom__inner thead {
  display: none;
}

/*
  Если заголовки вставлены первой строкой tbody,
  скрываем первую строку.
  Если потом будет таблица без строки-заголовка — это правило убрать.
*/
.service-category-page .seo-services-bottom__inner tbody > tr:first-child {
  display: none;
}

/* Список карточек */
.service-category-page .seo-services-bottom__inner tbody {
  display: block;
  margin: 0;
  padding: 0;
}

/* Карточка = строка таблицы */
.service-category-page .seo-services-bottom__inner tr {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0;
  max-height: none !important;

  background: #fff;
  border: 1px solid rgba(178, 118, 60, 0.14);
  border-radius: 11px;
  padding: 10px 12px;
  margin: 0 0 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.025);

  overflow: visible !important;

  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner tr:last-child {
  margin-bottom: 0;
}

/* Поле внутри карточки */
.service-category-page .seo-services-bottom__inner td {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0;
  max-height: none !important;

  padding: 7px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eeeeee;

  font-size: 14px;
  line-height: 1.45;
  color: #555;

  overflow: visible !important;

  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner td:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.service-category-page .seo-services-bottom__inner td:first-child {
  padding-top: 0;
  color: #333;
  font-weight: 600;
}

/* Подпись поля */
.service-category-page .seo-services-bottom__inner td::before {
  display: inline;
  margin-right: 6px;

  color: #b2763c;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;

  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner td:nth-child(1)::before {
  content: "Оборудование:";
}

.service-category-page .seo-services-bottom__inner td:nth-child(2)::before {
  content: "Принцип действия:";
}

.service-category-page .seo-services-bottom__inner td:nth-child(3)::before {
  content: "Клинические мишени:";
}

.service-category-page .seo-services-bottom__inner td:nth-child(4)::before {
  content: "Доказанный эффект:";
}

/* Защита содержимого ячеек */
.service-category-page .seo-services-bottom__inner td > *,
.service-category-page .seo-services-bottom__inner th > * {
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  max-height: none !important;

  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.service-category-page .seo-services-bottom__inner td strong,
.service-category-page .seo-services-bottom__inner td b {
  color: #333;
  font-weight: 600;
}

/* Планшеты */
@media (max-width: 768px) {
  .service-category-page .seo-services-bottom {
    padding: 16px 0 30px;
  }

  .service-category-page .seo-services-bottom > .container {
    width: calc(100% - 28px);
  }

  .service-category-page .seo-services-bottom__inner {
    padding: 15px;
    border-radius: 12px;
  }

  .service-category-page .seo-services-bottom__inner p,
  .service-category-page .seo-services-bottom__inner li {
    font-size: 14px;
    line-height: 1.5;
  }

  .service-category-page .seo-services-bottom__inner table {
    margin: 12px 0;
  }

  .service-category-page .seo-services-bottom__inner tr {
    padding: 9px 11px;
    margin-bottom: 8px;
    border-radius: 10px;
  }

  .service-category-page .seo-services-bottom__inner td {
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .service-category-page .seo-services-bottom__inner td::before {
    font-size: 10px;
  }
}

/* Телефоны */
@media (max-width: 500px) {
  .service-category-page .seo-services-bottom {
    padding: 14px 0 26px;
  }

  .service-category-page .seo-services-bottom > .container {
    width: calc(100% - 20px);
  }

  .service-category-page .seo-services-bottom__inner {
    padding: 13px 11px;
    border-left-width: 3px;
    border-radius: 11px;
  }

  .service-category-page .seo-services-bottom__inner h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .service-category-page .seo-services-bottom__inner h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .service-category-page .seo-services-bottom__inner h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .service-category-page .seo-services-bottom__inner p,
  .service-category-page .seo-services-bottom__inner li {
    font-size: 13px;
    line-height: 1.45;
  }

  .service-category-page .seo-services-bottom__inner ul,
  .service-category-page .seo-services-bottom__inner ol {
    padding-left: 18px;
  }

  .service-category-page .seo-services-bottom__inner table {
    margin: 11px 0;
  }

  .service-category-page .seo-services-bottom__inner tr {
    padding: 9px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
  }

  .service-category-page .seo-services-bottom__inner td {
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.38;
  }

  .service-category-page .seo-services-bottom__inner td::before {
    display: block;
    margin-right: 0;
    margin-bottom: 2px;
    font-size: 10px;
  }
}