/* CSS Variables */
:root {
    --primary: #FF6B35;
    --primary-dark: #E85A24;
    --secondary: #2563EB;
    --secondary-dark: #1D4ED8;
    --accent: #10B981;
    --background: #FFFFFF;
    --background-alt: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-dark);
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    background: var(--surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text);
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 50;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
}

.dropdown-menu a:hover {
    background: var(--background-alt);
    color: var(--primary);
}

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

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.hero .btn-primary:hover {
    background: var(--background-alt);
}

.hero .btn-secondary {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
}

.hero .btn-secondary:hover {
    background: white;
    color: var(--secondary);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 4rem 1.5rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature p {
    color: var(--text-light);
}

/* Section Titles */
section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Test Grid */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.test-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s;
}

.test-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.test-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tag-mechanica { background: #FEF3C7; color: #92400E; }
.tag-elektro { background: #DBEAFE; color: #1E40AF; }
.tag-optica { background: #D1FAE5; color: #065F46; }
.tag-termodyn { background: #FEE2E2; color: #991B1B; }
.tag-moderne { background: #E9D5FF; color: #6B21A8; }
.tag-overige { background: #F1F5F9; color: #475569; }

.test-card h3 {
    margin-bottom: 0.5rem;
}

.test-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--background-alt);
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.article-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.article-content p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.article-content a {
    font-weight: 600;
    color: var(--primary);
}

/* CTA Section */
.cta {
    background: var(--background-alt);
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
}

.cta h2::after {
    display: none;
}

.cta p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-col p {
    color: #94A3B8;
}

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

.footer-col a {
    color: #94A3B8;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: #94A3B8;
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Page Header */
.page-header {
    background: var(--background-alt);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
}

/* Filter/Sort Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Test Page */
.test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.test-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.test-info-item {
    text-align: center;
}

.test-info-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.test-info-item .label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.question-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.question-number {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: var(--secondary);
    background: var(--background-alt);
}

.option.selected {
    border-color: var(--secondary);
    background: #EFF6FF;
}

.option.correct {
    border-color: var(--accent);
    background: #D1FAE5;
}

.option.incorrect {
    border-color: #EF4444;
    background: #FEE2E2;
}

.option-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-alt);
    border-radius: 50%;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: var(--secondary);
    color: white;
}

.option.correct .option-letter {
    background: var(--accent);
    color: white;
}

.option.incorrect .option-letter {
    background: #EF4444;
    color: white;
}

.explanation {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #FEF9C3;
    border-radius: var(--radius);
    border-left: 4px solid #CA8A04;
}

.explanation h4 {
    color: #854D0E;
    margin-bottom: 0.5rem;
}

.explanation p {
    color: #713F12;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.test-progress {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}

.progress-dot.current {
    background: var(--primary);
}

.progress-dot.answered {
    background: var(--secondary);
}

.progress-dot.correct-answer {
    background: var(--accent);
}

/* Results */
.results-container {
    text-align: center;
    padding: 3rem 1.5rem;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
}

.score-circle .score {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-circle .total {
    font-size: 1.25rem;
    opacity: 0.9;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.stat-item {
    background: var(--background-alt);
    padding: 1rem;
    border-radius: var(--radius);
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item .stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Article Page */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header .article-tag {
    margin-bottom: 1rem;
}

.article-header h1 {
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9375rem;
}

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

.article-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h2::after {
    display: none;
}

.article-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

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

.article-body li {
    margin-bottom: 0.5rem;
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

.article-body img {
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    margin-bottom: 1rem;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    padding: 0.75rem;
    background: var(--background-alt);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.related-links a:hover {
    background: var(--primary);
    color: white;
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.about-content h2 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-content h2::after {
    margin-left: 0;
}

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

.value-card {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.value-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Contact Page */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 5rem 1.5rem;
}

.error-page .error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.error-page h1 {
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legal-content h2::after {
    display: none;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text);
}

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    list-style: disc;
}

/* Test List Page */
.test-list-section {
    padding: 3rem 0;
}

.test-category {
    margin-bottom: 3rem;
}

.test-category h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.test-category h2::after {
    display: none;
}

.category-tests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Article List Page */
.article-list-section {
    padding: 3rem 0;
}

/* Homepage: Popular Tests */
.popular-tests {
    padding: 3rem 0;
}

.popular-tests h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Homepage: Latest Articles */
.latest-articles {
    padding: 3rem 0;
    background: var(--background-alt);
}

.latest-articles h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.article-category {
    margin-bottom: 3rem;
}

.article-category h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.article-category h2::after {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 1rem;
        background: var(--background-alt);
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .test-info {
        gap: 1rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .question-container {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .navigation-buttons, .hero-buttons {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .question-container {
        page-break-inside: avoid;
    }
}
