/* ===========================================
   rapitalento - Legal Pages Stylesheet
   Long-form legal typography
   =========================================== */

/* --- Top bar --- */

.rt-legal-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rt-legal-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rt-legal-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rt-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rt-legal-brand:hover {
    color: var(--rt-primary);
}

.rt-legal-brand i {
    color: var(--rt-accent);
}

/* --- Page header --- */

.rt-legal-header {
    text-align: center;
    margin: 3rem 0 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.rt-legal-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--rt-dark);
    margin-bottom: 0.5rem;
}

.rt-legal-header .rt-legal-meta {
    color: var(--rt-gray);
    font-size: 0.9rem;
}

/* --- Content container --- */

.rt-legal-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.rt-legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rt-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}

.rt-legal-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--rt-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.rt-legal-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rt-dark);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.rt-legal-content p,
.rt-legal-content li {
    color: #334155;
    line-height: 1.7;
    font-size: 0.97rem;
}

.rt-legal-content p {
    margin-bottom: 1rem;
}

.rt-legal-content ul,
.rt-legal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.rt-legal-content ul li,
.rt-legal-content ol li {
    margin-bottom: 0.4rem;
}

.rt-legal-content dt {
    font-weight: 600;
    margin-top: 0.75rem;
    color: var(--rt-dark);
}

.rt-legal-content dd {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    color: #334155;
}

.rt-legal-content a {
    color: var(--rt-primary);
    text-decoration: underline;
}

.rt-legal-content a:hover {
    color: var(--rt-primary-dark);
}

/* --- Intro / lead box --- */

.rt-legal-intro {
    background: #f8fafc;
    border-left: 4px solid var(--rt-primary);
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.rt-legal-intro p:last-child {
    margin-bottom: 0;
}

/* --- Important / warning callout --- */

.rt-legal-important {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.rt-legal-warning {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.rt-legal-info {
    background: #dbeafe;
    border-left: 4px solid #2563eb;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* --- Table of contents --- */

.rt-legal-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.rt-legal-toc h2 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--rt-primary);
}

.rt-legal-toc ol {
    padding-left: 1.5rem;
    margin: 0;
}

.rt-legal-toc li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.rt-legal-toc a {
    color: #475569;
    text-decoration: none;
}

.rt-legal-toc a:hover {
    color: var(--rt-primary);
    text-decoration: underline;
}

/* --- Cookie tables --- */

.rt-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.rt-legal-table th,
.rt-legal-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.rt-legal-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: var(--rt-dark);
    border-bottom: 2px solid #cbd5e1;
}

.rt-legal-table tr:hover td {
    background: #fafbfc;
}

/* --- Anchor offset for sticky topbar --- */

.rt-legal-content section {
    scroll-margin-top: 80px;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .rt-legal-header h1 {
        font-size: 1.75rem;
    }
    .rt-legal-content h2 {
        font-size: 1.3rem;
    }
    .rt-legal-toc {
        padding: 1rem 1.25rem;
    }
    .rt-legal-table {
        font-size: 0.82rem;
    }
    .rt-legal-table th,
    .rt-legal-table td {
        padding: 0.5rem;
    }
}
