/*
Theme Name: Hello Elementor Child — СТО-1
Theme URI: https://new.sto1.tomsk.ru/
Description: Единые стили внутренних страниц и блога.
Author: СТО-1
Template: hello-elementor
Version: 1.2.4
Text Domain: hello-elementor-child
*/

/* --- Шапка (на всех страницах) --- */
:root {
  --sto1-header-offset: 80px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85) !important;
  border-bottom: 1px solid #222;
}

.site-header .header-inner {
  min-height: 64px;
  align-items: center;
}

.site-header .site-description {
  display: none !important;
}

.site-header .site-title,
.site-header .site-navigation a {
  color: #fff !important;
}

.site-header .site-navigation a:hover {
  color: #CB1007 !important;
}

.site-header .site-branding.show-logo .custom-logo img {
  max-height: 52px;
  width: auto;
}

/* --- Тёмный фон везде, кроме главной --- */
html body.sto1-inner-page,
html body.single,
html body.blog,
html body.archive,
html body.search {
  background: #000 !important;
}

body.sto1-inner-page,
body.sto1-inner-page.elementor-page,
body.single,
body.blog,
body.archive,
body.search {
  background: #000 !important;
}

body.sto1-inner-page .page-header,
body.blog .page-header {
  display: none;
}

body.sto1-inner-page .site-main,
body.single .site-main,
body.blog .site-main,
body.archive .site-main,
body.search .site-main,
body.sto1-inner-page .elementor.elementor-page,
body.sto1-inner-page [data-elementor-type="wp-page"],
body.sto1-inner-page [data-elementor-type="wp-post"] {
  padding-top: var(--sto1-header-offset) !important;
  background: #000 !important;
}

/* Записи: не дублировать h1, если контент уже в Elementor */
body.single .sto1-single-wrap:has(.entry-content .elementor) .entry-title {
  display: none;
}

body.single .sto1-single-wrap .entry-title {
  margin: 0 0 1em;
  padding: 0;
  font-size: 36px;
  line-height: 1.2;
  color: #CB1007;
}

body.single .sto1-single-wrap {
  padding-top: 8px;
  padding-bottom: 48px;
}

/* Первая секция Elementor — доп. отступ от шапки */
body.sto1-inner-page .elementor.elementor-page > .elementor-section-wrap > .elementor-top-section:first-child,
body.sto1-inner-page #sto1-page.elementor-top-section,
body.sto1-inner-page #uslugi-slesar.elementor-top-section,
body.sto1-inner-page #uslugi-kuzov.elementor-top-section,
body.sto1-inner-page #uslugi-detail.elementor-top-section,
body.sto1-inner-page #sto1-uslugi-footer.elementor-top-section,
body.single .site-main > .elementor > .elementor-section-wrap > .elementor-top-section:first-child {
  scroll-margin-top: var(--sto1-header-offset);
}

html {
  scroll-behavior: smooth;
}

body.sto1-inner-page .elementor-section.elementor-top-section {
  background-color: #000 !important;
}

body.sto1-inner-page .elementor-widget-button .elementor-button {
  background-color: #CB1007 !important;
  color: #fff !important;
}

body.sto1-inner-page .elementor-widget-button .elementor-button:hover {
  background-color: #a30d06 !important;
}

body.sto1-inner-page .elementor-section > .elementor-container,
body.blog .sto1-archive-wrap,
body.single .sto1-single-wrap,
body.single .site-main > .elementor {
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box;
}

/* Текстовая колонка по умолчанию */
body.sto1-inner-page .elementor-column .elementor-widget-wrap,
body.blog .sto1-archive-wrap,
body.single .sto1-single-wrap {
  max-width: 720px;
}

