/* ========================================
   GDPR Information Portal - Styles
   ======================================== */

/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #3385d6;
    --secondary-color: #00a651;
    --accent-color: #ff6b00;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #ffffff;
    --bg-gray: #f5f7fa;
    --bg-dark: #1a1a1a;
    --border-color: #e0e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   Layout Components
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

/* ========================================
   Header
   ======================================== */
.site-header {
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo a {
    display: block;
    text-decoration: none;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1;
}

.logo .highlight {
    color: var(--primary-color);
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}

/* Navigation */
.main-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Header Search */
.header-search {
    position: relative;
    min-width: 250px;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--primary-color);
    background: white;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
}

.search-form button {
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.search-form button:hover {
    color: var(--primary-color);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-gray);
}

.search-result-item .type {
    font-size: 0.75rem;
    color: var(--text-lighter);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-result-item .title {
    font-weight: 500;
    color: var(--text-color);
    margin-top: 0.25rem;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs {
    background: var(--bg-gray);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumbs nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--text-lighter);
}

.breadcrumbs .current {
    color: var(--text-light);
}

/* ========================================
   Main Content
   ======================================== */
main {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.hero-stat .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* ========================================
   Cards & Boxes
   ======================================== */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.card-content {
    color: var(--text-color);
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Info Box */
.info-box {
    background: var(--bg-gray);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.info-box.warning {
    border-left-color: var(--accent-color);
    background: #fff8f0;
}

.info-box.success {
    border-left-color: var(--secondary-color);
    background: #f0fdf4;
}

/* ========================================
   Grid Layouts
   ======================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ========================================
   Article Content
   ======================================== */
.article-container {
    max-width: 900px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.article-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 0.5rem 0 1rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

.article-body li {
    margin-bottom: 0.75rem;
}

.article-body strong {
    font-weight: 600;
    color: var(--text-color);
}

/* Article Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    gap: 1rem;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-button:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-button.disabled {
    background: var(--bg-gray);
    color: var(--text-lighter);
    cursor: not-allowed;
    pointer-events: none;
}

/* Related Content */
.related-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
}

.related-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.related-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.related-item {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.related-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.related-item a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.related-item a:hover {
    text-decoration: underline;
}

/* ========================================
   Lists & Tables
   ======================================== */
.article-list {
    list-style: none;
}

.article-list-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.article-list-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.article-list-item h3 {
    margin: 0 0 0.5rem;
}

.article-list-item h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-list-item h3 a:hover {
    color: var(--primary-color);
}

.article-list-item p {
    color: var(--text-light);
    margin: 0;
}

.chapter-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

thead {
    background: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

tbody tr:hover {
    background: var(--bg-gray);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    text-decoration: none;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--bg-dark);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-section .stats {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.footer-section .legal-notice {
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ========================================
   Search Results
   ======================================== */
.search-header {
    margin-bottom: 2rem;
}

.search-results {
    max-width: 900px;
    margin: 0 auto;
}

.search-result {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.search-result:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.search-result-type {
    font-size: 0.8rem;
    color: var(--text-lighter);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result h3 {
    margin: 0.5rem 0;
}

.search-result h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.search-result h3 a:hover {
    color: var(--primary-color);
}

.search-result-excerpt {
    color: var(--text-light);
    line-height: 1.6;
}

.search-result-excerpt mark {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

/* ========================================
   FAQ
   ======================================== */
.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-gray);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question.active::after {
    content: '−';
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        width: 100%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li a {
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-navigation {
        flex-direction: column;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container,
    .container-wide,
    .container-narrow {
        padding: 0 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .card {
        padding: 1rem;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ========================================
   Print Styles - Optimized for printing/PDF
   ======================================== */
@media print {
    /* Hide navigation and interactive elements */
    .site-header,
    .site-footer,
    .breadcrumbs,
    .article-navigation,
    .related-section,
    .search-form,
    .mobile-menu-toggle,
    .nav-button,
    button {
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    /* Typography adjustments */
    h1 {
        font-size: 24pt;
        page-break-after: avoid;
        margin-top: 0;
    }

    h2 {
        font-size: 18pt;
        page-break-after: avoid;
        margin-top: 20pt;
    }

    h3 {
        font-size: 14pt;
        page-break-after: avoid;
    }

    /* Avoid breaking inside elements */
    .info-box,
    .card,
    .article-list-item,
    pre,
    blockquote {
        page-break-inside: avoid;
    }

    /* Links */
    a {
        color: #000;
        text-decoration: underline;
    }

    /* Show URLs after external links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }

    /* Don't show URLs for internal navigation */
    a[href^="/"]:after,
    a[href^="#"]:after {
        content: "";
    }

    /* Article container */
    .article-container {
        max-width: 100%;
        padding: 0;
        box-shadow: none;
        border: none;
    }

    /* Info boxes */
    .info-box {
        border: 1px solid #ddd;
        background: #f9f9f9;
        page-break-inside: avoid;
    }

    /* Remove shadows and backgrounds */
    .card,
    .hero {
        box-shadow: none;
        background: transparent;
        border: 1px solid #ddd;
    }

    /* Footer note */
    .article-container::after {
        content: "Printed from GDPR Information Portal";
        display: block;
        margin-top: 2cm;
        padding-top: 1cm;
        border-top: 1px solid #ddd;
        font-size: 10pt;
        color: #666;
        text-align: center;
    }
}
