/* ==================== Legal Pages Styles ==================== */
/* Shared styles for Terms of Service, Privacy Policy, and Cookies pages */

/* ==================== Main Container ==================== */
.legal-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--color-background);
}

.legal-content {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* ==================== Page Header ==================== */
.legal-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-accent);
}

.legal-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.legal-header .last-updated {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-header .last-updated::before {
    content: "📅";
    font-size: 1.1rem;
}

/* ==================== Table of Contents ==================== */
.table-of-contents {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.table-of-contents h2 {
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-of-contents h2::before {
    content: "📑";
    font-size: 1.5rem;
}

.table-of-contents ol {
    list-style: none;
    counter-reset: item;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    counter-increment: item;
    margin-bottom: 0.75rem;
}

.table-of-contents li::before {
    content: counter(item) ". ";
    font-weight: 600;
    color: var(--color-accent);
    margin-right: 0.5rem;
}

.table-of-contents a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.table-of-contents a:hover {
    border-bottom-color: var(--color-accent);
}

/* ==================== Legal Sections ==================== */
.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--color-text);
    line-height: 1.8;
}

.legal-section li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.legal-section ul li::marker {
    color: var(--color-accent);
    font-weight: 600;
}

.legal-section ol li::marker {
    color: var(--color-accent);
    font-weight: 600;
}

/* ==================== SVG Icons ==================== */
.icon-svg {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.icon-svg-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-svg-xl {
    width: 2rem;
    height: 2rem;
}

/* ==================== Highlight Boxes ==================== */
.highlight-box {
    background: linear-gradient(135deg, var(--color-accent)15, var(--color-primary)10);
    border-left: 4px solid var(--color-accent);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.highlight-box::before {
    content: '';
    flex-shrink: 0;
}

.highlight-box strong {
    color: var(--color-accent);
}

.highlight-box p {
    margin: 0;
}

/* ==================== Warning/Important Boxes ==================== */
.important-notice {
    background: rgba(224, 168, 0, 0.1);
    border-left: 4px solid var(--color-warning);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.important-notice::before {
    content: '';
    flex-shrink: 0;
}

/* ==================== Contact Section ==================== */
.contact-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: var(--shadow-sm);
}

.contact-section h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.contact-section p {
    margin-bottom: 0.75rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.contact-info a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* ==================== Professional Footer for Legal Pages ==================== */
.site-footer {
    background: var(--color-primary);
    color: var(--color-nav-text);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid var(--color-nav-border);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1rem;
}

.footer-section h3 {
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
    padding-right: 0.5rem;
}

.footer-links a::before {
    content: "→";
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--color-nav-border);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

/* ==================== Responsive Design for Legal Pages ==================== */
@media (max-width: 768px) {
    .legal-content {
        padding: 2rem 1.5rem;
    }

    .legal-header h1 {
        font-size: 1.75rem;
    }

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

    .legal-section h3 {
        font-size: 1rem;
    }

    .table-of-contents {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .site-footer {
        padding: 2rem 1.5rem 1rem;
    }
}

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

    .legal-header h1 {
        font-size: 1.5rem;
    }

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

    .legal-section h3 {
        font-size: 0.95rem;
    }

    .legal-section ul,
    .legal-section ol {
        margin-left: 1.5rem;
    }

    .table-of-contents {
        padding: 1rem;
    }

    .highlight-box,
    .important-notice,
    .contact-section {
        padding: 1rem;
    }

    .site-footer {
        padding: 1.5rem 1rem 0.75rem;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 0.95rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .navbar,
    .site-footer,
    .table-of-contents {
        display: none;
    }

    .legal-content {
        padding: 0;
        max-width: 100%;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-section h2 {
        page-break-after: avoid;
    }
}

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

.legal-section {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== Accessibility ==================== */
.legal-section a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.legal-section a:hover,
.legal-section a:focus {
    color: var(--color-primary);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.legal-section a:focus {
    outline: 2px solid var(--color-accent);
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}
