:root {
  --primary: #191932;
  --secondary: #2255f5;
  --secondary-strong: #1b49e6;
  --accent: #bbff00;
  --light: #f7f9ff;
  --dark: #191932;
  --gray: #696969;
  --shadow: 0 10px 24px rgba(34, 85, 245, 0.08);
  --motion-duration-fast: 0.16s;
  --motion-duration-base: 0.24s;
  --motion-duration-slow: 0.34s;
  --motion-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: var(--motion-ease-standard);
  --ease-out-expo: var(--motion-ease-emphasized);
  --transition-fast: all var(--motion-duration-fast) var(--motion-ease-standard);
  --transition: all var(--motion-duration-base) var(--motion-ease-standard);
  --border-radius: 16px;
  --border-radius-large: 24px;
  --transition-smooth: all var(--motion-duration-base) var(--motion-ease-emphasized);
  --gradient-primary: linear-gradient(135deg, #2255f5 0%, #00a2ff 100%);
  --shadow-sm: 0 8px 20px rgba(34, 85, 245, 0.1);
  --shadow-md: 0 14px 30px rgba(34, 85, 245, 0.14);
  --shadow-large: 0 14px 30px rgba(34, 85, 245, 0.14);
  --surface-card: #ffffff;
  --surface-soft: #f7f9ff;
  --page-canvas: #eef1f6;
  --hero-card-bg: linear-gradient(180deg, #f8faff 0%, #ffffff 46%);
  --hero-card-border: rgba(225, 230, 242, 0.92);
  --hero-card-shadow: 0 8px 22px rgba(25, 25, 50, 0.05);
  --surface-border: #e3e9f4;
  --surface-border-soft: #e8edf7;
  --surface-hover-soft: #f6f9ff;
  --surface-hover-strong: #f1f6ff;
  --surface-section-muted: #ecf0ff;
  --text-muted-strong: #4b4f64;
  --shadow-soft-card: 0 6px 16px rgba(25, 25, 50, 0.05);
  --error: #dc3545;
  --error-text: #b42318;
  --font-sans: "Onest", "Segoe UI", system-ui, sans-serif;
  --error-bg: rgba(220, 53, 69, 0.1);
  --error-border: rgba(220, 53, 69, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  --site-header-offset: 110px;
  /* Smooth scrolling is handled in JS so hash correction is not fighting CSS smooth. */
  scroll-behavior: auto;
  /* Единственный native-offset под sticky header. Не дублировать scroll-margin на [id] —
     иначе padding+margin складываются и якорь уезжает слишком далеко. */
  scroll-padding-top: var(--site-header-offset);
  font-size: 16px;
  min-width: 0;
}

body {
  background-color: var(--light);
  font-family: var(--font-sans, "Onest", "Segoe UI", system-ui, sans-serif);
  color: var(--dark);
  line-height: 1.5;
  min-width: 0;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

.container,
main,
.section {
  max-width: 100%;
  min-width: 0;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

input[name="website"][aria-hidden="true"] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

body::before {
  content: none;
}

.section {
  padding: 90px 0;
  background-color: transparent;
  width: 100%;
}

.section-gray {
  background-color: var(--surface-section-muted);
  width: 100%;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: 24px;
  position: relative;
  letter-spacing: -0.02em;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 999px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 40px;
}

.section-heading .section-title,
.section-heading .section-subtitle {
  text-align: left;
  margin: 0;
}

/* Линия между заголовком и подзаголовком: в потоке, равные промежутки, по центру ширины блока */
.section-heading .section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.section-heading .section-title:after {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  align-self: center;
  margin: 0;
  flex-shrink: 0;
}

/* Явная линия под заголовком секции: слева, визуальная связка с подзаголовком */
.section-heading--rule-outside {
  gap: 0;
}

.section-heading--rule-outside .section-title {
  display: block;
  width: 100%;
  line-height: 1.18;
}

.section-heading--rule-outside .section-title::after {
  content: none;
  display: none;
}

.section-heading-rule {
  display: block;
  width: 72px;
  height: 4px;
  /* Визуально ближе к центру зазора: у заголовка «тяжёлый» line-height, без лишнего воздуха сверху */
  margin-top: 5px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--secondary);
  flex-shrink: 0;
}

.section-subtitle {
  text-align: center;
  max-width: min(768px, 90%);
  margin: 0 auto 50px;
  color: var(--gray);
  font-size: 1.1rem;
}
.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 1280px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 28px;
  }
.section-subtitle {
  font-size: 16px;
  padding: 0 15px;
  line-height: 1.6;
}
.section {
  padding: 75px 0;
}
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid CanvasText;
  }

  .btn,
  .header-action,
  .faq-question {
    border: 1px solid ButtonText;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Global button system (used beyond index page) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  background-color: var(--secondary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(34, 85, 245, 0.18);
}

.btn:hover {
  background-color: var(--secondary-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(34, 85, 245, 0.24);
}

.btn-outline {
  background-color: #fff;
  color: var(--secondary);
  border: 1px solid #dfe4f3;
}

.btn-outline:hover {
  background-color: #f2f5ff;
  color: var(--secondary);
}

.btn-accent {
  background-color: var(--accent);
  color: #1f1c1c;
}

.btn-accent:hover {
  background-color: #b4ea25;
}

/* Animation classes */
.fade-in {
  animation: fadeIn var(--motion-duration-slow) var(--motion-ease-emphasized) forwards;
}

.slide-up {
  animation: slideUp var(--motion-duration-slow) var(--motion-ease-emphasized) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
to {
  opacity: 1;
  transform: translateY(0);
}
}

/* Improved transitions */
a, button, .btn {
  transition:
  color var(--motion-duration-fast) var(--motion-ease-standard),
  background-color var(--motion-duration-fast) var(--motion-ease-standard),
  transform var(--motion-duration-base) var(--motion-ease-emphasized),
  box-shadow var(--motion-duration-base) var(--motion-ease-emphasized);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* CTA */
.cta-section {
  width: 100%;
  max-width: none;
  text-align: center;
  margin: 30px auto;
  padding: 32px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-md);
}

.cta-button {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 25px;
  background: white;
  color: var(--secondary);
  text-decoration: none;
  border-radius: 999px;
  font-weight: bold;
  transition: transform var(--motion-duration-base) var(--motion-ease-emphasized);
}

.cta-button:hover {
  transform: translateY(-2px);
}

/* Scroll-to-top lives in .float-actions (see chat-widget.css). */

/* Базовые стили для карт */
.footer .map-wrapper,
.main-footer .map-wrapper,
.contact-map {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: var(--border-radius);
  aspect-ratio: 16/9;
}

.map-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-static {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}

.map-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity var(--motion-duration-slow) var(--motion-ease-standard);
}

.map-iframe.loaded {
  opacity: 1;
}

/* Адаптивные корректировки */
@media (max-width: 768px) {
  .footer .map-wrapper,
  .main-footer .map-wrapper,
  .contact-map {
    aspect-ratio: 4/3;
  }
}

/* Стили для окна cookies — полоса по нижнему краю экрана (не перекрывает контент сбоку) */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0;
  border-left: none;
  border-top: 3px solid var(--secondary);
  box-shadow: 0 -8px 32px rgba(25, 25, 50, 0.12);
  z-index: 10000;
  display: none;
  animation: slideInUp var(--motion-duration-slow) var(--motion-ease-emphasized);
}

.cookie-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 28px) calc(14px + env(safe-area-inset-bottom, 0px));
}

