/* ============================================================
   ООО «Гарантия» — юридическая компания
   Палитра 60/30/10 по ТЗ:
   60% фон — слоновая кость #FDF5E6
   30% шапка/подвал/крупные блоки — тёмный шоколад #3E2723 (#4A2C2A)
   10% акценты — золото #C5A059 и navy #1A2A3A
   ============================================================ */
:root {
    --ivory:   #FDF5E6;
    --choco:   #3E2723;
    --choco-2: #4A2C2A;
    --gold:    #C5A059;
    --navy:    #1A2A3A;
    --text:    #2B2018;
    --font-body: 'Manrope', Arial, sans-serif;
    --font-head: 'Playfair Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--ivory);
}

img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; }
a   { color: var(--navy); }

/* Базовая ширина контента — 1700px (для экранов от 1920px),
   ниже адаптируется media-запросами под стандартные разрешения */
.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 20px;
}
@media (max-width: 1919px) { .container { max-width: 1600px; } } /* 1920 → 1680/1760 */
@media (max-width: 1699px) { .container { max-width: 1440px; } } /* 1600/1680 */
@media (max-width: 1535px) { .container { max-width: 1360px; } } /* 1536 */
@media (max-width: 1439px) { .container { max-width: 1280px; } } /* 1440 */
@media (max-width: 1365px) { .container { max-width: 1200px; } } /* 1366 */
@media (max-width: 1279px) { .container { max-width: 100%; } }   /* 1280 и ниже — резиновая */

.section { padding: 56px 0; }

h1, h2, h3, .section-title {
    font-family: var(--font-head);
    color: var(--navy);
    line-height: 1.25;
}

.section-title { font-size: 34px; margin-bottom: 28px; }
.section-title--light { color: var(--ivory); }
.section-title--gold  { color: var(--gold); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    border-radius: 6px;
    transition: background .25s, color .25s, transform .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; padding: 14px 34px; font-size: 17px; }
