/* ═══════════════════════════════════════════════════════════════════════════════
   KUENTRIX — Legal Pages Stylesheet
   Professional legal document styling, coherent with main design system
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Legal Page Container ── */
.legal-page {
    background: var(--bg, #F8F9FF);
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
    font-family: var(--font-primary, 'Nunito', sans-serif);
    color: var(--dark, #2D3436);
    line-height: 1.8;
}

.legal-container {
    max-width: 860px;
    margin: 0 auto;
    background: var(--white, #FFFFFF);
    border-radius: var(--radius-lg, 24px);
    padding: 3rem 3.5rem;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

/* ── Title ── */
.legal-title {
    font-family: var(--font-display, 'Baloo 2', cursive);
    font-size: 2.2rem;
    color: var(--dark, #0f172a);
    margin-bottom: 0.3rem;
    line-height: 1.3;
    text-align: center;
}

/* ── Last Updated / Version ── */
.legal-updated {
    text-align: center;
    color: var(--gray, #636E72);
    font-size: 0.92rem;
    margin: 0.15rem 0;
    font-style: italic;
}

/* ── Section ── */
.legal-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-lighter, #DFE6E9);
}

.legal-section:first-of-type {
    margin-top: 2rem;
    border-top: none;
    padding-top: 0;
}

.legal-section h2 {
    font-family: var(--font-display, 'Baloo 2', cursive);
    font-size: 1.55rem;
    color: var(--dark, #0f172a);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.legal-section h3 {
    font-family: var(--font-primary, 'Nunito', sans-serif);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary, #0b7285);
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.legal-section p {
    margin-bottom: 0.9rem;
    font-size: 0.98rem;
}

/* ── Lists ── */
.legal-section ul,
.legal-section ol {
    margin: 0.6rem 0 1rem 1.2rem;
    padding-left: 0.6rem;
}

.legal-section ul li,
.legal-section ol li {
    margin-bottom: 0.5rem;
    font-size: 0.97rem;
    line-height: 1.7;
}

.legal-section ul {
    list-style-type: disc;
}

.legal-section ol {
    list-style-type: decimal;
}

/* ── Info Box ── */
.legal-info-box {
    background: linear-gradient(135deg, rgba(11, 114, 133, 0.06) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-left: 4px solid var(--primary, #0b7285);
    border-radius: var(--radius-sm, 10px);
    padding: 1.3rem 1.5rem;
    margin: 1.2rem 0;
    font-size: 0.96rem;
}

.legal-info-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legal-info-box ul li {
    margin-bottom: 0.4rem;
    padding-left: 0;
}

.legal-info-box p {
    margin-bottom: 0.6rem;
}

.legal-info-box p:last-child {
    margin-bottom: 0;
}

/* ── Tables ── */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin: 0.5rem 0;
}

.legal-table thead {
    background: linear-gradient(135deg, #0b7285 0%, #0ea5e9 100%);
    color: var(--white, #FFFFFF);
}

.legal-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.legal-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--gray-lighter, #DFE6E9);
    vertical-align: top;
}

.legal-table tbody tr:nth-child(even) {
    background: rgba(11, 114, 133, 0.03);
}

.legal-table tbody tr:hover {
    background: rgba(11, 114, 133, 0.06);
}

/* ── Links ── */
.legal-section a {
    color: var(--primary, #0b7285);
    text-decoration: underline;
    text-decoration-color: rgba(11, 114, 133, 0.35);
    text-underline-offset: 2px;
    transition: var(--transition);
}

.legal-section a:hover {
    color: var(--accent-dark, #0284c7);
    text-decoration-color: rgba(14, 165, 233, 0.45);
}

/* ── Navigation between pages ── */
.legal-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-lighter, #DFE6E9);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.legal-nav a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-pill, 50px);
    background: linear-gradient(135deg, rgba(11, 114, 133, 0.08) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: var(--primary, #0b7285);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(11, 114, 133, 0.18);
}

.legal-nav a:hover {
    background: var(--gradient-primary);
    color: var(--white, #FFFFFF);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ── Cookie Consent Banner ── */
.t4k-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: var(--white, #FFFFFF);
    border-top: 3px solid var(--purple, #6C5CE7);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    padding: 1.5rem 2rem;
    animation: t4k-slide-up 0.4s ease-out;
}

@keyframes t4k-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.t4k-cookie-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.t4k-cookie-text {
    max-width: 700px;
}

.t4k-cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark, #2D3436);
    line-height: 1.6;
}

.t4k-cookie-text p:first-child {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark, #2D3436);
}

.t4k-cookie-text a {
    color: var(--purple, #6C5CE7);
    text-decoration: underline;
    font-weight: 600;
}

.t4k-cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.t4k-cookie-actions button {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.t4k-cookie-actions button.btn-primary {
    background: var(--purple, #6C5CE7);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

.t4k-cookie-actions button.btn-primary:hover {
    background: var(--purple-dark, #5b4cdb);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.35);
}

.t4k-cookie-actions button.btn-secondary {
    background: transparent;
    color: var(--gray, #636e72);
    border: 2px solid var(--gray-lighter, #dfe6e9);
}

.t4k-cookie-actions button.btn-secondary:hover {
    background: var(--gray-lighter, #f5f6fa);
    color: var(--dark, #2D3436);
    border-color: var(--gray-light, #b2bec3);
}

/* ── Footer Legal Grid ── */
.t4k-footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 1.5rem 0;
    text-align: left;
}

.t4k-footer-col h4 {
    font-family: var(--font-display, 'Baloo 2', cursive);
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: var(--white, #FFFFFF);
    opacity: 0.9;
}

.t4k-footer-col .t4k-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.t4k-footer-col .t4k-footer-links li a {
    font-size: 0.88rem;
    opacity: 0.8;
}

.t4k-footer-col .t4k-footer-links li a:hover {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .legal-container {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-md, 16px);
    }

    .legal-title {
        font-size: 1.7rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

    .legal-table {
        font-size: 0.82rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.5rem 0.6rem;
    }

    .legal-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .legal-nav a {
        text-align: center;
    }

    .t4k-cookie-banner {
        padding: 1.25rem 1rem;
    }
    
    .t4k-cookie-content {
        gap: 1rem;
    }

    .t4k-cookie-text p {
        font-size: 0.85rem;
    }
    
    .t4k-cookie-text p:first-child {
        font-size: 0.92rem;
    }

    .t4k-cookie-actions {
        width: auto;
    }

    .t4k-cookie-actions button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .t4k-footer-links-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 1.5rem 1rem;
    }

    .legal-title {
        font-size: 1.4rem;
    }

    .legal-info-box {
        padding: 1rem;
    }

    /* Scrollable tables on very small screens */
    .legal-info-box:has(.legal-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
