/* ==========================================================================
   АКТ-ЭКСПЕРТ (akt-expert.ru) — СТИЛИ САЙТА ЭКСПЕРТИЗЫ
   ========================================================================== */

:root {
  --primary: #0f4c81;
  --primary-dark: #0a3357;
  --primary-light: #e6f0fa;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --danger: #ef4444;
  --success: #10b981;
  --dark: #0f172a;
  --slate: #334155;
  --muted: #64748b;
  --light-bg: #f8fafc;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--slate);
  background-color: var(--light-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Headings with balanced wrapping and fluid sizing */
h1, h2, h3, h4, h5, h6,
.hero-title, .section-title, .service-card-title,
.modal-title, .price-box__title, .advantage-title, .process-title {
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: balance;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  letter-spacing: -0.015em;
}

p, li, td, th, blockquote, figcaption {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.top-bar {
  background-color: var(--dark);
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar__item a {
  color: #cbd5e1;
}

.top-bar__item a:hover {
  color: #ffffff;
}

.header-main {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.custom-logo-wrap,
.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo-wrap img,
.custom-logo-link img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 76, 129, 0.3);
}

.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.logo-text p {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.header-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-phone-box {
  text-align: right;
  white-space: nowrap;
}

.header-phone-box .phone-num {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--dark);
  display: block;
  white-space: nowrap;
}

.header-phone-box .phone-desc {
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 600;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
}

.btn-accent:hover {
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--border);
  background: #fff;
  color: var(--slate);
}

.btn-outline:hover {
  background: var(--light-bg);
  border-color: var(--muted);
  color: var(--dark);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Burger Toggle for Mobile */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--dark);
  transition: var(--transition);
}

/* Mobile Menu Drawer & Backdrop (hidden by default on desktop) */
.mobile-menu-drawer {
  display: none;
}
.mobile-drawer-backdrop {
  display: none;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: #94a3b8;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs .current {
  color: var(--slate);
  font-weight: 500;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, #0b223d 0%, #11385f 60%, #1e4976 100%);
  color: #ffffff;
  padding: 65px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  color: #e0f2fe;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-badge svg {
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(1.65rem, 4vw + 0.5rem, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

.hero-title span {
  color: #38bdf8;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw + 0.3rem, 1.12rem);
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 28px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-val {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

/* Quick Inquiry Card in Hero */
.hero-card {
  background: #ffffff;
  color: var(--slate);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.hero-card-title {
  font-size: clamp(1.15rem, 2vw + 0.3rem, 1.35rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  text-wrap: balance;
}

.hero-card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--dark);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.form-policy {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.4;
}

/* ==========================================================================
   SERVICES GRID (4 DIRECTIONS)
   ========================================================================== */

.section {
  padding: 50px 0;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.35rem, 3vw + 0.4rem, 2.1rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
  text-wrap: balance;
}

.section-desc {
  font-size: clamp(0.9rem, 1.2vw + 0.3rem, 1.02rem);
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.service-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: var(--slate);
}

.service-card-title {
  font-size: clamp(1.1rem, 1.8vw + 0.2rem, 1.25rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

.service-card-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.service-feature-list {
  list-style: none;
  margin-bottom: 22px;
}

.service-feature-list li {
  font-size: 0.82rem;
  color: var(--slate);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.service-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
}

.service-card__foot {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.service-price-block .price-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}

.service-price-block .price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* ==========================================================================
   PRICE TABLES & ACCORDIONS
   ========================================================================== */

.price-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.price-box__head {
  background: #f8fafc;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.price-box__title {
  font-size: clamp(1.1rem, 2vw + 0.2rem, 1.25rem);
  font-weight: 700;
  color: var(--dark);
  text-wrap: balance;
}

.price-box__note {
  font-size: 0.82rem;
  color: var(--muted);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0;
  position: relative;
  background:
    linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 30px 100%, 30px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.price-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.price-table th {
  background-color: #f1f5f9;
  color: var(--dark);
  font-weight: 700;
  text-align: left;
  padding: 12px 18px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.price-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.price-table tr:last-child td {
  border-bottom: none;
}

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

.price-cell-cost {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.price-cell-term {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.price-code {
  display: inline-block;
  font-weight: 700;
  color: var(--slate);
  font-size: 0.82rem;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Accordion for complex prices */
.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.accordion-header:hover {
  background-color: #f8fafc;
}

.accordion-header::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--secondary);
  transition: var(--transition);
}

.accordion-item.open .accordion-header::after {
  content: "−";
}

.accordion-body {
  display: none;
  padding: 0 20px 20px;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* ==========================================================================
   QUESTIONS & COURT FORMULATIONS
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-input-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.search-input-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.question-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.question-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow);
}

.question-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 6px;
  display: inline-block;
}

.question-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.question-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

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

/* Document template code container */
.doc-template-code {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.55;
}

/* ==========================================================================
   CALCULATOR COMPONENT
   ========================================================================== */

.calc-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 36px;
}

.calc-step {
  margin-bottom: 24px;
}

.calc-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.calc-option-label {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.calc-option-label input {
  display: none;
}

.calc-option-label.active, .calc-option-label:has(input:checked) {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.calc-summary-panel {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-price-display {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.calc-price-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.calc-price-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ==========================================================================
   ADVANTAGES & PROCESS
   ========================================================================== */

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

.advantage-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.advantage-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.advantage-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.advantage-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.advantage-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Process Timeline */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  position: relative;
}

.process-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.process-step {
  font-size: 2rem;
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1;
  margin-bottom: 12px;
}

.process-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.process-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.modal-window {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-window {
  transform: translateY(0);
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

/* Toast Container */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.footer-contact-item a {
  color: #cbd5e1;
}

.footer-contact-item a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1160px) {
  .hero-grid, .calc-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .main-nav {
    display: none;
  }
  .burger-btn {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mobile-menu-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 320px);
    height: 100%;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 24px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    overflow-y: auto;
  }
  .mobile-menu-drawer.open {
    transform: translateX(0);
    visibility: visible;
  }
  .mobile-drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  .mobile-drawer-backdrop.open {
    display: block;
  }
  .mobile-nav-links {
    list-style: none;
    margin-top: 24px;
  }
  .mobile-nav-links li {
    margin-bottom: 14px;
  }
  .mobile-nav-links a {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    display: block;
    padding: 6px 0;
  }
  .mobile-nav-links a.active {
    color: var(--primary);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 38px 0;
  }
  .hero {
    padding: 42px 0 36px;
  }
  .price-box {
    padding: 20px 16px;
    margin-bottom: 24px;
  }
  .price-box__head {
    padding: 14px 16px;
  }
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
  }
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .search-input-box {
    min-width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .top-bar {
    display: none;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .calc-options-grid {
    grid-template-columns: 1fr 1fr;
  }
  .price-table {
    min-width: 520px;
  }
  .price-table th, .price-table td {
    padding: 10px 12px;
    font-size: 0.84rem;
  }
  .header-action .btn {
    display: none;
  }
  .header-phone-box {
    display: none;
  }
  .logo-text p {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  .logo {
    gap: 8px;
  }
  .logo-badge {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .logo-text h1 {
    font-size: 1.15rem;
  }
  .hero-grid .btn {
    width: 100%;
  }
  .hero-card, .service-card, .calc-box {
    padding: 20px 14px;
  }
  .price-box {
    padding: 16px 12px;
  }
  .service-card__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .service-card__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .service-card__actions .btn {
    width: 100%;
    padding: 8px 6px;
    font-size: 0.78rem;
  }
  .question-actions {
    flex-direction: column;
  }
  .question-actions .btn {
    width: 100%;
  }
  .logo-text p {
    display: none;
  }
  .calc-options-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RESPONSIVE GRID UTILITIES
   ========================================================================== */

.grid-auto-280 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.grid-auto-300 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.grid-auto-240 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}

.grid-split-60-40 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.grid-halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-split-60-40, .grid-halves {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ==========================================================================
   FLOATING ACTION BUTTON: ОСТАВИТЬ ЗАЯВКУ
   ========================================================================== */

.floating-cta-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 990;
}

.btn-floating-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  padding: 13px 22px;
  border-radius: 9999px;
  font-size: 0.98rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.55), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  text-decoration: none;
}

.btn-floating-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 30px -8px rgba(245, 158, 11, 0.65);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.btn-floating-pulse {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 9999px;
  border: 2px solid #f59e0b;
  animation: floatingPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

@keyframes floatingPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.28);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  /* Hide corner floating button on mobile in favor of bottom bar */
  .floating-cta-container {
    display: none;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   MOBILE STICKY BOTTOM BAR (Ultra-convenient on Smartphones)
   ========================================================================== */

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 980;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }
}

.mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 54px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-bar-item:active {
  transform: scale(0.92);
}

.mobile-bar-item.active, .mobile-bar-item:hover {
  color: var(--primary);
}

.mobile-bar-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 8px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  position: relative;
  transition: var(--transition);
  margin: -10px 4px 0;
}

.mobile-bar-cta:active {
  transform: scale(0.94);
}

.mobile-cta-pulse {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 9999px;
  border: 2px solid #f59e0b;
  animation: floatingPulse 2s infinite;
  pointer-events: none;
}

/* ==========================================================================
   SCROLL TO TOP BUTTON
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 970;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.scroll-top-btn:active {
  transform: scale(0.9);
}

@media (min-width: 769px) {
  .scroll-top-btn {
    bottom: 30px;
    right: 230px; /* Sits to the left of the floating CTA button on desktop */
  }
}

/* ==========================================================================
   BOTTOM SHEET MODAL (Native App Feel on Mobile)
   ========================================================================== */

.modal-drag-handle {
  display: none;
  width: 42px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 9999px;
  margin: 10px auto 4px;
}

@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-window {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .modal-backdrop.show .modal-window {
    transform: translateY(0);
  }

  .modal-drag-handle {
    display: block;
  }

  .modal-head {
    padding: 14px 20px;
  }

  .modal-body {
    padding: 16px 20px 24px;
  }
}

/* Touch targets and tap ergonomics */
.btn:active, .filter-btn:active, .accordion-header:active {
  transform: scale(0.98);
}

/* Responsive tables with horizontal scroll hint */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Contact page responsive layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 50px;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   WordPress Dynamic Content & Typography (.user-content)
   ========================================================================== */
.user-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--slate);
}

.user-content h1, .user-content h2, .user-content h3, .user-content h4, .user-content h5, .user-content h6 {
  color: var(--dark);
  font-weight: 700;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}

.user-content h1:first-child, .user-content h2:first-child, .user-content h3:first-child {
  margin-top: 0;
}

.user-content h1 { font-size: 2rem; }
.user-content h2 { font-size: 1.5rem; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
.user-content h3 { font-size: 1.25rem; }
.user-content h4 { font-size: 1.1rem; }

.user-content p {
  margin-bottom: 1.25em;
}

.user-content ul, .user-content ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}

.user-content li {
  margin-bottom: 0.5em;
}

.user-content blockquote {
  border-left: 4px solid var(--secondary);
  padding: 12px 20px;
  background: #f1f5f9;
  margin: 1.5em 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--dark);
}

.user-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1em 0;
}

.user-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.user-content th, .user-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.user-content th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--dark);
}

.user-content a {
  color: var(--secondary);
  text-decoration: underline;
}

.user-content a:hover {
  color: var(--secondary-hover);
}

/* ==========================================================================
   WordPress Block System & Twenty Twenty-Four Alignment Support
   ========================================================================== */
.alignwide {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Palette utility classes matching theme.json */
.has-primary-color { color: #09203f !important; }
.has-primary-background-color { background-color: #09203f !important; }

.has-secondary-color { color: #0284c7 !important; }
.has-secondary-background-color { background-color: #0284c7 !important; }

.has-accent-color { color: #f59e0b !important; }
.has-accent-background-color { background-color: #f59e0b !important; }

.has-dark-color { color: #0f172a !important; }
.has-slate-color { color: #334155 !important; }
.has-muted-color { color: #64748b !important; }
.has-light-background-color { background-color: #f8fafc !important; }
.has-white-background-color { background-color: #ffffff !important; }
.has-white-color { color: #ffffff !important; }

/* WP Block Columns & Groups */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 782px) {
  .wp-block-columns {
    flex-wrap: nowrap;
  }
}

.wp-block-column {
  flex: 1;
  min-width: 0;
}

.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.wp-block-button__link {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
}

.wp-block-button__link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}


