/* --- Обертка вкладок на всю ширину --- */
.legal-nav-wrapper {
  width: 100%;
  border-bottom: 1px solid #333333; /* Темная линия под вкладками */
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
    top: 70px; /* Сразу под основным навбаром */
}

/* Контейнер для центрирования самих кнопок */
.legal-tabs-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px; /* Отступы по бокам, чтобы текст не прилипал к краю экрана */
  display: flex;
  overflow-x: auto; /* Для скролла на мобильных */
}

/* Стили вкладок (Темная тема) */
.tab-link {
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #9aa0a6; /* Светло-серый цвет неактивных вкладок */
  border-bottom: 3px solid transparent;
  transition: 0.2s;
  white-space: nowrap;
}

.tab-link:hover {
  color: #e8eaed; /* Белый цвет при наведении */
}

.tab-link.active {
  color: #8ab4f8; /* Светло-синий (Google Dark Mode) для активной вкладки */
  border-bottom: 3px solid #8ab4f8;
}

/* --- Обертка для контента --- */
.legal-content-wrapper {
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
  color: #e8eaed; /* Основной текст светлый */
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Скрытие/Показ контента */
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- Сетка карточек --- */
.cards-grid {
margin-top: 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 40px;
}

/* --- Стили текста внутри контента --- */
.legal-content-wrapper h2 {
  font-size: 24px;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 16px;
  color: #ffffff; /* Заголовки чисто белые */
}

.legal-content-wrapper p {
  font-size: 15px;
  line-height: 1.6;
  color: #b3b3b3; /* Описание чуть серее для контраста */
  margin-bottom: 16px;
}

.legal-content-wrapper a {
  color: #8ab4f8; /* Синие ссылки */
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.legal-content-wrapper a:hover {
  text-decoration: underline;
}

/* Карточка с иконкой */
.legal-card.with-icon { display: flex; gap: 20px; }
.card-icon { flex-shrink: 0; margin-top: 5px; }
.card-icon svg { fill: #8ab4f8; } /* Иконки красим в синий */

/* Общий макет */
.privacy-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 60px;
    min-height: 100vh; /* Убирает прыжки футера, резервируя место */
}

/* --- САЙДБАР --- */
.privacy-sidebar {
    width: 250px;
    position: sticky; /* "Прилипание" */
    top: 200px; /* Отступ от твоего навбара */
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.privacy-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid #333; /* Тонкая линия слева */
}

.privacy-sidebar li {
    margin-bottom: 8px;
}

.privacy-sidebar a {
    display: block;
    padding: 8px 20px;
    color: #9aa0a6;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.privacy-sidebar a:hover {
    color: #8ab4f8;
}

/* Эффект активной ссылки (можно добавить через JS) */
.privacy-sidebar a.active {
    color: #8ab4f8;
    border-left: 2px solid #8ab4f8;
    background: rgba(138, 180, 248, 0.05);
}

/* --- КОНТЕНТ --- */
.privacy-body {
    flex: 1;
    color: #e8eaed;
    line-height: 1.8;
    margin-top: 100px;
}

.privacy-body section {
    margin-bottom: 60px; /* Большие отступы между секциями как у Google */
}

.privacy-body h1 { font-size: 32px; margin-bottom: 30px; color: #fff; }
.privacy-body h2 { font-size: 24px; margin-top: 40px; color: #fff; }

/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
.mobile-menu-bar {
    display: none; /* Скрыто на ПК */
    position: sticky;
    top: 60px; /* Сразу под основным навбаром */
    background: #0a0a0a;
    padding: 10px 20px;
    border-bottom: 1px solid #333;
    z-index: 100;
}

#menu-toggle {
    background: none;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
}

/* Плавный скролл */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Чтобы заголовок не заезжал под навбар при скролле */
}

.tos-container {
    font-size: 16px;
}

h2 {
    font-size: 28px;
    font-weight: 400;
    color: #ffffff;
    margin-top: 48px;
    margin-bottom: 24px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    margin-top: 32px;
    margin-bottom: 16px;
}

p {
    margin-bottom: 16px;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.tos-list {
    list-style-type: disc;
    padding-left: 24px;
    margin-bottom: 24px;
}

.tos-list li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.address-block {
    margin-left: 0;
    margin-bottom: 24px;
}

.address-block p {
    margin-bottom: 4px;
}

/* Контейнер секции */
.legal-section {
    max-width: 800px; /* Текст в юридических документах лучше читается, когда он не слишком широкий */
    margin: 0 auto;
}

.intro-text {
    font-size: 18px;
    line-height: 1.6;
    color: #e8eaed;
    margin-bottom: 40px;
}

/* Сетка для блоков "Что ждем / Что даем" */
.relationship-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.relation-block h3 {
    font-size: 20px;
    color: #8ab4f8; /* Синий акцент для подзаголовков */
    margin-bottom: 15px;
}

.relation-block ul {
    padding-left: 20px;
    color: #b3b3b3;
}

.relation-block li {
    margin-bottom: 12px;
}

.relation-block li strong {
    color: #ffffff;
}

/* Выделенный блок для кредитов (Highlight) */
.highlight-box {
    background: rgba(138, 180, 248, 0.1); /* Очень слабый синий фон */
    border-left: 4px solid #8ab4f8;
    padding: 24px;
    border-radius: 8px;
    margin: 40px 0;
}

.highlight-box h3 {
    margin-top: 0;
    color: #ffffff;
    font-size: 18px;
}

.highlight-box p {
    margin-bottom: 0;
    font-size: 15px;
    color: #e8eaed;
}

.info-card, .warning-box {
    background: #111111;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #222;
}

.warning-box {
    border-left: 4px solid #f28b82; /* Красный акцент для запретов */
}

/* Стилизация шагов реферальной системы */
.referral-logic {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 10px;
}

.step-num {
    background: #8ab4f8;
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.small-note {
    font-size: 13px;
    color: #70757a;
    font-style: italic;
}

/* Список процесса оспаривания */
.dispute-process h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
}

.dispute-process ol {
    padding-left: 20px;
    color: #b3b3b3;
}

.dispute-process li {
    margin-bottom: 10px;
}

/* Финальный блок "About" */
.about-footer-box {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(145deg, #111111, #0a0a0a);
    border: 1px solid #333;
    border-radius: 16px;
}

.contact-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.contact-links a {
    background: rgba(138, 180, 248, 0.1);
    color: #8ab4f8;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(138, 180, 248, 0.3);
    font-size: 14px;
    transition: 0.3s;
}

.contact-links a:hover {
    background: #8ab4f8;
    color: #000;
    text-decoration: none;
}

@media (max-width: 768px) {
    .mobile-menu-bar { display: block; }

    .privacy-layout { flex-direction: column; padding-top: 20px; }

    .privacy-sidebar.open { left: 0; }

    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7);
        z-index: 1000;
    }

    #sidebar-overlay.active { display: block; }

    .cards-grid { grid-template-columns: 1fr; gap: 40px; }
    .relationship-grid {
        grid-template-columns: 1fr;
    }
}

/* ПРИНУДИТЕЛЬНО ИСПРАВЛЯЕМ БЕЛЫЙ ФОН */
html, body {
    background-color: #0a0a0a !important; /* Твой основной темный цвет */
    color: #ffffff !important;
    margin: 0;
    padding: 0;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {

    html, body {
        height: 100%;
        overflow-x: hidden;
    }
    /* Скрываем табы на мобилках */
    .legal-nav-wrapper {
        display: none !important;
    }

    /* Хедер для кнопки меню */
    .mobile-legal-header {
        display: flex;
        align-items: center;
        padding: 10px 20px;
        background: #111;
        border-bottom: 1px solid #333;
        position: sticky;
        top: 60px; /* Сразу под основным навбаром */
        z-index: 100;
    }

    .menu-btn {
        background: none;
        border: none;
        color: #8ab4f8;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 16px;
        cursor: pointer;
    }

/* Мобильный сайдбар */
    .privacy-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        background-color: #0a0a0a;
        z-index: 99999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        padding: 20px;
        overflow-y: auto;
        min-height: 100vh;
        padding-top: 0 !important;
        left: 0;
    }

    .privacy-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 10px 20px;
        background: linear-gradient(to bottom, #111, #0a0a0a);
        display: flex;
        flex-direction: column;
        gap: 5px;
        color: #ffffff;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -0.5px;
    }

    /* Оверлей */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        inset: 0;
    }

    .sidebar-overlay.active {
        display: block;
        pointer-events: auto;
    }

    /* Основной текст на мобилках */
    .privacy-layout {
        flex-direction: column;
        padding: 20px;
    }

    .left-side {
        position: relative;
        left: -100px;
    }

    .sidebar-brand-zone {
        padding: 24px 20px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .brand-logo {
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
        font-family: 'Plus Jakarta Sans', sans-serif;
    }

    .brand-sub {
        color: #8ab4f8;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Группировка ссылок */
    .nav-group {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
    }

    .group-title {
        padding: 12px 24px;
        font-size: 11px;
        font-weight: 600;
        color: #70757a;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    .nav-item {
        display: flex;
        align-items: center;
        padding: 12px 24px;
        color: #bdc1c6;
        text-decoration: none;
        font-size: 14px;
        gap: 15px;
        margin-right: 12px;
        border-radius: 0 25px 25px 0; /* Форма Google-пилюли */
        transition: 0.2s;
    }

    .nav-item i {
        width: 20px;
        text-align: center;
        font-size: 16px;
    }

    /* Активная страница (как в Google) */
    .nav-item.active {
        background: rgba(138, 180, 248, 0.12) !important;
        color: #8ab4f8 !important;
        font-weight: 600;
    }

    /* Ссылки внутри документа */
    .anchor-item {
        display: block;
        padding: 10px 24px 10px 58px; /* Сдвигаем вправо под иконки */
        color: #9aa0a6;
        text-decoration: none;
        font-size: 13.5px;
        transition: 0.2s;
    }

    .anchor-item:active {
        background: #1a1a1a;
        color: #fff;
    }

    .sidebar-divider {
        height: 1px;
        background: #222;
        margin: 8px 0;
    }

    .sidebar-header-simple {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 20px;
        transform: translateY(13px);
    }

    .sidebar-header-simple .brand-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .sidebar-header-simple .brand-icon svg {
        width: 20px;
        height: 20px;
        fill: #8ab4f8;
    }

    .sidebar-header-simple .brand-name {
        background: none;
        margin: 0;
        line-height: 1.2;
        transform: translateY(-16px);
    }

    .sidebar-nav-clean {
        flex: 1;
        overflow-y: auto;
        padding: 50px 0;
        margin-top: 0 !important;
    }

    /* Кнопки-ссылки */
    .nav-btn {
        display: flex;
        align-items: center;
        padding: 14px 20px;
        color: #bdc1c6;
        text-decoration: none;
        font-size: 15px;
        gap: 12px;
        transition: 0.2s;
    }

    /* Активная кнопка (как у Google) */
    .nav-btn.active {
        background: rgba(138, 180, 248, 0.1);
        color: #8ab4f8;
        font-weight: 600;
        border-radius: 0 25px 25px 0;
        margin-right: 10px;
    }

    .nav-btn i {
        width: 20px;
        text-align: center;
        font-size: 16px;
    }

    /* Тонкие линии разделения */
    .nav-sep {
        height: 1px;
        background: #222;
        margin: 5px 20px;
        opacity: 0.5;
    }

    /* Список секций под Terms of Service */
    .anchors-list {
        display: flex;
        flex-direction: column;
        padding-left: 52px; /* Сдвиг, чтобы было под текстом кнопки */
        margin-bottom: 10px;
    }

    .anchors-list a {
        padding: 8px 0;
        color: #9aa0a6;
        text-decoration: none;
        font-size: 14px;
        transition: 0.2s;
    }

    .anchors-list a:active { color: #fff; }

    .sidebar-scroll-content {
        overflow-y: auto;
        flex: 1;
        padding-bottom: 30px;
    }

    .section-title {
        padding: 15px 20px 5px;
        font-size: 12px;
        text-transform: uppercase;
        color: #70757a;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .nav-divider {
        height: 1px;
        background: #222;
        margin: 10px 0;
    }

    /* Ссылки на страницы (выглядят жирнее) */
    .nav-page-link {
        font-weight: 600 !important;
        color: #e8eaed !important;
    }

    .nav-page-link i {
        margin-right: 12px;
        width: 18px;
        text-align: center;
        color: #8ab4f8;
    }

    /* Активная страница (подсветка как у Google) */
    .nav-page-link.active {
        background: rgba(138, 180, 248, 0.15) !important;
        color: #8ab4f8 !important;
        border-radius: 0 20px 20px 0;
        margin-right: 10px;
    }

    .sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
    
    /* Ссылки на секции внутри страницы */
    .sidebar-nav a {
        display: block;
        padding: 12px 20px;
        color: #bdc1c6;
        text-decoration: none;
        font-size: 14px;
        transition: 0.2s;
    }

    .sidebar-nav a:active { background: #1a1a1a; }
}

/* Для ПК скрываем мобильный хедер */
@media (min-width: 769px) {
    .mobile-legal-header { display: none; }
}