:root {
    --bg-color: #020617;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-solid: #0f1223;
    --border-color: rgba(255, 255, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-color: #93c5fd;
    --accent-color-tc: #a78bfa;
    --accent-glow: rgba(96, 165, 250, 0.3);
    --accent-glow-tc: rgba(167, 139, 250, 0.3);
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #020617;
    background-color: var(--bg-color);
    color: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* RTL Support */
[dir="rtl"] { text-align: right; }

.ambient-glow { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; }
.glow-1 { position: absolute; top: -10%; right: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); filter: blur(80px); opacity: 0.5; }
.glow-2 { position: absolute; bottom: -10%; left: -10%; width: 40vw; height: 40vw; background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%); filter: blur(80px); opacity: 0.4; }

header { padding: 6rem 2rem 4rem; max-width: 1000px; margin: 0 auto; text-align: center; }
.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; color: #ffffff; }
h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.5rem; line-height: 1.1; }
.last-updated { color: #ffffff; font-size: 0.9rem; font-weight: 500; }

main { max-width: 1200px; margin: 0 auto; padding: 0 2rem 8rem; }
main.has-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 4rem; align-items: start; }
main.has-sidebar > .overview-box { grid-column: 1 / -1; margin-bottom: 2rem; }
main.has-sidebar > article:only-child { grid-column: 1 / -1; max-width: 800px; margin: 0 auto; width: 100%; }

