/* ============================================================
   Public site styles
   Palette: dark graphite + burgundy, gold/beige accent.
   New responsive layout.
   ============================================================ */

:root {
  --dark: #23201c;
  --dark2: #1c2c38;
  --red: #eb5e55;
  --red-dark: #aa413a;
  --gold: #c8a35a;
  --bg: #f6f2ea;
  --card-bg: #ffffff;
  --line: #e4ddd0;
  --muted: #7d766a;
  --text: #2b2723;
  --green: #3c7a3c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar {
  background: var(--dark);
  color: #fff;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #ddd; }
.topbar .messengers { display: flex; gap: 12px; align-items: center; }
.topbar .messengers a { display: inline-flex; align-items: center; gap: 4px; }
.topbar .messengers img { width: 18px; height: 18px; }

.header {
  background: #1c2c38;
  color: #fff;
  border-top: 1px solid #2a3d4c;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 52px; width: auto; }
.logo-text { line-height: 1.2; }
.logo-text strong { display: block; font-size: 17px; color: #fff; letter-spacing: .5px; }
.logo-text span { font-size: 12px; color: var(--gold); }

.header-contacts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-phone { text-align: right; }
.header-phone a {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: .3px;
}
.header-phone small { color: var(--gold); font-size: 12px; }
.btn-cta {
  display: inline-block;
  background: var(--red);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.btn-cta:hover { background: var(--red-dark); text-decoration: none; }

/* Navigation menu */
.nav-bar { background: var(--red); }
.nav-bar .container { display: flex; flex-wrap: wrap; position: relative; }
.nav-bar a {
  color: #fff;
  padding: 11px 16px;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
}
.nav-bar a:hover { background: var(--red-dark); text-decoration: none; }
.nav-item { position: relative; }
.nav-item > a { display: inline-block; }
.nav-toggle { display: none; }
.nav-item .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark2);
  min-width: 220px;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  border-radius: 0 0 5px 5px;
}
@media (hover: hover) and (min-width: 901px) {
  .nav-item:hover > a { background: var(--red-dark); }
  .nav-item:hover .submenu { display: block; }
  .nav-item:focus-within > a { background: var(--red-dark); }
  .nav-item:focus-within .submenu { display: block; }
  .nav-item.has-sub > a::after { content: ' ▾'; }
}
.nav-item .submenu a { display: block; padding: 9px 18px; border-top: 1px solid #3a352e; }
.nav-item .submenu a:hover { background: var(--red); }

/* Мобильное меню: текст — ссылка, шеврон — раскрытие подпунктов */
@media (hover: none), (max-width: 900px) {
  .nav-bar .container { display: block; }
  .nav-bar a,
  .nav-bar .container > a {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.14);
  }
  .nav-bar .container > a:first-child { border-top: 0; }
  .nav-item { display: flex; flex-wrap: wrap; align-items: stretch; }
  .nav-item > a { flex: 1 1 auto; min-width: 0; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 54px;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.14);
    border-left: 1px solid rgba(255,255,255,.14);
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .nav-toggle:active { background: var(--red-dark); }
  .nav-toggle svg { transition: transform .2s; }
  .nav-item.open .nav-toggle svg { transform: rotate(180deg); }
  .nav-item.open > a { background: var(--red-dark); }
  .nav-item .submenu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    background: rgba(0,0,0,.22);
    box-shadow: none;
    border-radius: 0;
  }
  .nav-item.open .submenu { display: block; }
  .nav-item .submenu a {
    padding: 11px 16px 11px 30px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-weight: 400;
  }
}

/* Breadcrumbs */
.breadcrumbs { font-size: 13px; color: var(--muted); padding: 14px 0 4px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs span.sep { margin: 0 6px; }

/* Home sections */
.section { padding: 52px 0; }
.section.alt { background: #fff; }
.section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
  color: var(--dark);
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 30px;
}

/* Hero */
.hero {
  background: #1c2c38;
  color: #fff;
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.hero.has-bg {
  /* background image: right, bottom aligned */
  background-image: var(--hero-bg, none);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: auto 96%;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 44px;
  line-height: 1.12;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 14px;
  color: #fff;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p.lead { font-size: 17px; color: #ccd6dc; max-width: 560px; margin-bottom: 24px; }
.hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .hero-img { display: none; }
.hero .hero-bottom { position: absolute; right: 0; bottom: 0; z-index: 0; }
.hero .hero-bottom img { height: 100%; max-height: 100%; }
.hero .meta { margin-top: 20px; font-size: 13px; color: #9fb0ba; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; max-width: 560px; }

@media (max-width: 768px) {
  .hero { background-size: 40% auto; }
  .hero .container { grid-template-columns: 1fr; padding-top: 0; }
  .hero h1 { font-size: 30px; }
  .hero .hero-bottom { width: 46%; opacity: .9; }
}

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.cat-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.1); transform: translateY(-3px); }
.cat-card .cat-img { height: 150px; object-fit: cover; width: 100%; }
.cat-card .cat-body { padding: 14px; }
.cat-card h3 { font-size: 16px; margin-bottom: 6px; }
.cat-card h3 a { color: var(--dark); }
.cat-card h3 a:hover { color: var(--red); }
.cat-card p { font-size: 13px; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  position: relative;
}
.step .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  margin-bottom: 12px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

/* Criteria */
.criteria-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.criterion { background: #fff; border-left: 4px solid var(--gold); padding: 14px 16px; border-radius: 4px; }
.criterion .c-icon { font-size: 22px; }
.criterion h4 { font-size: 15px; text-transform: capitalize; margin-bottom: 4px; }
.criterion p { font-size: 13px; color: var(--muted); }

/* Stories */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.story {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.story img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.story h4 { font-size: 15px; margin-bottom: 8px; }
.story h4 a { color: var(--dark); }
.story h4 a:hover { color: var(--red); }
.story p { font-size: 13.5px; color: var(--muted); }

/* Advantages */
.advantages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.advantage { background: var(--card-bg); border: 1px solid var(--line); padding: 16px; border-radius: 6px; text-align: center; }
.advantage .av-icon { font-size: 28px; color: var(--gold); margin-bottom: 8px; }
.advantage h4 { font-size: 14px; text-transform: lowercase; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testimonial { background: var(--card-bg); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.testimonial .stars { color: var(--gold); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial p.quoted { font-style: italic; color: #504a41; font-size: 14px; margin-bottom: 14px; }
.testimonial .author { display: flex; align-items: center; gap: 10px; }
.testimonial .author img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.testimonial .author strong { display: block; font-size: 14px; }
.testimonial .author small { color: var(--muted); }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 12px; font-size: 20px; color: var(--red); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }

/* Page content (section / article) */
.page-head { padding: 26px 0 6px; }
.page-head h1 { font-size: 30px; color: var(--dark); margin-bottom: 8px; }
.page-intro { color: var(--muted); font-size: 16px; max-width: 800px; margin-bottom: 18px; }

/* Раздел: картинка слева, основной контент справа от неё */
.section-lead { display: flex; align-items: flex-start; gap: 28px; margin: 6px 0 20px; }
.section-lead .section-lead-img { flex: 0 0 280px; max-width: 280px; }
.section-lead .section-lead-img img { width: 100%; border-radius: 8px; object-fit: cover; display: block; }
.section-lead .content-body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 768px) {
  .section-lead { flex-direction: column; gap: 16px; }
  .section-lead .section-lead-img { flex: 1 1 auto; max-width: 100%; max-height: 300px; overflow: hidden; }
  .section-lead .section-lead-img img { max-height: 300px; }
}
.content-body { font-size: 15.5px; line-height: 1.7; }
.content-body img { border-radius: 6px; margin: 14px 0; }
.content-body h2 { font-size: 22px; margin: 26px 0 12px; color: var(--dark); }
.content-body h3 { font-size: 18px; margin: 20px 0 10px; }
.content-body p { margin: 0 0 14px; }
.content-body ul, .content-body ol { margin: 0 0 14px 22px; }
.content-body iframe { max-width: 100%; border: 0; }
.content-body blockquote { border-left: 4px solid var(--gold); padding: 10px 16px; color: var(--muted); font-style: italic; margin-bottom: 14px; }
.content-body::after { content: ""; display: table; clear: both; }
.content-body img.article-img {
  float: left;
  max-width: 42%;
  max-height: 340px;
  width: auto;
  height: auto;
  object-fit: cover;
  margin: 6px 24px 12px 0;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .content-body img.article-img { float: none; max-width: 100%; width: 100%; max-height: 300px; margin: 0 0 14px; }
}

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.gallery a { display: block; }
.gallery img { border-radius: 6px; height: 130px; width: 100%; object-fit: cover; cursor: pointer; }

/* Lightbox for photo grid */
.lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.85); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); user-select: none; }
.lightbox-close { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; opacity: .85; z-index: 2; }
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
  z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,.26); opacity: 1; }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  letter-spacing: .04em;
  opacity: .8;
}
@media (max-width: 560px) {
  .lightbox { padding: 16px; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 28px; }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }
}

