/* ========== СТИЛИ ДЛЯ СТРАНИЦ ПОЛИТИК (FAQ, Регламент, AML) ========== */

/* Контейнер страницы */
.policy-page {
    min-height: 100vh;
    background: var(--bg-primary, #ffffff);
}

/* Hero секция */
.policy-hero {
    background: var(--text-primary, #000000);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.policy-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: floatBubble 20s ease-in-out infinite;
}

.policy-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: floatBubble 15s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.policy-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.policy-hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: bounceIn 0.6s ease-out;
}

.policy-hero-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.policy-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    margin: 0 0 16px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.policy-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

/* Основной контент */
.policy-container {
    max-width: 900px;
    margin: -40px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.policy-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 48px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
    border: 1px solid var(--border-color, #e0e0e0);
}

/* Контент из редактора */
.policy-content {
    line-height: 1.9;
    color: var(--text-primary, #000000);
}

.policy-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #000000);
    margin: 40px 0 16px;
    padding-left: 16px;
    border-left: 3px solid var(--text-primary, #000000);
    position: relative;
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary, #000000);
    margin: 28px 0 12px;
}

.policy-content p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary, #666666);
}

.policy-content ul,
.policy-content ol {
    margin: 16px 0 16px 24px;
    padding: 0;
}

.policy-content li {
    margin-bottom: 10px;
    padding-left: 8px;
    color: var(--text-secondary, #666666);
    line-height: 1.7;
}

.policy-content ul li::marker {
    color: var(--text-primary, #000000);
}

.policy-content ol li::marker {
    color: var(--text-primary, #000000);
    font-weight: 600;
}

.policy-content a {
    color: var(--text-primary, #000000);
    text-decoration: none;
    border-bottom: 1px solid var(--text-primary, #000000);
    transition: opacity 0.2s ease;
}

.policy-content a:hover {
    opacity: 0.7;
}

.policy-content strong {
    color: var(--text-primary, #000000);
    font-weight: 600;
}

/* Навигация между страницами */
.policy-nav {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.policy-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-secondary, #fafafa);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.policy-nav-link:hover {
    background: var(--hover-bg, #f5f5f5);
    border-color: var(--border-color, #e0e0e0);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.policy-nav-link.prev {
    flex-direction: row;
}

.policy-nav-link.next {
    flex-direction: row-reverse;
    text-align: right;
}

.policy-nav-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color, #e0e0e0);
}

.policy-nav-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary, #000000);
}

.policy-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.policy-nav-label {
    font-size: 12px;
    color: var(--text-secondary, #666666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.policy-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #000000);
}

/* CTA секция */
.policy-cta {
    background: var(--text-primary, #000000);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 48px;
    position: relative;
    overflow: hidden;
}

.policy-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.policy-cta-content {
    position: relative;
    z-index: 1;
}

.policy-cta h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px;
}

.policy-cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px;
}

.policy-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: white;
    color: var(--text-primary, #000000);
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.policy-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.policy-cta-button svg {
    width: 18px;
    height: 18px;
}

/* Состояния загрузки */
.policy-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.policy-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color, #e0e0e0);
    border-top-color: var(--text-primary, #000000);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.policy-loading-text {
    font-size: 16px;
    color: var(--text-secondary, #666666);
}

.policy-error {
    text-align: center;
    padding: 60px 20px;
}

.policy-error-icon {
    width: 64px;
    height: 64px;
    background: #fff5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.policy-error-icon svg {
    width: 32px;
    height: 32px;
    color: #e74c3c;
}

.policy-error-text {
    font-size: 16px;
    color: var(--text-secondary, #666666);
    margin-bottom: 20px;
}

.policy-error-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--text-primary, #000000);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.policy-error-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .policy-hero {
        padding: 40px 0 60px;
    }

    .policy-hero h1 {
        font-size: 2rem;
    }

    .policy-hero-subtitle {
        font-size: 1rem;
    }

    .policy-hero-icon {
        width: 64px;
        height: 64px;
    }

    .policy-hero-icon svg {
        width: 32px;
        height: 32px;
    }

    .policy-container {
        margin-top: -30px;
    }

    .policy-card {
        padding: 24px;
        border-radius: 20px;
    }

    .policy-content h2 {
        font-size: 1.3rem;
        margin: 32px 0 12px;
    }

    .policy-nav {
        flex-direction: column;
    }

    .policy-nav-link.next {
        flex-direction: row;
        text-align: left;
    }

    .policy-cta {
        padding: 30px 20px;
    }

    .policy-cta h3 {
        font-size: 1.3rem;
    }
}

/* Анимации при появлении */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для печати */
@media print {
    .policy-hero {
        background: none;
        padding: 20px 0;
    }

    .policy-hero h1 {
        color: #333;
    }

    .policy-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .policy-nav,
    .policy-cta {
        display: none;
    }
}