.btn-navy:hover { background: #24405e; }
.btn-gold { background: var(--gold); color: var(--choco); padding: 10px 22px; }
.btn-gold:hover { background: #d4b476; }
.btn-sm { font-size: 14px; padding: 8px 18px; }
.btn-lg { width: 100%; }

/* ============================================================
   Блок 1: Шапка (тёмно-шоколадная)
   ============================================================ */
.site-header {
    background: var(--choco);
    color: var(--ivory);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-text {
    font-family: 'Russo One', var(--font-body), sans-serif;
    font-size: 25px;
    letter-spacing: .06em;
    color: var(--gold);
}

.header-motto {
    font-family: var(--font-head);
    font-style: italic;
    font-size: 17px;
    color: var(--gold);
    text-align: center;
    flex: 1;
}

.header-contacts { text-align: right; font-size: 14px; }
.header-phone {
    display: block;
    color: var(--ivory);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.header-phone:hover { color: var(--gold); }
.header-phone--second { font-size: 15px; font-weight: 600; }
.header-address { color: rgba(253,245,230,.75); margin: 2px 0 8px; }
.header-review a { color: #FDF5E6; margin: 2px 0 8px; }

/* ---------- Нижняя панель шапки: меню ---------- */
.main-nav {
    background: var(--choco-2);
    border-top: 1px solid rgba(197,160,89,.35);
}
.nav-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nav-item { position: relative; }
.nav-link {
    display: block;
    padding: 14px 26px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--ivory);
    text-decoration: none;
    transition: color .25s;
}
.nav-item:hover > .nav-link,
.nav-item.is-active > .nav-link { color: var(--gold); }

/* Выпадающие окна «Бизнесу»/«Гражданам»: плавная анимация при hover */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    min-width: 300px;
    background: var(--ivory);
    border-top: 3px solid var(--gold);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    z-index: 50;
}
.has-dropdown:hover .dropdown,
.has-dropdown.is-open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown li + li { border-top: 1px solid rgba(62,39,35,.1); }
.dropdown a {
    display: block;
    padding: 12px 22px;
    color: var(--choco);
    text-decoration: none;
    font-size: 15px;
    transition: background .2s, color .2s;
}
.dropdown a:hover { background: var(--navy); color: #fff; }

/* Бургер для мобильных */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

/* ============================================================
   Блок 2: Текстовый триггер
   ============================================================ */
.trigger-block {
    background: var(--ivory);
    padding: 36px 0;
    border-bottom: 1px solid rgba(197,160,89,.35);
}
.trigger-text {
    font-family: var(--font-head);
    font-size: 24px;
    font-style: italic;
    text-align: center;
    color: var(--choco);
    max-width: 980px;
    margin: 0 auto;
}
.trigger-text strong { color: var(--navy); }

/* ============================================================
   Блок 3: Первый экран (баннер на всю ширину экрана)
   ============================================================ */
.hero {
    position: relative;
    background: var(--navy);
}
.hero-img {
    width: 100%;
    max-height: 82vh;
    object-fit: cover;
    border-radius: 0;
}
/* Контент баннера остаётся в сетке контейнера поверх картинки */
.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}
.hero-overlay .container { width: 100%; }
.hero-title {
    max-width: 560px;
    padding-bottom: 48px;
    font-size: clamp(24px, 2.6vw, 46px);
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,.75);
}
.hero-title em { color: var(--gold); font-style: normal; }

/* ============================================================
   Блок 4: Текстовый бенефит
   ============================================================ */
.benefit-block { padding: 48px 0; }
.benefit-text {
    font-size: 26px;
    font-family: var(--font-head);
    text-align: center;
    color: var(--navy);
    max-width: 900px;
    margin: 0 auto;
}
.benefit-text em { color: var(--gold); font-style: normal; font-weight: 700; }

/* ============================================================
   Блок 5: Информационные вкладки услуг
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.service-card {
    background: #fff;
    border: 1px solid rgba(197,160,89,.45);
    border-radius: 10px;
    padding: 30px 34px;
    box-shadow: 0 4px 18px rgba(62,39,35,.08);
}
.service-card h3 {
    font-size: 26px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
}
.service-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: background .2s, color .2s, padding-left .2s;
}
.service-card a::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}
.service-card a:hover {
    background: var(--ivory);
    color: var(--navy);
    padding-left: 12px;
}

/* ============================================================
   Блок 6: Форма (крупный структурный блок — шоколад)
   ============================================================ */
.section-form { background: var(--choco); }
.form-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
}
.offer-list li {
    position: relative;
    padding: 8px 0 8px 34px;
    color: var(--ivory);
    font-size: 19px;
}
.offer-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
    font-size: 20px;
}

.lead-form {
    background: var(--ivory);
    padding: 34px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.form-field { display: block; margin-bottom: 16px; }
.form-field span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--choco);
}
.form-field input {
    width: 100%;
    padding: 13px 16px;
    font-size: 16px;
    font-family: var(--font-body);
    border: 1px solid rgba(62,39,35,.3);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}
.form-field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197,160,89,.25);
}
.form-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    margin: 14px 0 20px;
    cursor: pointer;
}
.form-check input { margin-top: 3px; }
.form-errors {
    background: #fbe9e7;
    border: 1px solid #d84315;
    color: #bf360c;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
}

/* ============================================================
   Блок 7: Отзывы
   ============================================================ */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.review-card {
    background: #fff;
    border-radius: 10px;
    padding: 26px;
    border-top: 3px solid var(--gold);
    box-shadow: 0 4px 18px rgba(62,39,35,.08);
}
.review-card blockquote {
    font-style: italic;
    color: var(--text);
    margin-bottom: 16px;
}
.review-author {
    font-weight: 700;
    color: var(--navy);
    font-size: 15px;
}
.review-meta { font-size: 13px; color: #8d6e63; }
.reviews-platforms {
    margin-top: 28px;
    text-align: center;
    font-size: 16px;
}
.reviews-platforms a { font-weight: 700; color: var(--navy); }
.reviews-platforms a:hover { color: var(--gold); }

/* ============================================================
   Страницы юристов: сетка из 4 квадрантов
   ============================================================ */
.lawyer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}
.quadrant {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    border: 1px solid rgba(197,160,89,.4);
    box-shadow: 0 4px 18px rgba(62,39,35,.08);
}
.quadrant h2 {
    font-size: 24px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.quadrant-photo { padding: 0; overflow: hidden; }
.quadrant-photo img { width: 100%; }
.lawyer-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--ivory);
    border: 1px solid var(--gold);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    color: var(--navy);
}
.lawyer-rating:hover { background: var(--gold); color: var(--choco); }
.diploma-list li {
    padding: 10px 0 10px 34px;
    position: relative;
    border-bottom: 1px dashed rgba(62,39,35,.2);
}
.diploma-list li::before {
    content: '⚖';
    position: absolute;
    left: 0;
    color: var(--gold);
}
.uslugi-list li { padding: 6px 0 6px 22px; position: relative; }
.uslugi-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 15px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
}