/* Кнопка-метка «Показать на карте» */
.map-pin-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.map-pin-btn:hover { border-color: var(--red); box-shadow: 0 8px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.map-pin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  flex: 0 0 auto;
}
.map-pin-text { line-height: 1; }

.map-modal .map-modal-inner {
  width: min(900px, 100%);
  height: min(70vh, 620px);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.map-modal .map-modal-inner iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Child cards and subsections */
.subsections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.subsection a { display: flex; gap: 14px; align-items: flex-start; background: var(--card-bg); border: 1px solid var(--line); padding: 15px; border-radius: 6px; height: 100%; }
.subsection a:hover { border-color: var(--red); text-decoration: none; }
.subsection .subsection-thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.subsection-body { min-width: 0; }
.subsection a h3 { font-size: 15px; color: var(--dark); margin-bottom: 5px; overflow-wrap: break-word; word-break: break-word; }
.subsection a p { font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: break-word; word-break: break-word; }

/* Sections grid on home (moved from inline style to a class) */
.subsections.sections-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.subsections.sections-grid .subsection { min-width: 0; }

/* Section card: image on top, title below, intro under title */
.subsections.sections-grid .sec-card a {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}
.subsections.sections-grid .sec-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #eef0f2;
}
.subsections.sections-grid .sec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.subsections.sections-grid .sec-head {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  padding: 14px 15px 6px;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
}
.subsections.sections-grid .sec-intro {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  padding: 0 15px 15px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* SEO text under cards */
.seo-text { max-width: 960px; margin: 26px auto 0; color: var(--text); font-size: 15px; line-height: 1.7; }
.seo-text h2 { font-family: 'Roboto Condensed', Arial, sans-serif; font-size: 22px; margin: 18px 0 10px; text-transform: uppercase; }
.seo-text h3 { font-size: 18px; margin: 16px 0 8px; }
.seo-text p { margin: 0 0 12px; }
.seo-text ul, .seo-text ol { margin: 0 0 12px 22px; }
.seo-text a { color: var(--red); }

/* Catalog */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }

