/* ============ Переменные ============ */
:root {
  --color-navy: #10233f;
  --color-navy-light: #1c3a63;
  --color-gold: #b8935a;
  --color-gold-light: #d4b483;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-text: #1c1f26;
  --color-text-muted: #5b6472;
  --color-border: #e2e5ea;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --container-width: 1280px;
  --shadow: 0 4px 20px rgba(16, 35, 63, 0.08);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-navy); text-decoration: none; }
a:hover { color: var(--color-gold); }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 700; color: var(--color-navy); overflow-wrap: break-word; }
p { margin: 0 0 1em; overflow-wrap: break-word; }
button { font-family: inherit; cursor: pointer; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-navy); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius); font-weight: 600; font-size: 15px;
  border: 2px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--color-gold); color: #fff; }
.btn-primary:hover { background: var(--color-navy); color: #fff; }
.btn-outline { border-color: var(--color-navy); color: var(--color-navy); background: transparent; }
.btn-outline:hover { background: var(--color-navy); color: #fff; }
.btn-block { display: flex; width: 100%; margin-bottom: 12px; }

/* ============ Шапка ============ */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: #fff; z-index: 200;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; gap: 24px;
}
.logo img { display: block; }

.main-nav { flex: 1; }
.main-menu {
  display: flex; align-items: center; gap: 28px; justify-content: center;
}
.main-menu > li { position: relative; }
.main-menu > li > a {
  font-weight: 600; color: var(--color-navy); font-size: 15px; padding: 8px 0; display: block;
}
.main-menu > li > a:hover { color: var(--color-gold); }

.has-dropdown .dropdown {
  display: none; position: absolute; top: 100%; left: 0; background: #fff;
  box-shadow: var(--shadow); border-radius: var(--radius); min-width: 240px; padding: 8px 0;
  border: 1px solid var(--color-border);
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 10px 18px; font-size: 14px; font-weight: 500; }
.dropdown li a:hover { background: var(--color-bg-alt); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-call { display: none; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; padding: 0;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-navy); }

/* ============ Герой / общие секции ============ */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: #fff; padding: 72px 0;
}
.hero-tagline {
  color: var(--color-gold); font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; font-size: 14px; margin-bottom: 12px;
}
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 44px); max-width: 760px; }
.hero p.lead { color: rgba(255,255,255,.85); font-size: 18px; max-width: 620px; margin-bottom: 28px; }
.hero .btn-group { display: flex; gap: 14px; flex-wrap: wrap; }

section { padding: 64px 0; }
section.alt { background: var(--color-bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--color-text-muted); }

/* ============ Сетки карточек ============ */
.grid {
  display: grid; gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 28px; transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon { font-size: 32px; margin-bottom: 12px; display: block; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card h3 a { color: var(--color-navy); }
.card p { color: var(--color-text-muted); font-size: 14.5px; margin-bottom: 0; }

/* Карточка адвоката */
.lawyer-card { text-align: center; }
.lawyer-card img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px;
}
.lawyer-card h3 { margin-bottom: 4px; font-size: 18px; }
.lawyer-card .position { color: var(--color-gold); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.lawyer-card .experience { color: var(--color-text-muted); font-size: 13.5px; }

/* Карточка статьи */
.article-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.article-card .date { color: var(--color-text-muted); font-size: 13px; margin-bottom: 6px; display: block; }

/* ============ Страница адвоката / статьи (детальная) ============ */
.detail-hero { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 48px 0; align-items: start; }
.detail-hero img { border-radius: var(--radius); width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tag { background: var(--color-bg-alt); color: var(--color-navy); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }

.breadcrumbs { font-size: 13.5px; color: var(--color-text-muted); padding: 18px 0; }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-gold); }

article.prose { max-width: 760px; margin: 0 auto; }
article.prose h2 { margin-top: 1.4em; font-size: 22px; }
article.prose ul, article.prose ol { padding-left: 1.4em; margin-bottom: 1em; }
article.prose li { margin-bottom: 0.4em; }
article.prose .stat { display: inline-block; margin-top: 0.6em; padding: 8px 16px; background: var(--color-bg-alt); border-radius: var(--radius); color: var(--color-navy); }
article.prose .stat strong { color: var(--color-gold); }

/* ============ Форма контактов / карта ============ */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contacts-info .btn { margin-right: 10px; margin-bottom: 10px; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); }
.map-embed iframe { width: 100%; height: 420px; border: 0; display: block; }
.messenger-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }

/* ============ Подвал ============ */
.site-footer { background: var(--color-navy); color: rgba(255,255,255,.8); padding: 56px 0 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer-col h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col p, .footer-col a { color: rgba(255,255,255,.72); font-size: 14px; }
.footer-col a:hover { color: var(--color-gold-light); }
.footer-col ul li { margin-bottom: 8px; }
.logo-footer { display: inline-block; margin-bottom: 16px; }
.messenger-row { display: flex; gap: 14px; margin: 10px 0; flex-wrap: wrap; }
.messenger-icon { font-size: 13.5px; font-weight: 600; border: 1px solid rgba(255,255,255,.25); padding: 6px 12px; border-radius: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 20px; display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ============ Мобильная закреплённая панель ============ */
.mobile-sticky-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: #fff; border-top: 1px solid var(--color-border); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.mobile-sticky-bar { display: none; grid-template-columns: 1fr 1fr; }
.mobile-sticky-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 0; font-weight: 700; font-size: 15px; color: var(--color-navy);
}
.mobile-sticky-btn-primary { background: var(--color-gold); color: #fff; }

/* ============ Cookie-баннер ============ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: var(--color-navy); color: #fff; padding: 16px 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.15);
}
.cookie-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 14px; color: rgba(255,255,255,.85); flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--color-gold-light); text-decoration: underline; }

/* ============ 404 ============ */
.error-page { text-align: center; padding: 100px 0; }
.error-page .code { font-size: 96px; font-weight: 800; color: var(--color-gold); line-height: 1; }

/* ============ Список статей блога ============ */
.breadcrumbs-schema { display: none; }

/* ============ Адаптив ============ */
@media (max-width: 1000px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; margin-left: auto; }
  .main-nav { display: flex; align-items: center; }
  .main-menu {
    display: none; position: fixed; top: 69px; right: 0; bottom: 0; left: auto; width: 82%; max-width: 340px;
    background: #fff; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
    padding: 16px 24px 24px; overflow-y: auto; box-shadow: -8px 0 24px rgba(0,0,0,.12);
    border-top: 1px solid var(--color-border);
  }
  .main-menu.is-open { display: flex; }
  .main-menu > li { width: 100%; border-bottom: 1px solid var(--color-border); }
  .main-menu > li > a { padding: 14px 0; }
  .has-dropdown .dropdown {
    display: none; position: static; box-shadow: none; border: none; padding: 0 0 10px 12px;
  }
  .has-dropdown.dropdown-open .dropdown { display: block; }
  .header-actions { display: none; }
  .mobile-sticky-bar { display: grid; }
  body { padding-bottom: 58px; }

  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero img { max-width: 240px; margin: 0 auto; }
  .contacts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .hero { padding: 48px 0; }
}