/* Широкие блоки: галерея, карта, сетка записей, форма */
body.sto1-inner-page #sto1-wide .elementor-widget-wrap,
body.sto1-inner-page #uslugi-slesar .elementor-widget-wrap,
body.sto1-inner-page #uslugi-kuzov .elementor-widget-wrap,
body.sto1-inner-page #uslugi-detail .elementor-widget-wrap,
body.sto1-inner-page #sto1-uslugi-footer .elementor-widget-wrap,
body.sto1-inner-page #about-gallery .elementor-widget-wrap,
body.sto1-inner-page #about-map .elementor-widget-wrap,
body.sto1-inner-page .elementor-widget-posts .elementor-widget-wrap {
  max-width: 1100px;
}

/* Страница «Услуги» — на всю рабочую ширину */
body.sto1-page-uslugi .elementor-section > .elementor-container {
  max-width: 1320px !important;
}
body.sto1-page-uslugi .elementor-column .elementor-widget-wrap,
body.sto1-page-uslugi #sto1-page .elementor-widget-wrap,
body.sto1-page-uslugi #sto1-wide .elementor-widget-wrap,
body.sto1-page-uslugi #uslugi-slesar .elementor-widget-wrap,
body.sto1-page-uslugi #uslugi-kuzov .elementor-widget-wrap,
body.sto1-page-uslugi #uslugi-detail .elementor-widget-wrap,
body.sto1-page-uslugi #sto1-uslugi-footer .elementor-widget-wrap {
  max-width: 1320px;
}
body.sto1-page-uslugi .sto1-services-grid,
body.sto1-page-uslugi .elementor-posts .elementor-posts-container {
  max-width: none;
  width: 100%;
}
@media (min-width: 1280px) {
  body.sto1-page-uslugi .sto1-services-grid,
  body.sto1-page-uslugi .elementor-posts .elementor-posts-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --- Типографика Elementor-страниц --- */
body.sto1-inner-page .elementor-widget-heading .elementor-heading-title,
body.sto1-inner-page .sto1-page-body h1,
body.sto1-inner-page .sto1-page-body h2,
body.sto1-inner-page .sto1-page-body h3 {
  color: #CB1007 !important;
}

body.sto1-inner-page .elementor-widget-heading h1.elementor-heading-title {
  font-size: 36px;
  margin-bottom: 0.5em;
}

body.sto1-inner-page .elementor-widget-text-editor p,
body.sto1-inner-page .elementor-widget-text-editor li,
body.sto1-inner-page .sto1-page-body,
body.sto1-inner-page .sto1-page-body p,
body.sto1-inner-page .sto1-page-body li {
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.75;
}

body.sto1-inner-page .sto1-page-body a {
  color: #fff;
  text-decoration: none;
}

body.sto1-inner-page .sto1-page-body a:hover {
  color: #CB1007;
}

body.sto1-inner-page .sto1-page-body h2 {
  font-size: 26px;
  margin: 1.5em 0 0.75em;
}

body.sto1-inner-page .sto1-page-body h3 {
  font-size: 22px;
  margin: 1.25em 0 0.5em;
}

/* Карточки акций */
.sto1-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1100px;
}
@media (max-width: 700px) {
  .sto1-cards {
    grid-template-columns: 1fr;
  }
}
.sto1-card {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 24px;
}
.sto1-card h3 {
  color: #CB1007;
  margin: 0 0 12px;
  font-size: 20px;
}
.sto1-card p {
  margin: 0;
  color: #e0e0e0;
}
.sto1-card-note {
  font-size: 14px !important;
  color: #999 !important;
}

/* Списки преимуществ (О компании) */
.sto1-about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
}
.sto1-about-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.5;
}
.sto1-about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #CB1007;
  font-weight: 700;
}

/* Галерея цеха */
.sto1-about-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  width: 100%;
  max-width: 1100px;
}
@media (max-width: 900px) {
  .sto1-about-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .sto1-about-gallery {
    grid-template-columns: 1fr;
  }
}
.sto1-about-gallery img,
#about-map .elementor-widget-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.sto1-about-gallery img {
  height: 220px;
  object-fit: cover;
}

