/* ==========================================================================
   1. СБРОС И БАЗОВЫЕ НАСТРОЙКИ
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. ДОСТУПНОСТЬ (Skip Link)
   ========================================================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f97316;
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   3. УТИЛИТЫ И МАКЕТ
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.bg-light {
    background: #f8fafc;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   4. ШАПКА И НАВИГАЦИЯ
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
}

.header-nav {
    display: flex;
    gap: 30px;
}

.header-nav a {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
}

.header-nav a:hover {
    color: #f97316;
}

.header-contacts {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-contacts a {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.header-contacts a:hover {
    color: #f97316;
}

/* Бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: #1e293b;
    border-radius: 2px;
    transition: 0.3s;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   5. HERO СЕКЦИЯ (ИСПРАВЛЕНА)
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px 20px 80px; /* Добавил padding по бокам */
    max-width: 1100px; /* Ограничение ширины как у .container */
    margin: 0 auto; /* Центрирование */
}

.hero > div:first-child {
    flex: 1;
    min-width: 0;
}

.hero-eyebrow {
    display: inline-block;
    background: #fff7ed;
    color: #f97316;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 38px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero h1 em {
    color: #f97316;
    font-style: normal;
}

.hero-subtitle {
    font-size: 18px;
    color: #475569;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.hero-desc {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-meta span {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta span::before {
    content: "✓";
    color: #f97316;
    font-weight: 800;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: #f97316;
    color: white;
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #1e293b;
    border-color: #cbd5e1;
}

.btn-outline:hover {
    border-color: #f97316;
    color: #f97316;
}

.hero-photo {
    flex: 0 0 380px;
    max-width: 380px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   6. СЕТКИ И КАРТОЧКИ
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

article {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
}

article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

article h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 15px 0 10px;
}

article p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

article small {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 700;
    color: #f97316;
}

/* Унификация иконок (исправление обрезки) */
.svc-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fff7ed;
    border-radius: 12px;
    color: #f97316;
}

.svc-ico svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

/* ==========================================================================
   7. СПЕЦИФИЧНЫЕ СЕКЦИИ
   ========================================================================== */
