/* ============================================================
   МФЦ-Ритуал — Новый дизайн 2026
   Цвета: синий #2d3e7a, красный #c8232c, фон #f5f6f8
   ============================================================ */

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

:root {
  --navy:      #2d3e7a;
  --navy-dark: #1e2d5e;
  --navy-light:#eef0f8;
  --red:       #c8232c;
  --red-h:     #a81c24;
  --gray-bg:   #f5f6f8;
  --line:      #e2e5ef;
  --muted:     #6b7591;
  --text:      #1a1e2e;
  --white:     #ffffff;
  --r:         6px;
  --r-lg:      12px;
  --shadow:    0 2px 12px rgba(45,62,122,.10);
  --shadow-lg: 0 8px 32px rgba(45,62,122,.15);
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===================== TOPBAR ===================== */
.mfc-topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  padding: 7px 0;
}
.mfc-topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mfc-topbar__left { display: flex; align-items: center; gap: 20px; }
.mfc-topbar__badge {
  background: rgba(255,255,255,.12);
  border-radius: 4px;
  padding: 2px 9px;
  font-size: 12px;
  color: #fff;
}
.mfc-topbar__phone {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

/* ===================== HEADER ===================== */
.mfc-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.mfc-header__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}

/* Логотип */
.mfc-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.mfc-logo__img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.mfc-logo__text { line-height: 1.2; }
.mfc-logo__name {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.01em;
}
.mfc-logo__name span { color: var(--red); }
.mfc-logo__sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Разделитель */
.mfc-header__divider {
  width: 1px;
  height: 40px;
  background: var(--line);
  flex-shrink: 0;
}

/* Слоган в шапке */
.mfc-header__tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  flex-shrink: 0;
}
.mfc-header__tagline strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
}

/* Бейдж 20 лет */
.mfc-header__badge {
  background: var(--navy-light);
  border: 1.5px solid var(--navy);
  border-radius: var(--r);
  padding: 6px 14px;
  text-align: center;
  flex-shrink: 0;
}
.mfc-header__badge-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.mfc-header__badge-txt {
  font-size: 10px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Телефон в шапке */
.mfc-header__phone-wrap {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}
.mfc-header__phone {
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.mfc-header__phone:hover { color: var(--red-h); }
.mfc-header__phone-label {
  font-size: 11px;
  color: var(--muted);
}

/* Бургер */
.mfc-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.mfc-burger span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .2s;
}

/* ===================== НАВИГАЦИЯ ===================== */
.mfc-nav {
  background: var(--navy);
}
.mfc-nav__in {
  display: flex;
  align-items: stretch;
}
.mfc-nav__item {
  position: relative;
}
.mfc-nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background .15s;
  white-space: nowrap;
}
.mfc-nav__link:hover,
.mfc-nav__item:hover > .mfc-nav__link {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.mfc-nav__chevron {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* Dropdown */
.mfc-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 8px 0;
}
.mfc-nav__item:hover .mfc-dropdown { display: block; }
.mfc-dropdown a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--text);
  transition: background .1s;
}
.mfc-dropdown a:hover {
  background: var(--navy-light);
  color: var(--navy);
}
.mfc-dropdown__sep {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

/* Поиск в навигации */
.mfc-nav__search {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.mfc-nav__search form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mfc-nav__search input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r);
  padding: 6px 12px;
  font-size: 13px;
  color: #fff;
  width: 140px;
  transition: .2s;
}
.mfc-nav__search input::placeholder { color: rgba(255,255,255,.5); }
.mfc-nav__search input:focus {
  outline: none;
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.4);
  width: 180px;
}

