/* Legal Pages Specific Styles */

.legal-page {
    padding-top: 100px;
    background-color: var(--white);
    min-height: 100vh;
}

.legal-header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--background-light) 0%, #e9ecef 100%);
    margin-bottom: 3rem;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.last-updated {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    line-height: 1.7;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.legal-section h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
}

.legal-section h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.legal-section p {
    margin-bottom: 1.25rem;
    text-align: justify;
    color: var(--text-dark);
}

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

.legal-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-section li ul,
.legal-section li ol {
    margin: 0.5rem 0;
}

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

/* Contact Information Box */
.contact-info {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

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

/* Cookie Table Styles */
.cookie-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.cookie-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-table td {
    font-size: 0.95rem;
    vertical-align: top;
}

.cookie-table tr:hover {
    background-color: var(--background-light);
}

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

/* Cookie Settings Button */
.cookie-settings-link {
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--background-light);
    border-radius: 10px;
    text-align: center;
}

.cookie-settings-link p {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

#cookie-settings-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cookie-settings-btn:hover {
    background-color: #25704a;
}

/* Highlighted Text Boxes */
.highlight-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.highlight-box.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    border-left-color: #17a2b8;
}

.highlight-box.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-left-color: var(--success-color);
}

.highlight-box.warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    border-left-color: var(--warning-color);
}

.highlight-box.danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-left-color: var(--error-color);
}

/* Legal Links */
.legal-section a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.legal-section a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Table of Contents (if needed) */
.table-of-contents {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--secondary-color);
}

.table-of-contents h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.table-of-contents a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    padding-left: 1rem;
}

/* Definition Lists */
.legal-section dl {
    margin: 2rem 0;
}

.legal-section dt {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-section dd {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

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

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

    .legal-content {
        padding: 0 1rem;
    }

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

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

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

    .contact-info {
        padding: 1.5rem;
    }

    .cookie-table {
        font-size: 0.9rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem 0.5rem;
    }

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

@media (max-width: 480px) {
    .legal-page {
        padding-top: 80px;
    }

    .legal-header {
        padding: 1.5rem 0.5rem;
    }

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

    .legal-content {
        padding: 0 0.5rem;
    }

    .legal-section {
        margin-bottom: 2rem;
    }

    .legal-section p {
        text-align: left;
    }

    .contact-info {
        padding: 1rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .highlight-box {
        padding: 1rem;
    }
}

/* Print Styles for Legal Pages */
@media print {
    .header,
    .footer,
    .cookie-settings-link,
    #cookie-settings-btn {
        display: none !important;
    }

    .legal-page {
        padding-top: 0;
    }

    .legal-header {
        background: none;
        padding: 1rem 0;
    }

    .legal-content {
        max-width: none;
        padding: 0;
        font-size: 11pt;
        line-height: 1.4;
    }

    .legal-section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }

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

    .cookie-table {
        font-size: 9pt;
    }

    .contact-info {
        background: none;
        border: 1px solid #000;
    }
}

/* Accessibility Enhancements */
.legal-section:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.cookie-table:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link for legal pages */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}
