/* Shared styles for legal pages (offer, policies, agreements) */

.legal-hero {
    padding: 4rem 0 2rem;
}

.legal-hero .legal-kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

.legal-hero h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.legal-hero .legal-lead {
    color: var(--text-secondary);
    max-width: 70ch;
    font-size: 1.05rem;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.legal-meta span {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
    padding: 1rem 0 5rem;
}

.legal-toc {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(14px);
}

.legal-toc h2 {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    gap: 0.55rem;
}

.legal-toc li {
    counter-increment: toc;
    font-size: 0.9rem;
}

.legal-toc a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.legal-toc a::before {
    content: counter(toc) '. ';
    color: var(--accent-cta);
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--text-primary);
}

.legal-body {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 3vw, 3rem);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.legal-body section {
    scroll-margin-top: calc(var(--header-height) + 32px);
}

.legal-body section + section {
    margin-top: 2.5rem;
}

.legal-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.legal-body h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.6rem;
}

.legal-body p,
.legal-body li {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
}

.legal-body p + p {
    margin-top: 0.85rem;
}

.legal-body ul,
.legal-body ol {
    margin: 0.85rem 0 0 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.legal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-body a:not(.btn-primary):not(.btn-secondary) {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-note {
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent-cta);
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.legal-note p {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.legal-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}

.legal-table th {
    color: var(--text-primary);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-requisites {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 1.75rem;
}

.legal-requisites dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.5rem 1.5rem;
    font-size: 0.92rem;
}

.legal-requisites dt {
    color: var(--text-secondary);
}

.legal-requisites dd {
    color: var(--text-primary);
}

.legal-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
}

.legal-related a {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.legal-related a:hover,
.legal-related a:focus-visible {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .legal-hero {
        padding: 2.5rem 0 1rem;
    }

    .legal-requisites dl {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .legal-requisites dd {
        margin-bottom: 0.7rem;
    }
}

/* Documents index page */

.documents-hero {
    min-height: 30vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    color: white;
    padding: 4rem 0 2.5rem;
}

.documents-hero * {
    color: white !important;
}

.documents-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.documents-hero .hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

.documents-section {
    padding: 5rem 0;
    background: transparent;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.document-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(3, 8, 20, 0.32);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(14px);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 70px rgba(3, 8, 20, 0.42);
}

.document-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.15));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.document-card h3 {
    color: #F5F7FB;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.document-description {
    color: #98A7C2;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #888888;
    margin-top: auto;
}

.document-size {
    background: rgba(0, 87, 168, 0.1);
    color: #0057A8;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.document-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-download {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.btn-download:hover {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    transform: translateY(-2px);
}

.btn-preview {
    background: transparent;
    color: #F5F7FB;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}

.btn-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.documents-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: #F5F7FB;
    margin-bottom: 1rem;
    border-bottom: 3px solid #8B5CF6;
    padding-bottom: 0.5rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .documents-hero {
        min-height: 20vh;
        padding: 2rem 0;
    }
    
    .documents-hero .hero-title {
        font-size: 1.8rem;
    }
    
    .documents-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .document-actions {
        flex-direction: column;
    }
}
