/* ============================================================
   МЦ — МеталлЦентр, Чита. Портал mc-portal-chita
   Единый каркас портала (этап 2): шапка с МЦ-знаком,
   двухуровневое меню, кнопки, формы, подвал, мобильная CTA-панель
   Эталон стиля: avtovoz-mc. Фон #0f172a/#1e293b, жёлтый акцент,
   шрифты Unbounded + Inter, radius 16/8
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  --bg-dark: #0f172a;
  --bg-deep: #0b1120;
  --bg-light: #f8fafc;
  --bg-card: #1e293b;
  --accent: #ffb347;        /* жёлтый акцент МЦ */
  --accent-dark: #ff8c00;
  --accent-light: #feedba;
  --red: #ef4444;
  --red-dark: #dc2626;
  /* Фирменные цвета мессенджера MAX (как на исходных сайтах) */
  --max-blue: #1890f0;
  --max-purple: #7848d8;
  --max-violet: #9048d8;
  --white: #ffffff;
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-soft: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.18);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, .font-display { font-family: 'Unbounded', sans-serif; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 700; }
.accent { color: var(--accent); }
.center { text-align: center; }

.section-label {
  display: inline-block; color: var(--accent); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--text-muted); max-width: 640px; margin: 0 auto 30px; font-size: 1rem; }
.center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: var(--transition); text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text-dark); box-shadow: 0 4px 16px rgba(255,179,71,0.35);
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--accent-light); border: 2px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-red { background: var(--red); color: var(--white); box-shadow: 0 4px 16px rgba(239,68,68,0.4); }
.btn-red:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-max {
  background: linear-gradient(110deg, var(--max-blue) 0%, var(--max-purple) 30%, var(--max-violet) 52%, var(--max-purple) 74%, var(--max-blue) 100%);
  background-size: 280% 100%; color: var(--white); border: none;
  box-shadow: 0 4px 16px rgba(120,72,216,0.45);
  animation: maxShimmer 3.2s linear infinite;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-max:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(120,72,216,0.6); }
.btn-max img { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }
@keyframes maxShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 280% 50%; }
}
@media (prefers-reduced-motion: reduce) { .btn-max { animation: none; } }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,23,42,0.97); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.logo-badge { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white); font-family: 'Unbounded', sans-serif; font-weight: 700;
  font-size: 0.95rem; padding: 8px 12px; border-radius: var(--radius-sm);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.logo-text b { color: var(--white); font-size: 1rem; display: block; line-height: 1.2; }
.logo-text small { color: var(--text-muted); font-size: 0.72rem; }
.header-phones { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.header-phones a {
  color: var(--white); text-decoration: none; font-weight: 700;
  font-family: 'Unbounded', sans-serif; font-size: 0.98rem; line-height: 1.35;
}
.header-phones a:hover { color: var(--accent); }
.header-phones small { color: var(--text-muted); font-size: 0.68rem; }
.header-cta { display: flex; gap: 10px; }
.header-cta .btn { padding: 10px 20px; font-size: 0.92rem; }


/* ===== Свой призыв в шапке (этап 13) ===== */
.header-usp { display: none; }
@media (min-width: 761px) {
  .header-usp {
    display: block; padding: 7px 16px 8px;
    border-left: 3px solid var(--accent);
    background: rgba(255,179,71,0.09);
    border-radius: 0 10px 10px 0;
  }
  .header-usp b { display: block; color: var(--white); font-size: 0.86rem; line-height: 1.3; }
  .header-usp small { display: block; color: var(--accent-light); font-size: 0.74rem; font-weight: 600; line-height: 1.35; }
}
@media (max-width: 760px) {
  .logo-text small { color: var(--accent); font-weight: 600; }
}

/* ===== Карточки услуг с фото (этап 13) ===== */
.service-card.with-photo { padding-top: 0; }
.service-card.with-photo .card-photo {
  width: calc(100% + 44px); margin: 0 -22px 16px;
  height: 172px; object-fit: cover;
}

/* ===== Меню портала: двухуровневое ===== */
.site-nav { border-top: 1px solid rgba(255,255,255,0.06); }
.nav-toggle {
  display: none; width: 100%; background: none; border: none; color: var(--white);
  font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 700;
  padding: 11px 0; cursor: pointer; text-align: left; position: relative;
}
.nav-toggle::after {
  content: ''; position: absolute; right: 6px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-50%) rotate(225deg); }
.menu {
  display: flex; align-items: center; gap: 4px; padding: 6px 0 9px;
  list-style: none; flex-wrap: wrap;
}
.menu li { position: relative; }
.menu > li > a {
  display: block; flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  color: var(--text-muted); font-size: 0.86rem; font-weight: 600; text-decoration: none;
  transition: var(--transition); white-space: nowrap;
}
.menu > li > a:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.menu > li > a.active { color: var(--text-dark); background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.menu > li > a.parent::after {
  content: '▾'; margin-left: 5px; font-size: 0.72rem; opacity: 0.7;
}
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 110;
  min-width: 250px; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  padding: 8px; list-style: none; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: var(--transition);
}
.submenu li a {
  display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none;
  color: var(--text-light); font-size: 0.88rem; font-weight: 500; line-height: 1.35;
}
.submenu li a small { display: block; color: var(--text-muted); font-size: 0.74rem; font-weight: 400; }
.submenu li a:hover { background: rgba(255,179,71,0.14); color: var(--accent-light); }
.submenu li a:hover small { color: var(--text-muted); }
/* Десктоп: раскрытие по наведению и клавиатурному фокусу.
   Без (hover: hover) — на гибридных устройствах оно ложно отсекает меню. */