.sto1-branches a {
  color: #fff;
  text-decoration: none;
}
.sto1-branches a:hover {
  color: #CB1007;
}

/* Отзывы */
.sto1-reviews {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}
.sto1-review {
  background: #111;
  border-left: 3px solid #CB1007;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
}
.sto1-review-meta {
  margin: 0 0 12px;
  color: #CB1007;
  font-size: 15px;
}
.sto1-review blockquote {
  margin: 0;
  padding: 0;
  border: none;
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.75;
  font-style: normal;
}
.sto1-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  background: #CB1007;
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
}
.sto1-btn:hover {
  background: #a00d06;
  color: #fff !important;
}

/* Вакансии */
.sto1-vak-intro {
  font-size: 18px;
  margin-bottom: 1.5em;
}

.sto1-vak-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
  margin: 1.5em 0 2em;
}

@media (max-width: 768px) {
  .sto1-vak-columns {
    grid-template-columns: 1fr;
  }
}

.sto1-vak-col h2 {
  color: #CB1007;
  font-size: 22px;
  margin: 0 0 12px;
}

.sto1-vak-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sto1-vak-col li {
  position: relative;
  padding: 6px 0 6px 18px;
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.5;
}

.sto1-vak-col li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #CB1007;
}

.sto1-vak-cta {
  margin: 2em 0 1em;
  font-size: 20px;
  color: #fff;
}

.sto1-vak-back {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid #333;
}

.sto1-vak-back a {
  color: #CB1007;
  text-decoration: none;
}

.sto1-vak-back a:hover {
  color: #fff;
}

/* Страница «Услуги» */
.sto1-uslugi-intro {
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 1em;
  color: #e0e0e0;
}
.sto1-uslugi-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 1.25em 0 0;
}
.sto1-uslugi-nav a {
  display: inline-block;
  padding: 10px 18px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none;
  font-size: 15px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.sto1-uslugi-nav a:hover {
  border-color: #CB1007;
  color: #ffce00 !important;
  background: #111;
}
.sto1-uslugi-cta {
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid #333;
}
.sto1-uslugi-cta__lead {
  font-size: 18px;
  color: #fff;
  margin: 0 0 1em;
}
.sto1-uslugi-phones {
  font-size: 17px;
  line-height: 1.8;
  margin: 0 0 1.25em;
}
.sto1-uslugi-phones a {
  color: #ffce00 !important;
  text-decoration: none;
}
.sto1-uslugi-phones a:hover {
  color: #fff !important;
}
.sto1-uslugi-cta__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}
.sto1-btn--outline {
  background: transparent !important;
  border: 2px solid #CB1007;
}
.sto1-btn--outline:hover {
  background: #CB1007 !important;
}

