:root {
  --sst-gap: 24px;
}

/* Базовые стили для предотвращения переполнения */
.seo-tab * {
  box-sizing: border-box;
}

/* Контейнеры секций */
.seo-tab {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Ограничение ширины контента */
.seo-tab > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Секции прайсов и FAQ */
.price-section,
.faq-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.price-title,
.faq-title {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.price-intro,
.price-notes,
.faq-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.price-intro p,
.price-notes p,
.faq-answer p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

/* Контейнеры для CTA кнопок */
.price-cta,
.faq-cta {
  margin-top: 24px;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.price-cta .btn,
.faq-cta .btn {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.price-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.price-card-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sst-calc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sst-gap);
  align-items: start;
}

#stroy-calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#stroy-calc-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #0f172a;
  gap: 6px;
}

#stroy-calc-form input,
#stroy-calc-form select {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.sst-calc-result {
  background: #f8fafc;
  border-radius: 18px;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.sst-calc-result h3 {
  margin: 0 0 8px;
}

.sst-calc-result p {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.city-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sst-gap);
}

.city-metric {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 6px 0 0;
}

.similar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.similar-card {
  display: block;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.faq-list details {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: #fff;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.review-card {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.review-card header {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.review-card time {
  color: #64748b;
  font-size: 0.85rem;
}

.branch-card.is-fallback {
  opacity: 0.9;
  background-image: repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.1) 8px, transparent 8px, transparent 16px);
}

.org-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.org-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.org-info {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.org-info__icon {
  font-size: 20px;
  color: #1976d2;
  margin-top: 4px;
}

.org-info__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 0 0 2px;
}

.org-info__value {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.org-info__hint {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.stroy-breadcrumbs__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.stroy-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stroy-breadcrumbs__item a {
  color: inherit;
  text-decoration: none;
}

.stroy-breadcrumbs__item a:hover {
  text-decoration: underline;
}

.stroy-breadcrumbs__item + .stroy-breadcrumbs__item::before {
  content: "/";
  color: #cbd5f5;
}

.map-placeholder {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  background: #f8fafc;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #475569;
}

.map-placeholder__icon {
  font-size: 1.5rem;
}

.phone-muted {
  color: #94a3b8;
}

.order-modal__panel {
  max-width: 520px;
  border-radius: 24px;
  padding: 28px;
}

.order-modal__header {
  margin-bottom: 24px;
}

.order-modal__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 6px;
  display: block;
}

.order-modal__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.order-modal__desc {
  margin: 0;
  color: #475569;
}

.order-modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.order-form label span {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 4px;
}

.order-form input,
.order-form textarea {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1rem;
  width: 100%;
}

.order-form textarea {
  min-height: 100px;
  resize: vertical;
}

.order-modal__status {
  font-size: 0.9rem;
  color: #0f172a;
  min-height: 1.2em;
}

.order-modal__service {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px 18px;
}

.order-modal__label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 0 0 8px;
}

.order-modal__service-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.order-modal__service-unit {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 4px;
}

.order-modal__cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-modal__contacts {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 16px;
}

.order-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.order-modal__success {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 14px 18px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-modal__success p {
  margin: 0 0 8px;
  color: #065f46;
}

.om-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.om-btn-primary {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 10px 25px rgba(25, 118, 210, 0.3);
}

.om-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(25, 118, 210, 0.35);
}

.om-btn-secondary {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

.om-btn-ghost {
  background: transparent;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

.om-btn-secondary:hover,
.om-btn-ghost:hover {
  border-color: #1976d2;
  color: #1976d2;
}

.om-ico {
  font-size: 1.1rem;
}

.btn-ghost {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: transparent;
  color: #64748b;
  border-radius: 999px;
  padding: 10px 16px;
}

.btn-ghost:disabled {
  opacity: 0.8;
}


/* Адаптивность таблиц цен */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.price-table th,
.price-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.price-table th {
  font-weight: 600;
  background: #f8fafc;
  color: #0f172a;
}

.price-table tbody tr:hover {
  background: #f8fafc;
}

/* Адаптивность кнопок */
.btn {
  display: inline-block;
  padding: 12px 24px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.btn-primary {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Контейнеры для CTA кнопок */
.price-cta,
.faq-cta {
  margin-top: 24px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.price-cta .btn,
.faq-cta .btn {
  width: 100%;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

/* Секции с контентом */
.price-section,
.faq-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.price-intro,
.price-notes,
.faq-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.price-intro p,
.price-notes p,
.faq-answer p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Таблицы - предотвращение переполнения */
.price-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  box-sizing: border-box;
}

.price-table th,
.price-table td {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* Дополнительные исправления для мобильных */
@media (max-width: 768px) {
  .seo-tab {
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .price-section,
  .faq-section {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .price-grid,
  .city-metrics,
  .similar-list,
  .review-grid {
    grid-template-columns: 1fr;
  }

  /* Таблицы на мобильных - горизонтальный скролл */
  .price-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .price-table thead,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td {
    display: block;
  }

  .price-table thead {
    display: none;
  }

  .price-table tr {
    margin-bottom: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
  }

  .price-table td {
    border: none;
    padding: 8px 0;
    text-align: left;
  }

  .price-table td:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #64748b;
    display: inline-block;
    min-width: 120px;
  }

  /* Альтернатива: карточки вместо таблицы */
  .price-table-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .price-card-mobile {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
  }

  .price-card-mobile__name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #0f172a;
  }

  .price-card-mobile__specs {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
  }

  .price-card-mobile__price {
    font-size: 20px;
    font-weight: 700;
    color: #1976d2;
    margin-top: 12px;
  }

  /* Кнопки на мобильных - полная ширина */
  .btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .price-cta,
  .faq-cta {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }

  .price-cta .btn,
  .faq-cta .btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.4;
    margin-left: 0;
    margin-right: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  /* Секции с отступами */
  .price-section,
  .faq-section {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .price-intro,
  .price-notes {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .price-table {
    width: 100%;
    margin: 16px 0;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .price-table {
    font-size: 14px;
  }

  .price-table td {
    padding: 6px 0;
  }

  .btn {
    min-height: 48px;
    font-size: 15px;
    padding: 12px 14px;
    line-height: 1.4;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .price-cta,
  .faq-cta {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .price-cta .btn,
  .faq-cta .btn {
    font-size: 14px;
    padding: 12px 14px;
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .price-section,
  .faq-section {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .price-intro p,
  .price-notes p {
    font-size: 14px;
    line-height: 1.6;
  }

  .price-title,
  .faq-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 16px;
  }

  /* Адаптивность для раздела "Похожие компании" */
  .similar-list {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .similar-card {
    padding: 12px;
    border-radius: 10px;
  }

  .sim-head {
    gap: 8px;
    margin-bottom: 8px;
  }

  .sim-title {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .sim-meta,
  .sim-cta {
    gap: 6px;
    flex-wrap: wrap;
  }

  .similar-card .badge {
    font-size: 0.75rem;
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
  }

  .similar-card .badge .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    margin-right: 6px;
  }

  #similar-more {
    width: 100%;
    min-height: 44px;
    padding: 12px;
    font-size: 0.9rem;
    margin-top: 12px;
  }
}