@media (min-width: 761px) {
  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
}
/* Мобильный: меню-кнопка + аккордеон */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .menu {
    display: none; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 4px 0 12px;
  }
  .menu.open { display: flex; }
  .menu > li > a { border-radius: 8px; padding: 10px 14px; font-size: 0.95rem; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: rgba(255,255,255,0.04);
    display: none; padding: 2px 0 6px 10px; min-width: 0;
  }
  .submenu.open { display: block; }
  .submenu li a { padding: 8px 12px; }
  .has-submenu > a.parent::after { content: '▸'; }
  .has-submenu.open > a.parent::after { content: '▾'; }
}
/* Десктоп: прячем тумблер, меню всегда видно */
@media (min-width: 761px) {
  .menu { display: flex !important; flex-wrap: wrap; }
}

/* ===== Хлебные крошки ===== */
.breadcrumbs { font-size: 0.8rem; color: var(--text-muted); padding: 14px 0 0; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 7px; opacity: 0.5; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,179,71,0.14), transparent 70%),
    radial-gradient(ellipse 50% 60% at 15% 80%, rgba(255,140,0,0.08), transparent 70%),
    var(--bg-dark);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.hero h1 { margin-bottom: 14px; }
.hero .subtitle { color: var(--text-muted); font-size: 1.08rem; margin-bottom: 10px; max-width: 620px; }
.hero .price-line { font-size: 1.05rem; font-weight: 600; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-caption { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 26px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card {
  background: rgba(30,41,59,0.75); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.stat-card b { display: block; font-family: 'Unbounded', sans-serif; font-size: 1.02rem; color: var(--accent); }
.stat-card span { color: var(--text-muted); font-size: 0.78rem; line-height: 1.4; display: block; margin-top: 4px; }

/* ===== Карточка формы ===== */
.lead-form-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 26px 24px;
}
.lead-form-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.lead-form-card > p { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 16px; }
.lead-form-card input {
  width: 100%; padding: 13px 15px; margin-bottom: 10px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.16); background: rgba(15,23,42,0.65);
  color: var(--text-light); font-family: 'Inter', sans-serif; font-size: 0.95rem;
}
.lead-form-card input::placeholder { color: rgba(148,163,184,0.75); }
.lead-form-card input:focus { outline: none; border-color: var(--accent); }
.form-success, .form-error { display: none; font-size: 0.88rem; padding: 11px 14px; border-radius: var(--radius-sm); margin-top: 10px; }
.form-success { background: rgba(34,197,94,0.14); color: #4ade80; border: 1px solid rgba(34,197,94,0.4); }
.form-error { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.form-note { color: var(--text-muted); font-size: 0.8rem; margin-top: 12px; }
.form-note a { color: var(--accent-light); }

/* ===== Сетки услуг/карточек ===== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column;
  transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  opacity: 0; transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: rgba(255,179,71,0.35); }
.service-card:hover::before { opacity: 1; }
.service-card h3 { margin-bottom: 8px; color: var(--white); }
.service-card p { color: var(--text-muted); font-size: 0.9rem; flex: 1; margin-bottom: 14px; }
.service-card .service-tag {
  display: inline-block; font-family: 'Unbounded', sans-serif; font-weight: 700;
  font-size: 0.95rem; color: var(--accent); margin-bottom: 14px;
}
.service-card .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.service-card .card-actions .btn { padding: 10px 16px; font-size: 0.85rem; flex: 1; }
.service-card .card-actions .btn-phone { background: rgba(255,255,255,0.07); color: var(--accent-light); border: 1px solid rgba(255,255,255,0.14); }
.service-card .card-actions .btn-phone:hover { border-color: var(--accent); transform: none; filter: none; }
.service-card.soon { opacity: 0.72; }
.service-card.soon .service-tag { color: var(--text-muted); }

/* ===== Блок «Кто такой МЦ» ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 14px; font-size: 0.98rem; }
.about-text p b { color: var(--text-light); }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.fact-card b { display: block; font-family: 'Unbounded', sans-serif; font-size: 1.1rem; color: var(--accent); }
.fact-card span { color: var(--text-muted); font-size: 0.8rem; }

/* ===== Таблица цен автовозов ===== */
.dir-table { max-width: 880px; margin: 0 auto; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.dir-row { display: grid; grid-template-columns: 1.3fr 0.8fr 0.9fr; gap: 10px; padding: 15px 22px; border-bottom: 1px solid rgba(255,255,255,0.07); align-items: center; font-size: 0.97rem; }
.dir-row.head { background: rgba(255,179,71,0.1); font-weight: 700; color: var(--accent); font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase; }
.dir-row:last-child { border-bottom: none; }
.dir-price { font-family: 'Unbounded', sans-serif; font-weight: 700; color: var(--accent); }

/* ===== Адреса ===== */
.addr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.addr-card {
  display: flex; gap: 12px; align-items: flex-start; text-decoration: none;
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 15px 17px; transition: var(--transition);
}
.addr-card:hover { border-color: rgba(255,179,71,0.4); transform: translateY(-2px); }
.addr-pin { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; background: rgba(255,179,71,0.15); display: flex; align-items: center; justify-content: center; }
.addr-pin svg { width: 17px; height: 17px; stroke: var(--accent); }
.addr-card b { display: block; color: var(--text-light); font-size: 0.92rem; }
.addr-card span { color: var(--text-muted); font-size: 0.82rem; }

/* ===== Контакты ===== */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 880px; margin: 0 auto; }
.contact-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius); padding: 26px 24px; text-align: center; }
.contact-card .contact-role { color: var(--text-muted); font-size: 0.84rem; margin-bottom: 6px; }
.contact-card .contact-phone { font-family: 'Unbounded', sans-serif; font-size: 1.25rem; color: var(--accent); text-decoration: none; display: block; margin-bottom: 6px; }
.contact-card .contact-phone:hover { color: var(--accent-light); }
.contact-card small { color: var(--text-muted); font-size: 0.78rem; }
.contact-max { text-align: center; margin-top: 18px; }

/* ===== Подвал ===== */
.site-footer { background: var(--bg-deep); color: var(--text-muted); padding: 36px 0 30px; text-align: center; font-size: 0.86rem; }
.site-footer .routes-line { margin-bottom: 10px; line-height: 2; }
.site-footer .routes-line a { color: #cbd5e1; text-decoration: none; white-space: nowrap; }
.site-footer .routes-line a:hover { color: var(--accent); }
.site-footer .footer-sep { margin: 0 6px; opacity: 0.5; }
.footer-req { margin-top: 14px; font-size: 0.76rem; color: #64748b; line-height: 1.7; }
.footer-req b { color: #94a3b8; font-weight: 600; }
.site-footer .footer-note { margin-top: 8px; font-size: 0.74rem; color: #475569; }

/* ===== Мобильная CTA-панель ===== */
.mobile-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  display: none; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15,23,42,0.97); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-cta-bar .btn { flex: 1; padding: 12px 8px; font-size: 0.92rem; }

/* ===== Адаптив ===== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header-phones, .header-cta .btn-ghost { display: none; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .addr-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .dir-row { grid-template-columns: 1.2fr 0.7fr 0.9fr; padding: 12px 14px; font-size: 0.87rem; gap: 6px; }
}
@media (max-width: 560px) {
  .header-inner { gap: 10px; padding: 10px 0; }
  .logo-text b { font-size: 0.88rem; }
  .header-cta .btn { padding: 9px 14px; font-size: 0.86rem; }
  .hero { padding: 48px 0 56px; }
  section { padding: 52px 0; }
}
@media (max-width: 760px) {
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 74px; }
}

/* ============================================================
   Вставки призыва между блоками (этап 5) — как на автовозе:
   после каждой секции .inline-cta, кнопка призыва .btn-cta —
   спокойный алый с мягким переливом
   ============================================================ */
.inline-cta { padding: 0 24px; margin: -34px 0 0; position: relative; z-index: 2; }
.inline-cta-inner {
  max-width: 1160px; margin: 0 auto;
  background: linear-gradient(135deg, #161d29, #10151e);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 4px solid #c8444c;
  border-radius: var(--radius); padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.35);
}
.inline-cta-text h3 { color: var(--white); font-size: 1.08rem; margin-bottom: 4px; }
.inline-cta-text p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input {
  width: 170px; padding: 12px 14px; border: 2px solid transparent; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; background: var(--white); color: var(--text-dark);
}
.inline-form input:focus { outline: none; border-color: #c8444c; }
.inline-form .form-success, .inline-form .form-error { width: 100%; margin-top: 4px; }

/* Кнопка призыва — спокойный алый, мягкий перелив */
.btn-cta {
  background: linear-gradient(120deg, #b03a42, #e05c5c, #d0464e, #b03a42);
  background-size: 300% 300%;
  animation: cta-shimmer 5s ease-in-out infinite;
  color: var(--white); white-space: nowrap; padding: 13px 22px;
  box-shadow: 0 6px 20px rgba(192, 56, 62, 0.35);
}
.btn-cta:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(192, 56, 62, 0.45); }
@keyframes cta-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) { .btn-cta { animation: none; } }

@media (max-width: 900px) { .inline-cta { margin-top: -20px; } }
@media (max-width: 760px) {
  .inline-cta { padding: 0 14px; }
  .inline-cta-inner { flex-direction: column; align-items: stretch; padding: 20px 18px; }
  .inline-cta-text { text-align: center; }
  .inline-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .inline-form input { width: 100%; }
  .inline-form .btn { grid-column: 1 / -1; }
  .inline-form .form-success, .inline-form .form-error { grid-column: 1 / -1; }
}