/* Side Navigation */
nav.side-nav { position: sticky; top: calc(70px + 2rem); height: fit-content; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
nav.side-nav::-webkit-scrollbar { width: 4px; }
nav.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
nav.side-nav ul { list-style: none; }
nav.side-nav a { color: #ffffff; text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: all 0.3s ease; display: block; padding: 0.35rem 0; border-left: 2px solid transparent; padding-left: 1rem; }
nav.side-nav a:hover { color: #ffffff; padding-left: 1.25rem; }
nav.side-nav a:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; border-radius: 4px; }
nav.side-nav a.active { color: #93c5fd; border-left-color: #93c5fd; background: rgba(96, 165, 250, 0.05); }

.content-section { background-color: #0f1223; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 3.5rem; backdrop-filter: blur(12px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); width: 100%; max-width: 100%; overflow: hidden; overflow-wrap: break-word; word-wrap: break-word; position: relative; }

.legal-part-header {
    background: #000000;
    border: none;
    border-left: 8px solid #ffffff;
    padding: 1.25rem 2rem;
    border-radius: 4px;
    margin: 5rem 0 2.5rem 0;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    outline: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-part-header.tc {
    border-left-color: var(--accent-color-tc);
    margin-top: 8rem;
}

.legal-part-header::before {
    content: '§';
    font-size: 1.5rem;
    opacity: 0.6;
}

.group-tc h2::before {
    background-color: var(--accent-color-tc);
}

.nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin: 1.5rem 0 0.5rem 1rem;
    font-weight: 700;
    opacity: 0.8;
}

.nav-group-title.tc {
    color: var(--accent-color-tc);
}

nav.side-nav ul { list-style: none; margin-bottom: 2rem; }

[dir="rtl"] .legal-part-header {
    background: #000000;
    border-left: none;
    border-right: 8px solid #ffffff;
}

[dir="rtl"] .legal-part-header.tc {
    border-right-color: var(--accent-color-tc);
}

[dir="rtl"] .nav-group-title {
    margin: 1.5rem 1rem 0.5rem 0;
}

/* Special Typography */
.legal-header-info { 
    font-size: 0.8rem; 
    color: #93c5fd; 
    margin-bottom: 2.5rem; 
    text-transform: uppercase; 
    letter-spacing: 0.06em; 
    line-height: 1.5;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

section { margin-bottom: 4rem; }
section:last-child { margin-bottom: 0; }

h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.01em; color: var(--text-primary); display: flex; align-items: center; gap: 0.75rem; }
h2::before { content: ''; width: 8px; height: 8px; background-color: var(--accent-color); border-radius: 2px; display: inline-block; flex-shrink: 0; }
[dir="rtl"] h2 { flex-direction: row-reverse; }

h3 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 1rem; color: var(--text-primary); }
h4 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #ffffff; }

p { margin-bottom: 1.25rem; color: #ffffff; font-size: 1rem; line-height: 1.75; }
strong { color: #ffffff; }

ul.list-content { list-style: none; margin-bottom: 1.5rem; }
ul.list-content li { margin-bottom: 0.75rem; padding-left: 1.5rem; position: relative; color: #ffffff; line-height: 1.7; }
ul.list-content li::before { content: '→'; position: absolute; left: 0; color: #93c5fd; font-weight: bold; }
[dir="rtl"] ul.list-content li { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] ul.list-content li::before { left: auto; right: 0; content: '←'; }

.contact-item { margin-bottom: 0.5rem; display: flex; align-items: baseline; gap: 0.5rem; }
.label { color: #93c5fd; font-weight: 600; min-width: 100px; }
[dir="rtl"] .label { margin-right: 0; margin-left: 0.5rem; }

a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(147, 197, 253, 0.4); transition: all 0.2s ease; }
a:hover { opacity: 0.9; text-decoration-color: #93c5fd; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); color: #ffffff; }
.data-table th { color: #ffffff; font-weight: 600; background: rgba(255, 255, 255, 0.02); }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Cards & Special Blocks */
.overview-box { max-width: 1000px; margin: 0 auto 3rem; padding: 0 2rem; }
.overview-card { background-color: #080e1f; background: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.15); border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(12px); }
.overview-card h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.overview-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.overview-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(59, 130, 246, 0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.85rem; }

.legal-basis-card { background-color: #0c1020; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.25rem; }
.legal-basis-card .basis-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #93c5fd; margin-bottom: 0.5rem; font-weight: 600; }

.third-party-card { background-color: #0e1224; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; margin-bottom: 1.5rem; }
.third-party-card .tp-name { font-size: 1.15rem; font-weight: 700; color: #ffffff; margin-bottom: 0.5rem; }
.third-party-card .tp-purpose { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: #93c5fd; margin-bottom: 1rem; font-weight: 600; }

.right-card { background-color: #0c1020; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; margin-bottom: 1rem; }
.right-card .right-title { font-weight: 600; color: #ffffff; margin-bottom: 0.5rem; font-size: 1.05rem; }

.contact-card { background-color: #111827; background: rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 2rem; border: 1px solid var(--border-color); margin-top: 2rem; }
.contact-label { font-weight: 600; min-width: 100px; color: #ffffff; }

.caps-block { text-transform: uppercase; font-weight: 600; letter-spacing: 0.02em; }

/* Navigation Styles */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: #050508;
    background: rgba(5, 5, 5, 0.85);
    border-bottom: 1px solid var(--border-color);
    min-height: 4.5rem;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}
.top-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-nav a:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(255,255,255,0.08);
}
.top-nav a:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
.top-nav a.active-page {
    color: #ffffff;
    border-color: rgba(191, 219, 254, 0.4);
    background-color: #0f1f3d;
    background: rgba(96, 165, 250, 0.12);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
}
.top-nav .lang-divider { width: 1px; background: var(--border-color); margin: 0 0.25rem; }

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    margin: 0.5rem 0;
    transition: all 0.2s ease;
}
.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

#lang-selector {
    background: #0f172a;
    color: #ffffff;
    color-scheme: dark;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C2.185 5.355 2.408 5 2.811 5h9.752a.75.75 0 0 1 .577 1.22L8.207 11.14a.75.75 0 0 1-1.11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
#lang-selector:hover {
    border-color: var(--accent-color);
    background-color: rgba(255,255,255,0.1);
}
#lang-selector:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
#lang-selector option {
    background-color: #0f172a;
    color: #ffffff;
}
/* Ensure contrast on systems that override option colors */
@media (prefers-color-scheme: light) {
    #lang-selector option {
        color: #000000;
        background-color: #ffffff;
    }
}
[dir="rtl"] #lang-selector {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background-position: 1rem center;
}

/* Footer */
footer { text-align: center; padding: 4rem 2rem; border-top: 1px solid var(--border-color); color: #ffffff; font-size: 0.9rem; }
.footer-links { margin-top: 1rem; display: flex; justify-content: center; gap: 1.5rem; }

/* Responsiveness */
@media (max-width: 900px) {
    main.has-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    nav.side-nav { display: none; }
    h1 { font-size: 2.5rem; }
    .content-section { padding: 2.5rem 2rem; }
    .overview-grid { grid-template-columns: 1fr; }
    .data-table { font-size: 0.85rem; display: block; overflow-x: auto; white-space: nowrap; }
    .data-table th, .data-table td { padding: 0.75rem; }

    /* Mobile Menu */
    .top-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1.5rem;
        gap: 0;
        height: auto;
        min-height: auto;
        max-height: 4.5rem; /* Only show toggle initially */
        overflow: hidden;
    }
    .top-nav.open {
        max-height: 100vh;
        overflow-y: auto;
    }
    .mobile-menu-toggle {
        display: block;
        align-self: flex-end;
        z-index: 101;
    }
    .top-nav a, .top-nav .lang-divider, #lang-selector {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    .top-nav.open a, .top-nav.open .lang-divider, .top-nav.open #lang-selector {
        opacity: 1;
        visibility: visible;
        display: block;
    }
    .top-nav.open a {
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 1rem;
        border-radius: 0;
    }
    .top-nav.open .lang-divider {
        height: 1px;
        width: 100%;
        margin: 1rem 0;
        background: var(--border-color);
    }
    .top-nav.open #lang-selector {
        margin: 1rem 0;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    header { padding: 2.5rem 1rem 1.5rem; }
    h1 { font-size: 1.8rem; margin-bottom: 1rem; }
    main { padding: 0 1rem 4rem; }
    
    .content-section { padding: 1.5rem 1rem; border-radius: 16px; margin-top: 1rem; }
    section { margin-bottom: 2.5rem; }
    
    h2 { font-size: 1.3rem; margin-bottom: 1rem; }
    h3 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
    p, ul.list-content li { font-size: 0.95rem; line-height: 1.6; }
    
    .overview-card, .third-party-card, .contact-card, .right-card, .legal-basis-card { padding: 1.25rem; border-radius: 16px; }
    
    .contact-item { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
    .contact-label { min-width: auto; margin-bottom: 0.1rem; }
    
    footer { padding: 2.5rem 1rem; }
    .footer-links { flex-direction: column; gap: 1rem; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Accessibility & Scanners Setup */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1; transform: none; animation: none; }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 2rem;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.skip-link:focus {
    top: 4.5rem; /* Below sticky nav */
}
