/* Gesundheitsforum Europa - Performance-optimiertes CSS */
/* Vanilla CSS mit modernen Features für alle Geräte */

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

:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1a3d73;
    --background-color: #3a4a5c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #eee;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

/* Performance Optimierungen */
img {
    max-width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded,
img[src] {
    opacity: 1;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(44, 90, 160, 0.2);
    z-index: 1001;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* Header */
.header {
    background: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    margin: 0;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 250px;
    display: block;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: var(--background-color);
    color: white;
    padding: 120px 0 80px;
    margin-top: 70px;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 30px;
    animation: slideInLeft 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 300;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

/* Articles Section */
.articles-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.articles-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    color: #666;
    margin-bottom: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.article-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
}

.article-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.read-more::after {
    content: '→';
    margin-left: 8px;
    transition: margin-left 0.3s ease;
}

/* Buttons */
.view-all-btn, .cta-button {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.view-all-btn:hover, .cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.view-all {
    text-align: center;
}

/* Footer */
.footer {
    background: var(--light-bg);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo img {
    height: 30px;
    width: auto;
    max-width: 180px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: #999;
    font-size: 0.85rem;
}

/* Article Pages */
.article.header {
    position: fixed;
    top: 0;
    left: 0;
    background: var(--background-color);
    color: white;
    padding: 120px 0 60px;
    margin-top: 70px;
    text-align: center;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content h2 {
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-size: 1.8rem;
    font-weight: 500;
}

.highlight-box {
    background: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.highlight-box.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.highlight-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin: 50px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.product-cta:hover::before {
    left: 100%;
}

.product-cta h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    nav ul.mobile-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-image {
        order: 2;
    }

    .hero-content {
        order: 1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .article-content {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .articles-section {
        padding: 60px 0;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .article-content {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .reading-progress, .mobile-menu-btn {
        display: none;
    }

    .hero {
        margin-top: 0;
    }

    .article-content {
        max-width: none;
        padding: 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --primary-dark: #000;
        --text-color: #000;
        --border-color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
