/* ==================== ГЛОБАЛЬНЫЕ СТИЛИ ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: #fff;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem;
}

@media (min-width: 1920px) {
    body {
        font-size: 18px;
    }
}

/* ==================== КОНТЕЙНЕР ==================== */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding: 0 1rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
        padding: 0 1.5rem;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
        padding: 0 2rem;
    }
}

/* ==================== ШАПКА ==================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .logo-img {
        width: 40px;
        height: 40px;
    }
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #000;
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 1.5rem;
    }
}

.logo-text-light {
    color: #4b5563;
}

.desktop-nav {
    display: block;
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

@media (min-width: 1025px) {
    .nav-list {
        gap: 2rem;
    }
}

.nav-link {
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .nav-link {
        font-size: 1rem;
    }
}

.nav-link:hover {
    color: #000000;
}

/* ==================== COOKIE POLICY ==================== */
.cookie-section {
    padding: 3rem 0;
    background: #f9fafb;
}

@media (min-width: 768px) {
    .cookie-section {
        padding: 4rem 0;
    }
}

.cookie-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .cookie-card {
        max-width: 640px;
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .cookie-card {
        max-width: 768px;
        padding: 2.5rem;
    }
}

@media (min-width: 1025px) {
    .cookie-card {
        max-width: 1024px;
        padding: 3rem;
    }
}

@media (min-width: 1280px) {
    .cookie-card {
        max-width: 1280px;
        padding: 3rem;
    }
}

@media (min-width: 1440px) {
    .cookie-card {
        width: 70%;
    }
}

@media (min-width: 1920px) {
    .cookie-card {
        width: 70%;
    }
}

.cookie-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .cookie-title {
        font-size: 1.875rem;
    }
}

@media (min-width: 1025px) {
    .cookie-title {
        font-size: 2.25rem;
    }
}

.cookie-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: #4b5563;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #000;
}

.cookie-subtitle:first-of-type {
    margin-top: 0;
}

@media (min-width: 768px) {
    .cookie-subtitle {
        font-size: 1.5rem;
    }
}

@media (min-width: 1025px) {
    .cookie-subtitle {
        font-size: 1.875rem;
    }
}

/* Стили для многоуровневого списка в разделе 1 (оставлен без изменений) */
.multi-level-list, 
.multi-level-list ol {
    list-style-type: none;
    padding-left: 0;
    margin: 0.5rem 0 1rem 0;
}

.multi-level-list {
    counter-reset: section 1 first-level 0;
}