/* "Load more" in #razdely / #znachki blocks */
.is-more.hidden { display: none !important; }
.more-btn { margin-top: 18px; }
.card-item {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}
.card-item:hover { box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.card-item .card-img { height: 170px; object-fit: cover; width: 100%; background: #eee; }
.card-item .card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.card-item h3 { font-size: 15px; margin-bottom: 6px; }
.card-item h3 a { color: var(--dark); }
.card-item h3 a:hover { color: var(--red); }
.card-item .card-desc { font-size: 13px; color: var(--muted); flex: 1; margin-bottom: 10px; }
.card-item .card-meta { display: flex; justify-content: space-between; align-items: center; }
.card-price { color: var(--red); font-weight: 700; font-size: 15px; }
.card-cat { font-size: 12px; color: var(--muted); }

.filters { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters > * { min-width: 0; max-width: 100%; }
.filters select, .filters input { padding: 8px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; }
.filters select { max-width: 100%; }
.filters input[type=text] { min-width: 220px; }
@media (max-width: 560px) {
  .filters { flex-direction: column; align-items: stretch; }
  .filters select, .filters input[type=text], .filters .btn { width: 100%; }
  .filters input[type=text] { min-width: 0; }
}

.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0; }
.pagination a, .pagination span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--dark); }
.pagination .cur { background: var(--red); color: #fff; border-color: var(--red); }
.pagination a:hover { border-color: var(--red); }

/* Badge card detail */
.card-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin: 24px 0 40px; }
.card-detail h1 { font-size: 27px; margin-bottom: 10px; color: var(--dark); }
.card-detail .price-big { font-size: 24px; color: var(--red); font-weight: 700; margin: 12px 0; }
.card-detail .price-big .price-hidden { color: var(--muted); font-weight: 400; font-size: 15px; }
.card-detail .card-text { color: #35512f; font-size: 14px; margin-bottom: 14px; }
.card-detail .card-text:empty { display: none; }
.card-detail .desc { font-size: 15.5px; line-height: 1.65; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.card-actions .btn,
.card-actions .btn-cta { white-space: nowrap; }
@media (max-width: 560px) {
  .card-actions { flex-direction: column; align-items: stretch; }
  .card-actions .btn,
  .card-actions .btn-cta { padding: 13px 18px; text-align: center; white-space: normal; }
}
.card-gallery-main { border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.card-gallery-main img { width: 100%; height: 380px; object-fit: cover; }
.card-gallery-thumbs { display: flex; gap: 8px; }
.card-gallery-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; cursor: pointer; border: 2px solid transparent; }
.card-gallery-thumbs img.on { border-color: var(--red); }
.back-link { color: var(--muted); font-size: 14px; }

/* Form */
.form-block { max-width: 640px; margin: 0 auto; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.form-row input[type=text], .form-row input[type=tel], .form-row input[type=email], .form-row select, .form-row textarea {
  width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font: inherit;
}
.form-row textarea { min-height: 100px; }
.form-row .hint { font-size: 12px; color: var(--muted); }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-msg { background: var(--green); color: #fff; padding: 14px 18px; border-radius: 6px; margin-bottom: 16px; }
.form-msg.err { background: var(--red); }
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff !important;
  border: 0;
  padding: 12px 26px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); text-decoration: none; }

/* Contacts */
.contacts-block { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.contact-place { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 12px; }
.contact-place h4 { font-size: 15px; color: var(--dark); margin-bottom: 6px; }
.contact-place p { font-size: 13.5px; color: var(--muted); }
.contact-place .metro { color: var(--red); font-weight: 600; }

main { padding-bottom: 50px; }

/* Anchor block */
.anchor-bar { background: #fff; border-top: 1px solid var(--line); padding: 14px 0; }
.anchor-bar .container { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.anchor-bar a { color: var(--dark); font-size: 14px; border-bottom: 1px dashed #c8b89a; }
.anchor-bar a:hover { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }

/* Footer */
.footer { background: var(--dark); color: #cfc8ba; }
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-top: 36px; padding-bottom: 24px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer a { color: #cfc8ba; }
.footer a:hover { color: #fff; }
.footer .messengers { display: flex; gap: 14px; margin-top: 10px; }
.footer .messengers img { width: 24px; height: 24px; }
.footer-bottom { border-top: 1px solid #3a352e; padding: 14px 0; font-size: 12.5px; color: #8d8678; text-align: center; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: 72px; color: var(--red); }
.notfound p { color: var(--muted); margin: 10px 0 24px; }

/* Responsive */
@media (max-width: 900px) {
  .cat-grid, .criteria-grid, .advantages, .stories, .testimonials-grid, .subsections, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .subsections.sections-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; }
  .card-detail { grid-template-columns: 1fr; }
  .contacts-block { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cat-grid, .criteria-grid, .advantages, .stories, .testimonials-grid, .subsections, .catalog-grid { grid-template-columns: 1fr; }
  .subsections.sections-grid { grid-template-columns: 1fr; }
  .form-grid2 { grid-template-columns: 1fr; }
}
/* Липкая панель мессенджеров (мобильные) */
.sticky-messengers {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: rgba(35, 32, 28, .96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transform: translateY(-110%);
  transition: transform .28s ease;
  will-change: transform;
}
.sticky-messengers.is-on { transform: translateY(0); }
.sticky-messengers a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.sticky-messengers a:hover { background: var(--red); text-decoration: none; }
.sticky-messengers img { width: 18px; height: 18px; }

@media (hover: none), (max-width: 900px) {
  .sticky-messengers { display: flex; }
}

/* Кнопка «Наверх» (десктоп, слева — справа висит бейдж reCAPTCHA) */
.to-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--dark);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s, color .2s, border-color .2s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--red); border-color: var(--red); color: #fff; }
.to-top:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (hover: hover) and (min-width: 901px) {
  .to-top { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-messengers, .to-top { transition: none; }
}
