/* ============================================
   BHSTORE LEGAL - Премиум дизайн документации
   Авторская разработка | Уникальная архитектура
   ============================================ */

/* ========== ДИЗАЙН-СИСТЕМА ========== */
:root {
    --legal-accent: #FF6B35;
    --legal-accent-secondary: #F7931E;
    --legal-surface: rgba(255, 255, 255, 0.02);
    --legal-surface-hover: rgba(255, 255, 255, 0.04);
    --legal-border: rgba(255, 255, 255, 0.04);
    --legal-border-hover: rgba(255, 107, 53, 0.2);
    --legal-glow: 0 0 40px rgba(255, 107, 53, 0.08), 0 0 80px rgba(255, 107, 53, 0.03);
    --legal-transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

/* ========== БАННЕР ========== */
.legal-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 60px;
    background: var(--neutral-900);
}

.legal-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(255, 107, 53, 0.12), transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(108, 99, 255, 0.08), transparent 60%);
    z-index: 1;
}

.legal-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--neutral-950), transparent);
    z-index: 2;
}

.legal-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3) contrast(1.1) saturate(0.6);
    transform: scale(1.05);
    transition: transform 20s ease;
}

.legal-banner:hover .legal-banner-image {
    transform: scale(1.1);
}

.legal-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    padding: 0 80px;
}

.legal-banner-content {
    animation: bannerReveal 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.legal-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.25);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--legal-accent);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.legal-banner-title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.legal-banner-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    display: block;
    margin-top: 8px;
}

/* ========== КОНТЕЙНЕР ========== */
.legal-container {
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 0 24px;
    position: relative;
}

/* ========== НАВИГАЦИЯ ПО РАЗДЕЛАМ ========== */
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding: 8px;
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: 60px;
    backdrop-filter: blur(10px);
    position: sticky;
    top: calc(var(--header-height) + 20px);
    z-index: 10;
}

.legal-nav-item {
    padding: 12px 22px;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: #A09CAE;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.legal-nav-item i {
    font-size: 0.85rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.legal-nav-item:hover {
    background: var(--legal-surface-hover);
    color: white;
}

.legal-nav-item:hover i {
    opacity: 1;
}

.legal-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(247, 147, 30, 0.15));
    color: var(--legal-accent);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.legal-nav-item.active i {
    opacity: 1;
    color: var(--legal-accent);
}

/* ========== СЕКЦИИ ДОКУМЕНТОВ ========== */
.legal-section {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 24px;
    transition: all var(--legal-transition);
    animation: sectionReveal 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    opacity: 0;
}

.legal-section:hover {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--legal-glow);
}

.legal-section:nth-child(2) { animation-delay: 0.1s; }
.legal-section:nth-child(3) { animation-delay: 0.2s; }
.legal-section:nth-child(4) { animation-delay: 0.3s; }
.legal-section:nth-child(5) { animation-delay: 0.4s; }

/* Заголовок секции */
.legal-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--legal-border);
}

.legal-section-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--legal-accent);
    flex-shrink: 0;
}

.legal-section h2 {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
    margin: 0;
}

/* Подзаголовки */
.legal-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--legal-accent);
    margin: 32px 0 16px;
    padding: 12px 20px;
    background: rgba(255, 107, 53, 0.04);
    border-left: 3px solid var(--legal-accent);
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Параграфы с нумерацией */
.legal-paragraph {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.legal-paragraph:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.04);
}

.legal-paragraph-number {
    width: 36px;
    height: 36px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--legal-accent);
    flex-shrink: 0;
    font-family: 'JetBrains Mono', 'Inter', monospace;
}

.legal-paragraph-content {
    flex: 1;
    color: #C4C1D4;
    font-size: 0.95rem;
    line-height: 1.7;
}

.legal-paragraph-content strong {
    color: white;
    font-weight: 600;
}

/* Списки */
.legal-list {
    list-style: none;
    margin: 12px 0 12px 24px;
}

.legal-list li {
    padding: 10px 16px 10px 40px;
    color: #A09CAE;
    font-size: 0.9rem;
    margin-bottom: 6px;
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.legal-list li:hover {
    background: rgba(255, 255, 255, 0.015);
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--legal-accent);
}

/* Контактная сетка */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--legal-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--legal-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--legal-glow);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--legal-accent);
}

.contact-card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.contact-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.contact-card p {
    color: #7C7888;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* ========== АНИМАЦИИ ========== */
@keyframes bannerReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sectionReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 968px) {
    .legal-banner {
        height: 240px;
    }
    
    .legal-banner-overlay {
        padding: 0 40px;
    }
    
    .legal-section {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .legal-banner {
        height: 200px;
    }
    
    .legal-banner-overlay {
        padding: 0 24px;
    }
    
    .legal-banner-title {
        font-size: 1.8rem;
    }
    
    .legal-banner-subtitle {
        font-size: 0.9rem;
    }
    
    .legal-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    
    .legal-nav::-webkit-scrollbar {
        display: none;
    }
    
    .legal-nav-item {
        padding: 10px 16px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .legal-section {
        padding: 24px 20px;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section h3 {
        font-size: 1rem;
        padding: 10px 16px;
    }
    
    .legal-paragraph {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
    }
     
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== ДОСТУПНОСТЬ ========== */
@media (prefers-reduced-motion: reduce) {
    .legal-section,
    .legal-banner-content {
        animation: none !important;
        transition: none !important;
    }
}