/* Сетка услуг */
body.sto1-inner-page .sto1-services-grid,
body.sto1-inner-page .elementor-posts .elementor-posts-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1100px;
}
@media (max-width: 1024px) {
  body.sto1-inner-page .sto1-services-grid,
  body.sto1-inner-page .elementor-posts .elementor-posts-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.sto1-inner-page .sto1-services-grid,
  body.sto1-inner-page .elementor-posts .elementor-posts-container {
    grid-template-columns: 1fr;
  }
}
body.sto1-inner-page .sto1-services-grid .elementor-post,
body.sto1-inner-page .elementor-posts .elementor-post,
body.sto1-inner-page .sto1-service-card {
  margin: 0;
}
body.sto1-inner-page .sto1-service-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
body.sto1-inner-page .sto1-service-card__link:hover {
  border-color: #CB1007;
  transform: translateY(-2px);
}
body.sto1-inner-page .sto1-service-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a1a1a;
}
body.sto1-inner-page .sto1-service-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.sto1-inner-page .sto1-service-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  font-size: 22px;
  font-weight: 700;
  color: #444;
  letter-spacing: 0.05em;
}
body.sto1-inner-page .sto1-service-card__body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
body.sto1-inner-page .sto1-service-card .elementor-post__title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  color: #fff;
}
body.sto1-inner-page .sto1-service-card__link:hover .elementor-post__title {
  color: #CB1007;
}
body.sto1-inner-page .sto1-service-card__excerpt {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #aaa;
  flex: 1;
}
body.sto1-inner-page .sto1-service-card__more {
  font-size: 14px;
  color: #ffce00;
}
body.sto1-inner-page .sto1-service-card__link:hover .sto1-service-card__more {
  color: #fff;
}
/* Legacy Elementor Posts без sto1-service-card */
body.sto1-inner-page .elementor-posts .elementor-post__title,
body.sto1-inner-page .sto1-services-grid .elementor-post__title {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.35;
}
body.sto1-inner-page .elementor-posts .elementor-post__title a,
body.sto1-inner-page .sto1-services-grid .elementor-post__title a {
  color: #fff;
}
body.sto1-inner-page .elementor-posts .elementor-post__title a:hover,
body.sto1-inner-page .sto1-services-grid .elementor-post__title a:hover {
  color: #CB1007;
}
body.sto1-inner-page .elementor-posts .elementor-post__thumbnail img,
body.sto1-inner-page .sto1-services-grid .elementor-post__thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* --- Архив блога (home.php) --- */
body.blog .site-main,
body.archive .site-main {
  min-height: calc(100vh - 56px);
}

.sto1-archive-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
  width: 100%;
  box-sizing: border-box;
}
.sto1-archive-wrap h1 {
  color: #CB1007;
  font-size: 36px;
  margin: 0 0 1em;
}
.sto1-archive-list article {
  margin-bottom: 2em;
  padding-bottom: 2em;
  border-bottom: 1px solid #222;
}
.sto1-archive-list .entry-title {
  margin: 0 0 0.5em;
  font-size: 22px;
}
.sto1-archive-list .entry-title a {
  color: #CB1007;
  text-decoration: none;
}
.sto1-archive-list .entry-title a:hover {
  color: #fff;
}
.sto1-archive-list p {
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.75;
}
.sto1-archive-list .read-more {
  color: #fff;
}
.sto1-pagination {
  margin-top: 2em;
}
.sto1-pagination a {
  color: #CB1007;
}

/* --- Одиночная запись --- */
.sto1-single-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.sto1-single-wrap h1.entry-title {
  color: #CB1007;
  font-size: 32px;
}
.sto1-single-wrap .entry-content {
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.75;
}
.sto1-single-wrap .entry-content a {
  color: #fff;
}
.sto1-single-wrap .entry-content a:hover {
  color: #CB1007;
}

/* --- Футер СТО-1 --- */
#site-footer.site-footer,
.site-footer.dynamic-footer {
  display: none !important;
}

.sto1-site-footer {
  width: 100%;
  box-sizing: border-box;
  background: #0a0a0a;
  border-top: 3px solid #CB1007;
  color: #ccc;
  padding: 40px 20px 28px;
  margin: 0;
  clear: both;
}

.sto1-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  text-align: left;
  align-items: start;
}

.sto1-footer-col {
  margin: 0;
}

.sto1-footer-col strong {
  display: block;
  color: #CB1007;
  font-size: 16px;
  margin: 0 0 12px;
  font-weight: 700;
}

.sto1-footer-col p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #ccc;
}

.sto1-footer-col a {
  color: #fff;
  text-decoration: none;
}

.sto1-footer-col a:hover {
  color: #CB1007;
}

.sto1-footer-copy {
  max-width: 1100px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.sto1-footer-copy a {
  color: #aaa;
  text-decoration: none;
}

.sto1-footer-copy a:hover {
  color: #CB1007;
}

@media (max-width: 768px) {
  .sto1-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
}