/* ===================== МОБИЛЬНОЕ МЕНЮ ===================== */
.mfc-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 500;
  overflow-y: auto;
  padding: 0 0 32px;
}
.mfc-mobile-menu.open { display: block; }
.mfc-mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy);
}
.mfc-mobile-menu__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.mfc-mobile-menu__close svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.mfc-mobile-menu__phone {
  display: block;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  padding: 16px;
  margin: 0;
}
.mfc-m-link {
  display: block;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.mfc-m-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 600;
}
.mfc-m-group__toggle {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--navy);
  flex-shrink: 0;
}
.mfc-m-group__body { display: none; background: var(--gray-bg); }
.mfc-m-group__body.open { display: block; }
.mfc-m-sub {
  display: block;
  padding: 10px 20px 10px 32px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mfc-m-sub:hover { color: var(--navy); }

/* ===================== СЕКЦИИ ===================== */
.mfc-sec { padding: 56px 0; }
.mfc-sec--gray { background: var(--gray-bg); }
.mfc-sec__head { margin-bottom: 36px; }
.mfc-sec__head h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.mfc-sec__head p { color: var(--muted); font-size: 15px; }
.mfc-accent-line {
  display: inline-block;
  width: 40px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 14px;
}

/* ===================== КАРТОЧКИ УСЛУГ ===================== */
.mfc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mfc-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.mfc-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.mfc-card__icon {
  width: 48px;
  height: 48px;
  background: var(--navy-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.mfc-card__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--navy);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mfc-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.mfc-card p { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.mfc-card__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mfc-card__link:hover { color: var(--red); }

/* ===================== БЫСТРЫЕ ДЕЙСТВИЯ ===================== */
.mfc-quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mfc-quick__item {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s;
  display: block;
  line-height: 1.35;
}
.mfc-quick__item:hover { background: var(--navy-dark); color: #fff; }
.mfc-quick__item--red { background: var(--red); }
.mfc-quick__item--red:hover { background: var(--red-h); }

/* ===================== ПРАЙС ===================== */
.mfc-pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.mfc-pricing__group h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.mfc-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mfc-price-row:last-child { border-bottom: none; }
.mfc-price-row__name { font-size: 14px; color: var(--text); }
.mfc-price-row__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mfc-price-row__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===================== ПРЕИМУЩЕСТВА ===================== */
.mfc-adv {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mfc-adv__item {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
}
.mfc-adv__num {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
.mfc-adv__txt { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ===================== КНОПКИ ===================== */
.mfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 24px;
  cursor: pointer;
  transition: .15s;
  text-decoration: none;
}
.mfc-btn--red { background: var(--red); color: #fff; }
.mfc-btn--red:hover { background: var(--red-h); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(200,35,44,.3); }
.mfc-btn--navy { background: var(--navy); color: #fff; }
.mfc-btn--navy:hover { background: var(--navy-dark); color: #fff; }
.mfc-btn--outline { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.mfc-btn--outline:hover { background: var(--navy); color: #fff; }

/* ===================== CTA ПОЛОСА ===================== */
.mfc-cta-strip {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.mfc-cta-strip h2 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.mfc-cta-strip p { color: rgba(255,255,255,.75); font-size: 15px; }

/* ===================== ФУТЕР ===================== */
.mfc-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
}
.mfc-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mfc-footer__logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.mfc-footer__logo span { color: var(--red); }
.mfc-footer p { font-size: 14px; line-height: 1.65; }
.mfc-footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; }
.mfc-footer__links a {
  display: block;
  font-size: 14px;
  padding: 4px 0;
  color: rgba(255,255,255,.65);
  transition: color .1s;
}
.mfc-footer__links a:hover { color: #fff; }
.mfc-footer__phone {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: block;
  margin-bottom: 6px;
}
.mfc-footer__bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
}

/* ===================== FLOAT CTA ===================== */
.mfc-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.mfc-float__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 12px 20px 12px 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(200,35,44,.4);
  animation: mfc-pulse 2.5s infinite;
  transition: background .15s;
}
.mfc-float__btn:hover { background: var(--red-h); color: #fff; }
.mfc-float__btn svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

@keyframes mfc-pulse {
  0%   { box-shadow: 0 6px 20px rgba(200,35,44,.4), 0 0 0 0 rgba(200,35,44,.35); }
  70%  { box-shadow: 0 6px 20px rgba(200,35,44,.4), 0 0 0 14px rgba(200,35,44,0); }
  100% { box-shadow: 0 6px 20px rgba(200,35,44,.4), 0 0 0 0 rgba(200,35,44,0); }
}

/* ===================== КОНТЕНТ ВНУТРИ ===================== */
.mfc-inner-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.mfc-inner-layout--wide { grid-template-columns: 1fr; }

/* Хлебные крошки */
.mfc-breadcrumb {
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
}
.mfc-breadcrumb a { color: var(--muted); }
.mfc-breadcrumb a:hover { color: var(--navy); }
.mfc-breadcrumb span { margin: 0 6px; }

/* Page hero для внутренних */
.mfc-page-hero {
  background: var(--navy);
  padding: 36px 0 32px;
  margin-bottom: 0;
}
.mfc-page-hero h1 {
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.mfc-page-hero p { color: rgba(255,255,255,.75); font-size: 15px; }

/* Боковая панель агента (вызов) */
.mfc-sidebar-agent {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 24px;
  color: #fff;
  position: sticky;
  top: 90px;
}
.mfc-sidebar-agent h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.mfc-sidebar-agent p { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 16px; line-height: 1.5; }
.mfc-sidebar-phone {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.mfc-sidebar-agent .mfc-btn {
  width: 100%;
  margin-bottom: 8px;
  font-size: 14px;
}

/* Текстовый контент */
.mfc-content h1, .mfc-content h2, .mfc-content h3 {
  color: var(--navy);
  font-weight: 700;
  margin: 20px 0 10px;
}
.mfc-content h1 { font-size: clamp(22px, 2.4vw, 30px); }
.mfc-content h2 { font-size: 22px; }
.mfc-content h3 { font-size: 18px; }
.mfc-content p { margin-bottom: 14px; line-height: 1.7; }
.mfc-content ul, .mfc-content ol { padding-left: 20px; margin-bottom: 14px; }
.mfc-content li { margin-bottom: 6px; line-height: 1.6; }
.mfc-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.mfc-content td, .mfc-content th { padding: 10px 14px; border: 1px solid var(--line); font-size: 14px; }
.mfc-content th { background: var(--navy-light); font-weight: 700; color: var(--navy); }

/* ===================== АДАПТИВ ===================== */
@media (max-width: 1024px) {
  .mfc-cards { grid-template-columns: repeat(2, 1fr); }
  .mfc-adv { grid-template-columns: repeat(2, 1fr); }
  .mfc-footer__cols { grid-template-columns: 1fr 1fr; }
  .mfc-header__badge { display: none; }
  .mfc-header__tagline { display: none; }
}

@media (max-width: 768px) {
  .mfc-header__in { height: 64px; }
  .mfc-logo__name { font-size: 17px; }
  .mfc-logo__sub { display: none; }
  .mfc-nav { display: none; }
  .mfc-burger { display: flex; }
  .mfc-header__phone { font-size: 18px; }
  .mfc-header__phone-label { display: none; }
  .mfc-cards { grid-template-columns: 1fr; }
  .mfc-pricing { grid-template-columns: 1fr; }
  .mfc-adv { grid-template-columns: repeat(2, 1fr); }
  .mfc-cta-strip { flex-direction: column; padding: 28px 24px; }
  .mfc-footer__cols { grid-template-columns: 1fr; gap: 24px; }
  .mfc-sec { padding: 36px 0; }
  .mfc-inner-layout { grid-template-columns: 1fr; }
  .mfc-topbar { display: none; }
}

@media (max-width: 480px) {
  .mfc-adv { grid-template-columns: 1fr 1fr; }
  .mfc-float__btn span { display: none; }
  .mfc-float__btn { padding: 14px; border-radius: 50%; }
}

/* Битрикс панель */
#panel { position: relative; z-index: 1000; }

/* Убираем старые стили Bootstrap которые могут мешать */
.row { margin-bottom: 0; }