.solution-box {
    margin-top: 50px;
    background: #1e293b;
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.solution-box h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.solution-box p {
    font-size: 16px;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto;
}

.pains-note, .services-note {
    text-align: center;
    margin-top: 30px;
    padding: 15px 25px;
    background: #f8fafc;
    border-left: 3px solid #f97316;
    border-radius: 8px;
    font-size: 14px;
    color: #64748b;
    font-style: italic;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.services-note {
    margin-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

.note {
    text-align: center;
    margin-top: 40px;
    font-size: 16px;
    color: #475569;
}

.note strong {
    color: #1e293b;
}

/* ==========================================================================
   8. ФИНАЛЬНЫЙ CTA И ФУТЕР
   ========================================================================== */
.final-cta {
    text-align: center;
    padding: 80px 20px;
}

.final-cta h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
}

.final-cta p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

footer h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

footer p {
    color: #cbd5e1;
    margin-bottom: 10px;
    line-height: 1.6;
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

footer a:hover {
    color: #f97316;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ==========================================================================
   9. ЮРИДИЧЕСКИЕ СТРАНИЦЫ
   ========================================================================== */
.legal-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.legal-header {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
}

.legal-title {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.legal-meta {
    font-size: 14px;
    color: #64748b;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f97316;
    display: inline-block;
}

.legal-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin: 20px 0 10px;
}

.legal-section p {
    font-size: 15px;
    margin-bottom: 15px;
    color: #475569;
}

/* Убираем лишний отступ сразу после заголовка */
.legal-section h2 + p,
.legal-section h2 + table,
.legal-section h3 + p,
.legal-section h3 + table {
    margin-top: 10px;
}

.legal-section ul {
    padding-left: 22px;
    margin-bottom: 15px;
    list-style: disc;
}

.legal-section li {
    margin-bottom: 8px;
    font-size: 15px;
    color: #475569;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px;
    font-size: 15px;
}

.legal-table th,
.legal-table td {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    width: 35%;
}

.legal-table tr + tr {
    border-top: 1px solid #f1f5f9;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.2s;
}

.legal-back:hover {
    gap: 12px;
}

/* ==========================================================================
   10. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ========================================================================== */
@media (max-width: 1024px) {
    .header-nav, .header-contacts {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .header-nav {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 10000;
        gap: 0;
    }

    .header-nav.active {
        right: 0;
    }

    .header-nav a {
        padding: 15px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 18px;
        color: #1e293b;
    }
    
    /* Hero на планшетах */
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        padding: 40px 20px 50px;
        max-width: 100%;
    }
    
    .hero > div:first-child {
        flex: 1;
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-photo {
        flex: 0 0 auto;
        max-width: 300px;
    }
    
    .hero-meta {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    article {
        padding: 25px;
    }

    .solution-box {
        padding: 30px 20px;
        margin-top: 30px;
    }

    .solution-box h3 {
        font-size: 20px;
    }

    .pains-note, .services-note {
        margin-top: 25px;
        padding: 12px 20px;
        font-size: 13px;
    }

    .final-cta {
        padding: 50px 20px;
    }

    .final-cta h2 {
        font-size: 26px;
    }

    .final-cta p {
        font-size: 16px;
    }

    .legal-title {
        font-size: 28px;
    }

    .legal-section h2 {
        font-size: 20px;
    }

    .legal-table th,
    .legal-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Hero на мобильных */
    .hero {
        padding: 40px 15px 50px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-photo {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    /* Hero на маленьких экранах */
    .hero {
        padding: 30px 15px 40px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-photo {
        max-width: 200px;
    }
}

/* ==========================================================================
   11. COOKIE BANNER (ЕДИНСТВЕННЫЙ БЛОК - С !important)
   ========================================================================== */
.cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    background: #1e293b !important;
    color: #fff !important;
    padding: 20px !important;
    z-index: 999999 !important;
    transform: translateY(100%) !important;
    transition: transform 0.4s ease !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
    margin: 0 !important;
    border: none !important;
}

.cookie-banner.visible {
    transform: translateY(0) !important;
    display: block !important;
}

.cookie-content {
    max-width: 1100px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
}

.cookie-text {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    flex: 1 !important;
    min-width: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    color: #fff !important;
    background: transparent !important;
}

.cookie-text a {
    color: #f97316 !important;
    text-decoration: underline !important;
}

.cookie-btn {
    background: #f97316 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: 'Manrope', sans-serif !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px !important;
    }
    
    .cookie-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
    
    .cookie-text {
        width: 100% !important;
        font-size: 13px !important;
    }
    
    .cookie-btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 14px 20px !important;
    }
}

/* Мобильная версия для юридических страниц */
@media (max-width: 1024px) {
    .legal-page {
        padding: 40px 20px 60px;
    }
}

@media (max-width: 768px) {
    .legal-page {
        padding: 30px 15px 50px;
    }
    
    .legal-title {
        font-size: 24px;
    }
    
    .legal-section h2 {
        font-size: 18px;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 25px 15px 40px;
    }
    
    .legal-title {
        font-size: 22px;
    }
}

/* ==========================================================================
   12. ЮРИДИЧЕСКИЕ СТРАНИЦЫ (Agreement & Privacy)
   ========================================================================== */
.legal-page {
    padding: 60px 20px;
    max-width: 850px;
    margin: 0 auto;
}

.legal-header {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
}

.legal-title {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.legal-meta {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 30px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f97316;
}

.legal-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 25px 0 10px;
}

.legal-section p,
.legal-section ul {
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 15px;
}

.legal-section ul {
    padding-left: 20px;
    list-style: disc;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-highlight {
    background: #f8fafc;
    padding: 20px;
    border-left: 4px solid #f97316;
    border-radius: 8px;
    margin: 25px 0;
}

.legal-highlight strong {
    color: #1e293b;
}

/* Мобильная версия для юридических страниц */
@media (max-width: 768px) {
    .legal-page {
        padding: 40px 15px 50px;
    }
    
    .legal-title {
        font-size: 28px;
    }
    
    .legal-section h2 {
        font-size: 20px;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 30px 15px 40px;
    }
    
    .legal-title {
        font-size: 24px;
    }
    
    .legal-section h2 {
        font-size: 18px;
    }
}