/* ============================================================
   Страница «Аутсорсинг»: первый экран с УТП
   ============================================================ */
.utp-screen {
    background: linear-gradient(135deg, var(--navy) 0%, #24405e 100%);
    color: var(--ivory);
    padding: 80px 0;
    text-align: center;
}
.utp-screen h1 {
    color: #fff;
    font-size: clamp(30px, 4.5vw, 52px);
    max-width: 900px;
    margin: 0 auto 20px;
}
.utp-screen h1 em { color: var(--gold); font-style: normal; }
.utp-sub {
    font-size: 20px;
    max-width: 720px;
    margin: 0 auto 34px;
    color: rgba(253,245,230,.85);
}

/* ============================================================
   Блок 8: Подвал (тёмно-шоколадный)
   ============================================================ */
.site-footer {
    background: var(--choco);
    color: var(--ivory);
    padding: 56px 0 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 40px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 16px;
    font-family: 'Russo One', var(--font-body), sans-serif;
    font-size: 20px;
    letter-spacing: .06em;
    color: var(--gold);
}
.footer-title {
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 16px;
}
.footer-address, .footer-copy { color: rgba(253,245,230,.75); font-size: 14px; margin-bottom: 8px; }
.footer-phone, .footer-mail {
    display: block;
    color: var(--ivory);
    text-decoration: none;
    margin-bottom: 8px;
    font-weight: 600;
}
.footer-phone:hover, .footer-mail:hover { color: var(--gold); }
.footer-messengers {
    display: flex;
    gap: 14px;
    margin: 14px 0 20px;
}
.footer-messengers a {
    color: var(--gold);
    transition: color .2s, transform .2s;
}
.footer-messengers a:hover { color: var(--ivory); transform: scale(1.12); }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(253,245,230,.75); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }
.footer-map iframe { border-radius: 8px; border: 1px solid rgba(197,160,89,.4); }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 20px; right: 20px; bottom: 20px;
    max-width: 640px;
    margin: 0 auto;
    background: var(--navy);
    color: var(--ivory);
    padding: 18px 22px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    z-index: 200;
}
.cookie-banner a { color: var(--gold); }
.cookie-banner .btn { flex-shrink: 0; }

/* ---------- Системные страницы ---------- */
.system-page { padding: 72px 0; min-height: 50vh; }
.system-page h1 { font-size: 40px; margin-bottom: 24px; }
.system-page p, .system-page li { margin-bottom: 12px; max-width: 860px; }
.system-page ol, .system-page ul { padding-left: 24px; margin-bottom: 20px; }
.system-page ul { list-style: disc; }
.error-code {
    font-family: var(--font-head);
    font-size: 120px;
    color: var(--gold);
    line-height: 1;
}

/* ---------- Анимация появления при скролле ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.fade-in.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Адаптивность: планшеты и смартфоны
   ============================================================ */
@media (max-width: 992px) {
    .header-motto { display: none; }
    .services-grid, .form-wrap, .lawyer-grid { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-map { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .section { padding: 40px 0; }
    .section-title { font-size: 27px; }
    .trigger-text { font-size: 19px; }
    .benefit-text { font-size: 21px; }
    .header-contacts .header-address, .header-contacts .btn,
    .header-contacts .header-review { display: none; }
    .header-phone { font-size: 16px; }

    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
    }
    .main-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-link { width: 100%; text-align: left; }
    .dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
    }
    .has-dropdown.is-open .dropdown { display: block; }

    .hero-overlay { position: static; }
    .hero-title {
        max-width: none;
        padding: 18px 0 28px;
        text-shadow: none;
        color: var(--ivory);
    }
    .reviews-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cookie-banner { flex-direction: column; text-align: center; }
}
