/* ===================================
   Datenschutz Page Styles
   Clean legal page design with tables
   =================================== */

/* Import base legal styles from impressum.css structure */

/* ===================================
   Hero Section - Simple
   =================================== */

.hero-simple {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.05) 0%,
        rgba(212, 175, 55, 0.02) 50%,
        transparent 100%
    );
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.hero-simple .hero-content {
    text-align: center;
}

.hero-simple .hero-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.hero-simple .hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
}

/* ===================================
   Legal Page Layout
   =================================== */

.legal-page {
    background: var(--color-bg-primary);
}

/* ===================================
   Table of Contents
   =================================== */

.toc-section {
    padding: 3rem 0;
    background: var(--color-bg-secondary);
}

.toc-card {
    background: var(--color-bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.08);
}

.toc-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.toc-nav {
    /* No additional styling needed */
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-decoration: none;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    transition: all var(--transition-base);
}

.toc-list a:hover {
    color: var(--color-accent-gold);
    background: rgba(212, 175, 55, 0.08);
    border-left-color: var(--color-accent-gold);
    transform: translateX(4px);
}

/* ===================================
   Legal Sections
   =================================== */

.legal-section {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.05);
}

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

.legal-section h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
}

.legal-section h3 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* ===================================
   Legal Content
   =================================== */

.legal-content {
    max-width: 900px;
}

.legal-content p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
}

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

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

.legal-content a {
    color: var(--color-accent-gold);
    text-decoration: underline;
    transition: color var(--transition-base);
}

.legal-content a:hover {
    color: var(--color-accent-gold-light);
}

.legal-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.legal-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
}

.legal-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent-gold);
    font-weight: var(--font-weight-bold);
    font-size: 1.2em;
}

/* ===================================
   Info Box
   =================================== */

.info-box {
    background: var(--color-bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent-gold);
    margin: 2rem 0;
}

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

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

.info-box strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.info-box a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: all var(--transition-base);
}

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

/* ===================================
   Placeholder Notes
   =================================== */

.placeholder-note {
    background: rgba(255, 193, 7, 0.08);
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.placeholder-note strong {
    color: var(--color-text-primary);
}

/* ===================================
   Cookie Tables
   =================================== */

.cookie-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
    background: var(--color-bg-secondary);
}

.cookie-table thead {
    background: rgba(212, 175, 55, 0.08);
}

.cookie-table thead th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-serif);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.cookie-table tbody tr {
    border-bottom: 1px solid rgba(212, 175, 55, 0.05);
    transition: background-color var(--transition-base);
}

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

.cookie-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.cookie-table tbody td {
    padding: 1rem;
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    vertical-align: top;
}

.cookie-table tbody td:first-child {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

/* ===================================
   Back to Top
   =================================== */

.back-to-top-section {
    padding: 2rem 0;
    text-align: center;
    background: var(--color-bg-secondary);
}

.back-to-top-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-gold);
    text-decoration: none;
    background: var(--color-bg-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.back-to-top-link:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--color-accent-gold);
    transform: translateY(-2px);
}

.back-to-top-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent-gold);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 968px) {
    .hero-simple {
        min-height: 250px;
    }

    .hero-simple .hero-title {
        font-size: var(--font-size-3xl);
    }

    .legal-section {
        padding: 2.5rem 0;
    }

    .legal-section h2 {
        font-size: var(--font-size-2xl);
    }

    .toc-section {
        padding: 2.5rem 0;
    }

    .toc-card {
        padding: 1.5rem;
    }

    .cookie-table {
        font-size: var(--font-size-sm);
    }

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

@media (max-width: 640px) {
    .hero-simple {
        min-height: 200px;
        padding: 2rem 0;
    }

    .hero-simple .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-simple .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .legal-section {
        padding: 2rem 0;
    }

    .legal-section h2 {
        font-size: var(--font-size-xl);
    }

    .legal-section h3 {
        font-size: var(--font-size-lg);
    }

    .toc-section {
        padding: 2rem 0;
    }

    .toc-card {
        padding: 1.25rem;
    }

    .toc-title {
        font-size: var(--font-size-xl);
    }

    .toc-list a {
        font-size: var(--font-size-sm);
        padding: 0.625rem 0.875rem;
    }

    .info-box {
        padding: 1.5rem;
    }

    .legal-content {
        font-size: var(--font-size-sm);
    }

    /* Make tables scroll horizontally on mobile */
    .cookie-table-container {
        margin: 1.5rem -1rem;
        border-radius: 0;
    }

    .cookie-table {
        font-size: var(--font-size-xs);
        min-width: 600px;
    }

    .cookie-table thead th,
    .cookie-table tbody td {
        padding: 0.5rem 0.625rem;
    }
}

/* ===================================
   Light Theme Support
   =================================== */

[data-theme="light"] .toc-section,
[data-theme="light"] .back-to-top-section {
    background: #f8f9fa;
}

[data-theme="light"] .toc-card,
[data-theme="light"] .info-box,
[data-theme="light"] .cookie-table {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .toc-list a {
    background: #f8f9fa;
}

[data-theme="light"] .toc-list a:hover {
    background: rgba(212, 175, 55, 0.12);
}

[data-theme="light"] .back-to-top-link {
    background: #ffffff;
}

[data-theme="light"] .back-to-top-link:hover {
    background: rgba(212, 175, 55, 0.12);
}

[data-theme="light"] .placeholder-note {
    background: #fff8e1;
    border-left-color: #ffa000;
}

[data-theme="light"] .cookie-table thead {
    background: rgba(212, 175, 55, 0.12);
}

[data-theme="light"] .cookie-table tbody tr {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .cookie-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

[data-theme="light"] .cookie-table-container {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .hero-simple {
        min-height: auto;
        padding: 1rem 0;
        background: none;
        border: none;
    }

    .toc-section {
        page-break-after: always;
    }

    .toc-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

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

    .back-to-top-section {
        display: none;
    }

    .toc-list a {
        color: #000;
        background: none;
        border: none;
    }

    .info-box {
        border: 1px solid #ddd;
        background: #f5f5f5;
    }

    .placeholder-note {
        background: #fff8e1;
        border: 1px solid #ffa000;
    }

    .cookie-table-container {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .cookie-table {
        background: #fff;
    }

    .cookie-table thead {
        background: #f5f5f5;
    }

    .cookie-table thead th {
        border-bottom-color: #ddd;
    }

    .cookie-table tbody tr {
        border-bottom-color: #ddd;
    }

    .cookie-table tbody tr:hover {
        background: none;
    }

    /* Ensure table fits on printed page */
    .cookie-table {
        font-size: 10pt;
    }

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

/* ===================================
   Accessibility - Smooth Scrolling
   =================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .toc-list a:hover,
    .back-to-top-link:hover {
        transform: none;
    }
}

/* ===================================
   Focus States
   =================================== */

.toc-list a:focus-visible,
.back-to-top-link:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 2px;
}

.cookie-table tbody tr:focus-within {
    background: rgba(212, 175, 55, 0.05);
    outline: 2px solid var(--color-accent-gold);
    outline-offset: -2px;
}