.cookie-text {
  flex: 1 1 260px;
  min-width: 0;
}

.cookie-text h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.cookie-text p {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-text a {
  color: var(--secondary);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
}

.cookie-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: var(--transition);
}

.cookie-accept {
  background-color: var(--secondary);
  color: white;
}

.cookie-settings {
  background-color: transparent;
  border: 1px solid var(--secondary);
  color: var(--secondary);
}

.cookie-reject {
  background-color: transparent;
  border: 1px solid #ccc;
  color: var(--gray);
}

.cookie-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Модальное окно настроек */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  animation: fadeIn var(--motion-duration-base) var(--motion-ease-standard);
}

#urgentCallbackModal:not([hidden]),
#quickLeadModal:not([hidden]),
#docRequestModal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 25px;
  border-radius: var(--border-radius);
  max-width: 600px;
  width: min(100%, 600px);
  position: relative;
  animation: slideInDown var(--motion-duration-base) var(--motion-ease-emphasized);
  box-sizing: border-box;
}

#urgentCallbackModal .modal-content,
#quickLeadModal .modal-content,
#docRequestModal .modal-content {
  margin: 0;
  padding: 28px 28px 24px;
}

#urgentCallbackModal .modal-content h2,
#quickLeadModal .modal-content h2,
#docRequestModal .modal-content h2 {
  margin: 0 36px 10px 0;
  color: var(--primary);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.25;
}

