/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.brand-slogan {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Text Rotation */
.animated-text {
    display: inline-block;
    position: relative;
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    color: transparent;
    /* Fallback for older browsers */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 420px;
    text-align: left;
}

.animated-text::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.text-slide-up {
    animation: slideUp 0.5s ease-out;
}

.text-slide-down {
    animation: slideDown 0.5s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-brand {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Code Window */
.code-window {
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.window-header {
    background: #374151;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.window-dots {
    display: flex;
    gap: 8px;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
}

.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #10b981; }

.code-content {
    padding: 24px;
}

.code-content pre {
    margin: 0;
    color: #e5e7eb;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-content code {
    color: #e5e7eb;
}

/* Syntax Highlighting Colors */
.code-content .comment {
    color: #9ca3af; /* Lighter gray for better contrast on dark background */
    font-style: italic;
}

.code-content .keyword {
    color: #c084fc; /* Purple for keywords */
    font-weight: 600;
}

.code-content .class-name {
    color: #fbbf24; /* Yellow for class names */
    font-weight: 600;
}

.code-content .function {
    color: #60a5fa; /* Blue for functions */
    font-weight: 500;
}

.code-content .variable {
    color: #34d399; /* Green for variables */
}

.code-content .operator {
    color: #f87171; /* Red for operators */
    font-weight: 500;
}

.code-content .bracket {
    color: #a78bfa; /* Light purple for brackets */
    font-weight: 500;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* About Section */
.about {
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.skills {
    margin-top: 2rem;
}

.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Additional Info Sections */
.additional-info {
    margin-top: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.industry-tags,
.language-tags,
.professional-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.industry-tags span,
.language-tags span,
.professional-tags span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.industry-tags span:hover,
.language-tags span:hover,
.professional-tags span:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Special styling for languages */
.language-tags span {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.language-tags span:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Services Section */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* Experience Section */
.experience {
    background: var(--bg-primary);
}

.timeline {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--gradient-primary);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-period {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.cta-section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}



/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.contact-method h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-method p {
    color: var(--text-secondary);
    margin: 0;
}

/* Contact Form */
.contact-form {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* WhatsApp Integration */
.whatsapp-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 12px;
    color: white;
}

.whatsapp-icon {
    font-size: 3rem;
    color: white;
}

.whatsapp-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.whatsapp-text p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

.contact-actions {
    text-align: center;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    color: white;
}

.alternative-contact {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.alternative-contact p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.contact-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    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,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p,
.footer-section li {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-links .separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        padding: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    .nav-menu a:hover {
        background-color: var(--bg-secondary);
        color: var(--primary-color);
    }
    
    .nav-menu a::after {
        display: none; /* Hide hover underline on mobile */
    }
    
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2rem;
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Responsive animated text */
    .animated-text {
        min-width: 320px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    /* Scale down hero visual for tablets */
    .hero-visual {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .code-window {
        transform: perspective(800px) rotateY(-3deg) rotateX(3deg);
        max-height: 300px;
        overflow: hidden;
    }
    
    .code-content {
        padding: 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-container {
        padding: 0 1rem;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-brand {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Mobile animated text */
    .animated-text {
        min-width: 280px;
        font-size: 0.9em;
    }
    
    /* Hide hero visual on very small screens */
    .hero-visual {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

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

.hero-content,
.service-card,
.timeline-item,
.contact-form {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States */
button:focus,
input:focus,
textarea:focus,
a:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    outline-style: solid;
}

/* High contrast focus for better visibility */
.btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Ensure focus is visible on all interactive elements */
.nav-menu a:focus,
.service-card:focus-within,
.timeline-item:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Impressum, Datenschutz & Barrierefreiheit Pages */
.impressum-section,
.datenschutz-section,
.barrierefreiheit-section {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.impressum-content,
.datenschutz-content,
.barrierefreiheit-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.impressum-title,
.datenschutz-title,
.barrierefreiheit-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.impressum-block,
.datenschutz-block,
.barrierefreiheit-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.impressum-block:last-child,
.datenschutz-block:last-child,
.barrierefreiheit-block:last-child {
    border-bottom: none;
}

.impressum-block h2,
.datenschutz-block h2,
.barrierefreiheit-block h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

.impressum-block h3,
.datenschutz-block h3,
.barrierefreiheit-block h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.impressum-block p,
.datenschutz-block p,
.barrierefreiheit-block p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.7;
}

/* Barrierefreiheit specific styles */
.barrierefreiheit-contact {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.barrierefreiheit-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.barrierefreiheit-block ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.barrierefreiheit-block li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.impressum-block p,
.datenschutz-block p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.impressum-block ul,
.datenschutz-block ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.impressum-block li,
.datenschutz-block li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.impressum-block a,
.datenschutz-block a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.impressum-block a:hover,
.datenschutz-block a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.impressum-actions,
.datenschutz-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Responsive Design for Legal Pages */
@media (max-width: 768px) {
    .impressum-content,
    .datenschutz-content,
    .barrierefreiheit-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .impressum-title,
    .datenschutz-title,
    .barrierefreiheit-title {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .impressum-actions,
    .datenschutz-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .barrierefreiheit-contact {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .barrierefreiheit-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 48px;
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0.25rem 0;
    }
    
    /* Better text spacing on mobile */
    .impressum-block,
    .datenschutz-block,
    .barrierefreiheit-block {
        margin-bottom: 2.5rem;
        padding-bottom: 2rem;
    }
    
    .impressum-block h2,
    .datenschutz-block h2,
    .barrierefreiheit-block h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .impressum-block h3,
    .datenschutz-block h3,
    .barrierefreiheit-block h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }
    
    /* Better list spacing */
    .impressum-block ul,
    .datenschutz-block ul,
    .barrierefreiheit-block ul {
        margin: 1.5rem 0;
        padding-left: 1.25rem;
    }
    
    .impressum-block li,
    .datenschutz-block li,
    .barrierefreiheit-block li {
        margin-bottom: 0.75rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .impressum-content,
    .datenschutz-content,
    .barrierefreiheit-content {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
    
    .impressum-title,
    .datenschutz-title,
    .barrierefreiheit-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* Extra spacing for small screens */
    .impressum-block,
    .datenschutz-block,
    .barrierefreiheit-block {
        margin-bottom: 3rem;
    }
    
    /* Compact but readable text */
    .impressum-block p,
    .datenschutz-block p,
    .barrierefreiheit-block p {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1.25rem;
    }
    
    /* Mobile-optimized tables */
    table {
        font-size: 0.9rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    /* Better focus states for mobile */
    .btn:focus,
    .email-link:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* Improved contact buttons spacing */
    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-top: 2rem;
    }
    
    /* Prevent horizontal scrolling on mobile */
    .impressum-content,
    .datenschutz-content,
    .barrierefreiheit-content {
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .impressum-block h2,
    .datenschutz-block h2,
    .barrierefreiheit-block h2 {
        font-size: 1.1rem;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.3;
    }
}

/* Additional Mobile Optimizations for Content Pages */
@media (max-width: 768px) {
    /* Main section padding adjustments */
    .impressum-section,
    .datenschutz-section,
    .barrierefreiheit-section {
        padding: 100px 0 60px;
    }
    
    /* Typography improvements */
    .impressum-block strong,
    .datenschutz-block strong,
    .barrierefreiheit-block strong {
        display: block;
        margin-bottom: 0.5rem;
        color: var(--primary-color);
    }
}

@media (max-width: 480px) {
    /* Further padding reduction for very small screens */
    .impressum-section,
    .datenschutz-section,
    .barrierefreiheit-section {
        padding: 80px 0 40px;
    }
    
    /* Navigation improvements for content pages */
    .nav-container {
        padding: 0 0.75rem;
    }
    
    /* Better text readability */
    .impressum-block,
    .datenschutz-block,
    .barrierefreiheit-block {
        line-height: 1.8;
    }
}