.multi-level-list > li {
    counter-increment: first-level;
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.multi-level-list > li::before {
    content: counter(section) "." counter(first-level) " ";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: #1f2937;
}

.multi-level-list ol {
    counter-reset: second-level;
    padding-left: 1.8rem;
    margin-top: 0.5rem;
}

.multi-level-list ol li {
    counter-increment: second-level;
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.6rem;
}

.multi-level-list ol li::before {
    content: counter(section) "." counter(first-level) "." counter(second-level) " ";
    position: absolute;
    left: 0;
    font-weight: 500;
    color: #374151;
}

/* Общие стили для нумерованных списков подпунктов (разделы 2-8) */
.section-list {
    margin: 1rem 0 1.5rem 0;
}

.subsections {
    counter-reset: sub;
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 1rem 0;
}

.subsections > li {
    counter-increment: sub;
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Для каждого раздела своё содержимое псевдоэлемента */
.section-2 .subsections > li::before {
    content: "2." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-3 .subsections > li::before {
    content: "3." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-4 .subsections > li::before {
    content: "4." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-5 .subsections > li::before {
    content: "5." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-6 .subsections > li::before {
    content: "6." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-7 .subsections > li::before {
    content: "7." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}
.section-8 .subsections > li::before {
    content: "8." counter(sub) " ";
    font-weight: 600;
    position: absolute;
    left: 0;
    color: #1f2937;
}

/* Вложенные маркированные списки внутри пунктов */
.subsections .cookie-list,
.subsections ul:not(.cookie-list) {
    padding-left: 1.5rem;
    margin: 0.5rem 0 0.5rem 1rem;
    list-style-type: disc;
}

.subsections .cookie-list li,
.subsections ul li {
    margin: 0.3rem 0;
    padding-left: 0;
}

.subsections .cookie-list li::before,
.subsections ul li::before {
    content: none;
}

/* Таблицы внутри разделов */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.cookie-table th,
.cookie-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
}

@media (min-width: 640px) {
    .cookie-table th,
    .cookie-table td {
        padding: 10px 12px;
        font-size: 1.05rem;
    }
}

@media (max-width: 640px) {
    .cookie-table {
        font-size: 0.875rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 6px 4px;
    }
}

.cookie-table th {
    background: #f9fafb;
    font-weight: 600;
    width: 30%;
    color: #4b5563;
}

.cookie-table td {
    color: #4b5563;
}

.cookie-date {
    text-align: center;
    margin: -0.5rem 0 2rem 0;
    font-size: 1rem;
    color: #6b7280;
    font-style: italic;
}

@media (min-width: 768px) {
    .cookie-date {
        font-size: 1.125rem;
    }
}

.policy-link {
    display: block;
    margin-top: 2rem;
    text-align: center;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
}

.policy-link:hover {
    color: #000;
}

/* ==================== ФУТЕР ==================== */
.site-footer {
    background: #000000;
    color: white;
    padding: 2rem 0 1.5rem;
}

@media (min-width: 768px) {
    .site-footer {
        padding: 3rem 0 2rem;
    }
}

.footer-grid-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .footer-grid-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .footer-grid-cols {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .footer-logo {
        font-size: 1.5rem;
    }
}

.footer-logo-dim {
    color: #9ca3af;
}

.footer-desc {
    color: #d1d5db;
    font-size: 0.85rem;
    line-height: 1.4;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .footer-title {
        font-size: 1.125rem;
    }
}

.footer-links,
.footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .footer-link {
        font-size: 0.95rem;
    }
}

.footer-link:hover {
    color: white;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d1d5db;
    font-size: 0.85rem;
}

.footer-contacts i {
    width: 1.2rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-contacts li {
        font-size: 0.95rem;
    }
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 2rem;
        font-size: 0.875rem;
    }
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #f3f4f6;
    padding: 0.75rem;
    z-index: 100;
    font-size: 0.75rem;
    line-height: 1.4;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .cookie-banner {
        padding: 1rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        gap: 0.75rem;
    }
}

.cookie-banner-text {
    margin: 0;
    flex: 1;
}

.cookie-banner-btn {
    background: #ffffff;
    color: #1f2937;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .cookie-banner-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

.cookie-banner-btn:hover {
    background: #e5e7eb;
}

.policy-banner-link {
    color: #60a5fa;
    text-decoration: underline;
    display: inline-block;
    line-height: 1.3;
    font-size: clamp(0.85rem, 0.6rem + 0.6vw, 1rem);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.policy-banner-link:hover {
    color: #3b82f6;
    text-decoration-thickness: 2px;
}

@media (max-width: 420px) {
    .policy-banner-link {
        font-size: 0.85rem;
    }
}

.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    margin: 1rem auto 2rem;
    display: block;
    font-size: 1rem;
    transition: background 0.2s;
}

.print-btn:hover {
    background: #333;
}

.print-btn i {
    font-size: 1.1em;
}

@media (max-width: 640px) {
    .print-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* ==================== ПЕЧАТЬ (A4) ==================== */
@page {
    size: A4 portrait;
    margin: 2cm;
}

@media print {
    body {
        font-size: 12pt;
        background: white !important;
        color: #000 !important;
        line-height: 1.4;
    }
    
    .site-header,
    .site-footer,
    .desktop-nav,
    #cookie-banner,
    .print-btn,
    .cookie-banner {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .cookie-section {
        background: white !important;
        padding: 0 !important;
    }
    
    .cookie-card {
        box-shadow: none !important;
        border: none !important;
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .cookie-title {
        font-size: 18pt;
        font-weight: bold;
        text-align: center;
        margin: 1cm 0 0.5cm;
        page-break-after: avoid;
    }
    
    .cookie-subtitle {
        font-size: 14pt;
        font-weight: 600;
        margin: 1cm 0 0.5cm;
        padding-bottom: 0.3cm;
        border-bottom: 1pt solid #000;
        page-break-after: avoid;
    }
    
    .cookie-table {
        width: 100% !important;
        border-collapse: collapse;
        margin-bottom: 0.5cm;
        page-break-inside: avoid;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.4cm 0.3cm;
        border-bottom: 1pt solid #333;
        font-size: 11pt;
        text-align: left;
        vertical-align: top;
        color: #000 !important;
    }
    
    .cookie-table th {
        background: #f5f5f5 !important;
        font-weight: bold;
        width: 30% !important;
        color: #000 !important;
    }
    
    .multi-level-list > li::before,
    .multi-level-list ol li::before,
    .subsections > li::before {
        color: #000 !important;
        font-weight: bold;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}