#urgentCallbackModal .modal-content > p,
#quickLeadModal .modal-content > p,
#docRequestModal .modal-content > p {
  margin: 0 0 18px;
  color: var(--text-muted-strong, #4b4f64);
  line-height: 1.5;
}

#urgentCallbackModal .cta-modal-form .form-group,
#quickLeadModal .cta-modal-form .form-group,
#docRequestModal .cta-modal-form .form-group {
  margin-bottom: 16px;
}

#urgentCallbackModal .cta-modal-form .submit-btn,
#quickLeadModal .cta-modal-form .submit-btn,
#docRequestModal .cta-modal-form .submit-btn {
  margin-top: 4px;
}

#urgentCallbackModal .warranty2-privacy-note,
#quickLeadModal .warranty2-privacy-note,
#docRequestModal .warranty2-privacy-note {
  margin-top: 14px;
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--gray);
  border: none;
  background: transparent;
  padding: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.modal-close:focus {
  outline: none;
}

.modal-close:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.cookie-options {
  margin: 20px 0;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 15px;
}

.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: background-color var(--motion-duration-base) var(--motion-ease-standard);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: transform var(--motion-duration-base) var(--motion-ease-emphasized);
}

input:checked + .slider {
  background-color: var(--secondary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

.option-text h4 {
  margin-bottom: 5px;
  color: var(--primary);
}

.option-text p {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-save {
  background-color: var(--secondary);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.cookie-save:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Анимации */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
to {
  transform: translateY(0);
  opacity: 1;
}
}

@keyframes slideInDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
to {
  transform: translateY(0);
  opacity: 1;
}
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.cookie-banner-visible {
  padding-bottom: max(120px, env(safe-area-inset-bottom, 0px));
}

body.cookie-banner-visible .float-actions,
body.cookie-banner-visible .chat-widget,
body.cookie-banner-visible .callback-fab {
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  .cookie-text h3 {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .cookie-text p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .cookie-content {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .cookie-buttons {
    gap: 6px;
  }

  .cookie-btn {
    flex: 1 1 calc(50% - 6px);
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  body.cookie-banner-visible {
    padding-bottom: max(148px, env(safe-area-inset-bottom, 0px));
  }

  body.cookie-banner-visible .float-actions,
  body.cookie-banner-visible .chat-widget,
  body.cookie-banner-visible .callback-fab {
    bottom: calc(156px + env(safe-area-inset-bottom, 0px));
  }

  /* Keep primary in-page CTAs clear of the cookie strip while it is visible. */
  body.cookie-banner-visible .request-form,
  body.cookie-banner-visible .cta-section,
  body.cookie-banner-visible .hero-cta,
  body.cookie-banner-visible #callback-form {
    scroll-margin-bottom: 160px;
  }
}

.cookie-content {
  flex-direction: column;
  align-items: stretch;
  padding-top: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.cookie-buttons {
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
}

.cookie-btn {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 0;
  text-align: center;
  padding: 11px 10px;
  font-size: 0.9rem;
}

.modal-content {
  margin: 10% 5%;
  width: auto;
}
}

@media (max-width: 420px) {
  .cookie-buttons {
    flex-direction: column;
  }

.cookie-btn {
  flex: none;
  width: 100%;
}
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Не оставлять бесконечные маркью на последнем кадре — полный стоп в покое */
  .business-partners-scroller-track {
    animation: none !important;
    transform: none !important;
  }
}

/* Хлебные крошки (единый вид по всему сайту) */
.site-breadcrumb {
  padding: 14px 0 8px;
  font-size: 0.875rem;
  color: var(--gray);
}

.site-breadcrumb a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-breadcrumb a:hover {
  text-decoration: underline;
}

.site-breadcrumb__sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.site-breadcrumb__current {
  color: var(--primary);
}
