/* Global Styles - exakt aus Svelte übernommen */

/* System Font Stack */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

html {
    font-family: var(--font-sans);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
    color: #777;
}

.page-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    min-height: 100vh;
}

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

nav {
    background-color: white;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    color: #777;
    text-decoration: none;
    margin-right: 2rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

nav a:hover {
    color: #666;
    text-decoration: none;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: #777;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-right: 0;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.header {
    min-height: 300px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.logo {
    width: 300px;
    height: 300px;
    flex-shrink: 0;
    background-color: #6d6b65;
    min-width: 200px;
    min-height: 200px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-image {
    flex: 1;
    height: 300px;
    position: relative;
    background-color: #f5f5f5;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

main {
    flex: 1;
    padding: 2rem 0;
    padding-bottom: 100px; /* Platz für den Footer */
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f5f5f5;
    color: #777;
    padding: 0.25rem 0;
    text-align: center;
    z-index: 100;
    border-top: 1px solid #eee;
}

footer a {
    color: #777;
    text-decoration: none;
    margin: 0 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

footer a:hover {
    color: #666;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 10px;
    z-index: 1000;
}

.nav-logo-mobile {
    display: none;
}

.burger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #777;
    margin: 5px 0;
    transition: 0.3s;
}

.burger-line.open:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-line.open:nth-child(2) {
    opacity: 0;
}

.burger-line.open:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Desktop: Navigation immer sichtbar - nur ab 1024px */
@media (min-width: 1024px) {
    nav .nav-links,
    nav #navLinks,
    .nav-links {
        display: flex !important;
    }
    
    nav .burger-menu,
    .burger-menu {
        display: none !important;
    }
    
    /* Navigation auf Desktop wieder sticky statt fixed */
    nav {
        position: sticky !important;
        padding: 1rem 0 !important;
    }
    
    /* Body-Padding auf Desktop entfernen */
    body {
        padding-top: 0 !important;
    }
    
    /* Mobile Logo auf Desktop verstecken */
    .nav-logo-mobile {
        display: none !important;
    }
    
    /* Logo im Header auf Desktop sichtbar */
    .header .logo {
        display: block !important;
    }
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    text-align: center;
}

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

.footer-links p {
    margin: 0.25rem 0 0 0;
}

.footer-logo {
    height: 40px;
    width: auto;
}

/* Page-specific styles - nur für die Hauptseite */
.container.main-page {
    max-width: 650px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: #777;
    margin-bottom: 1rem;
}

.welcome {
    margin-bottom: 3rem;
}

/* Mobile One-Pager Styles */
.mobile-onepager section {
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.mobile-onepager h2 {
    font-size: 1.5rem;
}

.presse-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.presse-item {
    text-align: center;
}

.presse-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 0.5rem;
}

.presse-item a {
    color: #777;
    text-decoration: none;
    font-weight: 600;
}

.presse-item a:hover {
    color: #666;
}

/* Mobile One-Pager zusätzliche Styles */
.mobile-onepager ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-top: 1rem;
}

.mobile-onepager li {
    margin: 0.5rem 0;
}

.mobile-onepager .subsection {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 2rem;
}

.mobile-onepager .button {
    display: inline-block;
    background-color: #777;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 3px;
    margin-top: 1rem;
}

.mobile-onepager .button:hover {
    background-color: #444;
}

.mobile-onepager .contact-info {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 0px;
}

.mobile-onepager .info-box {
    margin-bottom: 1.5rem;
}

.mobile-onepager h3 {
    color: #444;
    margin-bottom: 1rem;
}

.mobile-onepager h4 {
    color: #444;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.mobile-onepager .presse-item h4 {
    color: #777;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.mobile-onepager .presse-item p {
    color: #444;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.7;
}

.mobile-onepager .presse-item a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.mobile-onepager .presse-item a:hover {
    opacity: 0.9;
}

.mobile-onepager .presse-item img {
    width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.mobile-onepager .presse-item span {
    display: block;
    margin-top: 0.5rem;
}

/* Additional styles for other pages */
.content {
    margin-bottom: 3rem;
}

h3 {
    color: #444;
    margin-bottom: 1rem;
}

h4 {
    color: #777;
    margin-bottom: 1rem;
}

ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-top: 1rem;
}

li {
    margin: 0.5rem 0;
}

p {
    margin-top: 2px;
    line-height: 1.7;
}

/* Buttons */
.button {
    display: inline-block;
    background-color: #777;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 3px;
    margin-top: 1rem;
}

.button:hover {
    background-color: #444;
}

/* Subsections */
.subsection {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 2rem;
}

/* Contact Info */
.contact-info {
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 5px;
    max-width: 600px;
    margin: 0 auto;
}

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

/* Press Articles */
.presse-artikel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.artikel {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
}

.artikel h4 {
    color: #777;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.artikel p {
    color: #444;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.7;
}

.pdf-link {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pdf-link:hover {
    opacity: 0.9;
}

.thumbnail {
    width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.pdf-link span {
    display: block;
    margin-top: 0.5rem;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.image-tile {
    width: 192px;
    height: 223px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: none;
    background: none;
    padding: 0;
}

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

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    padding: 20px;
    border-radius: 5px;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    margin-bottom: 1rem;
}

.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.nav-button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-description {
    text-align: center;
    color: #777;
    font-size: 1.1rem;
    padding: 0 1rem;
}

.back-button {
    text-align: center;
    margin-top: 2rem;
}

/* Impressum specific styles */
.left-column, .right-column {
    flex: 1;
}

.section {
    margin-bottom: 2rem;
}

/* Datenschutz specific styles */
.index {
    list-style-type: disc;
    padding-left: 2rem;
    margin: 1rem 0;
}

.index-link {
    color: #777;
    text-decoration: none;
    display: block;
    padding: 0.2rem 0;
}

/* Datenschutz content links */
.datenschutz a {
    color: #777;
    text-decoration: none;
}

.datenschutz a:hover {
    color: #666;
    text-decoration: underline;
}

.index-link:hover {
    color: #666;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .logo {
        width: 250px;
        height: 250px;
    }
    
    .header-image {
        height: 250px;
        min-width: 250px;
    }
}

@media (max-width: 900px) {
    .logo {
        width: 200px;
        height: 200px;
    }
    
    .header-image {
        height: 200px;
        min-width: 200px;
    }
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
    /* Typografie für Mobile */
    html {
        font-size: clamp(16px, 4vw, 18px);
    }
    
    body {
        line-height: 1.7;
        font-size: clamp(16px, 4vw, 18px);
    }
    
    p {
        line-height: 1.7;
        font-size: clamp(16px, 4vw, 18px);
        margin: 0.75rem 0;
    }
    
    h1 {
        font-size: clamp(1.75rem, 5vw, 2rem);
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: clamp(1.5rem, 4vw, 1.75rem);
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    h4 {
        font-size: clamp(1.1rem, 3vw, 1.25rem);
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    /* Container-Anpassungen */
    .container {
        max-width: 100%;
        padding: 0 12px;
    }
    
    /* Navigation Container - spezielle Behandlung */
    nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background-color: white !important;
        padding: 1rem 0 !important;
    }
    
    /* Padding für Body, damit Content nicht unter Navigation verschwindet */
    body {
        padding-top: 70px;
    }
    
    nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 0 12px;
    }
    
    /* Mobile Logo in Navigation - rechts positioniert als Quadrat */
    .nav-logo-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        background-color: #6d6b65;
        padding: 8px;
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .nav-logo-mobile img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* Logo im Header für Mobile verstecken */
    .header .logo {
        display: none;
    }
    
    /* Content Container - weniger Padding */
    main .container,
    .container.main-page {
        max-width: 100%;
        padding: 0 12px;
    }
    
    /* Footer Container */
    footer .container {
        padding: 12px;
    }
    
    /* Alle Container auf mobile Geräten auf volle Breite setzen */
    .container[style*="max-width"] {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    /* Speziell für Datenschutz-Seite */
    main.datenschutz .container,
    .datenschutz .container {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        padding: 0 12px;
    }
    
    .datenschutz .content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Navigation - Mobile-tauglich mit großen Touch-Zielen */
    .burger-menu {
        display: block !important;
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
        cursor: pointer;
        background: none;
        border: none;
        position: relative;
        z-index: 1001;
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Navigation auf Mobile - Standard versteckt */
    nav #navLinks,
    nav .nav-links,
    #navLinks,
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #eee;
        z-index: 1000;
        gap: 0.5rem;
        width: 100%;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* Navigation auf Mobile - Geöffnet - HÖCHSTE SPEZIFITÄT mit ID */
    nav #navLinks.open,
    #navLinks.open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
    }
    
    /* Fallback für Klassen-Selektor */
    nav .nav-links.open,
    .nav-links.open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-links a {
        margin: 0;
        padding: 12px 16px;
        min-height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        text-decoration: none;
        color: #777;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }
    
    .nav-links a:hover,
    .nav-links a:active {
        background-color: #f5f5f5;
        color: #666;
    }

    /* Mobile Navigation mit Anker-Links */
    .nav-links a[href^="#"] {
        display: flex !important;
    }

    .dropdown {
        width: 100%;
        text-align: center;
        position: relative;
    }
    
    .dropdown > a {
        min-height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
        width: 100%;
    }

    .dropdown-content {
        position: static !important;
        box-shadow: none;
        border: none;
        display: none !important;
        width: 100%;
        padding: 0.5rem 0;
        background-color: #f9f9f9;
    }
    
    .dropdown-content a {
        min-height: 44px;
        display: flex !important;
        align-items: center;
        padding: 12px 16px;
        width: 100%;
    }
    
    .dropdown-content a:hover {
        background-color: #f0f0f0;
    }

    /* Dropdown öffnen bei Hover oder wenn .open Klasse gesetzt ist */
    .dropdown:hover .dropdown-content,
    .dropdown.open .dropdown-content {
        display: block !important;
    }
    
    /* Auf Mobile: Dropdown per Klick öffnen (nicht nur Hover) */
    @media (hover: none) {
        .dropdown-content {
            display: none !important;
        }
        
        .dropdown.open .dropdown-content {
            display: block !important;
        }
    }

    /* Header-Anpassungen - reduzierte min-height */
    .header {
        min-height: auto;
        height: auto;
        padding: 16px 0;
        margin: 0;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .logo {
        width: 150px;
        height: auto;
        margin: 0 auto;
        min-width: 150px;
        min-height: auto;
        max-height: none;
    }

    .header-image {
        height: auto;
        min-height: 150px;
        max-height: none;
        width: 100%;
        min-width: 0;
        margin: 0 auto;
        flex: none;
        overflow: visible;
    }
    
    .header-image img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* Bilder und Media responsive */
    img,
    video {
        max-width: 100%;
        height: auto;
    }
    
    .logo img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .thumbnail {
        max-width: 100%;
        height: auto;
    }

    /* Footer-Anpassungen */
    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-links {
        text-align: center;
    }
    
    footer {
        position: relative;
        padding: 16px 0;
    }
    
    main {
        padding: 1rem 0;
        padding-bottom: 2rem;
    }

    /* Gallery - einspaltig auf Mobile */
    .gallery {
        grid-template-columns: 1fr !important;
        gap: 16px;
        justify-content: center;
    }

    .image-tile {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4/5;
    }
    
    .image-tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Presse-Artikel - einspaltig */
    .presse-artikel {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .presse-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .presse-item img {
        max-width: 100%;
        height: auto;
    }
    
    .mobile-onepager .presse-item h4 {
        line-height: 1.6;
        font-size: clamp(1.1rem, 3vw, 1.25rem);
    }
    
    .mobile-onepager .presse-item p {
        line-height: 1.7;
        font-size: clamp(16px, 4vw, 18px);
    }
    
    .artikel {
        padding: 1rem;
    }
    
    .artikel h4 {
        line-height: 1.6;
        font-size: clamp(1.1rem, 3vw, 1.25rem);
    }
    
    .artikel p {
        line-height: 1.7;
        font-size: clamp(16px, 4vw, 18px);
    }
    
    .contact-info {
        max-width: 100%;
        padding: 16px;
        margin: 16px 0;
    }
    
    .contact-info p {
        line-height: 1.7;
        font-size: clamp(16px, 4vw, 18px);
    }

    /* Mehrspaltige Layouts - einspaltig */
    .left-column, 
    .right-column {
        flex-direction: column;
        width: 100%;
        flex: none;
    }
    
    .impressum .content,
    .content {
        flex-direction: column !important;
        gap: 16px;
        display: flex;
    }
    
    /* Sections - reduzierte Margins */
    section {
        margin-bottom: 2rem;
    }
    
    .section {
        margin-bottom: 2rem;
        padding: 0;
    }
    
    .welcome {
        margin-bottom: 2rem;
    }
    
    /* Buttons - größere Touch-Ziele */
    .button {
        min-height: 44px;
        padding: 12px 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Subsection */
    .subsection {
        padding: 16px;
        margin-top: 1.5rem;
    }
    
    /* Modal-Anpassungen für Mobile */
    .modal-content {
        max-width: 95vw;
        padding: 16px;
    }
    
    .close-button {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-button {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Tabellen scroll-freundlich */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Overflow verhindern */
    body {
        overflow-x: hidden;
    }
    
    .page-container {
        overflow-x: hidden;
    }
    
    /* Text-Overflow verhindern - Wichtig für alle Container */
    * {
        box-sizing: border-box;
    }
    
    /* Basis-Text-Elemente - sollten immer umbrechen können */
    p, h1, h2, h3, h4, h5, h6, span, strong, em, li, td, th {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Div-Elemente außer Navigation */
    main div,
    section div,
    .content div,
    .subsection div {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Links in Content-Bereichen */
    main a,
    section a,
    .content a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Speziell für text-align: justify Elemente */
    [style*="text-align: justify"],
    p[style*="text-align: justify"] {
        text-align: left !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Inline-Elemente sollten auch umbrechen */
    strong, em, span {
        display: inline;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Namensangaben wie "Holger Wittig" sollten nicht abgeschnitten werden */
    br {
        display: inline-block;
    }
    
    /* Container mit fixen Breiten müssen auf Mobile angepasst werden */
    [style*="width"]:not(nav *):not(.nav-links *) {
        max-width: 100% !important;
    }
    
    /* Alle Elemente sollten innerhalb ihrer Container bleiben - ABER nicht Navigation */
    main .container,
    .container.main-page,
    section,
    .content,
    .subsection,
    .contact-info,
    .artikel,
    .presse-item {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    /* Speziell für Datenschutz-Seite - alle Elemente */
    .datenschutz section,
    .datenschutz .content,
    .datenschutz p,
    .datenschutz h1,
    .datenschutz h2,
    .datenschutz h3,
    .datenschutz ul,
    .datenschutz li,
    .datenschutz .index,
    .datenschutz .index-link {
        max-width: 100%;
        min-width: 0;
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Navigation sollte nicht von Content-Regeln betroffen sein */
    nav {
        box-sizing: border-box;
    }
    
    nav .container {
        box-sizing: border-box;
        max-width: none !important;
    }
    
    .burger-menu {
        box-sizing: border-box;
        max-width: none !important;
        position: relative;
        z-index: 1001;
    }
    
    .nav-links {
        box-sizing: border-box;
        max-width: none !important;
        width: 100%;
    }
    
    .nav-links a,
    .dropdown,
    .dropdown-content,
    .dropdown-content a {
        box-sizing: border-box;
        word-wrap: normal;
        overflow-wrap: normal;
        white-space: nowrap;
    }
    
    /* Sicherstellen, dass .open Klasse auf Mobile funktioniert - HÖCHSTE SPEZIFITÄT */
    nav #navLinks.open,
    nav .nav-links.open,
    #navLinks.open,
    .nav-links.open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
    }
    
    /* Sicherstellen, dass ohne .open Klasse versteckt ist */
    nav #navLinks:not(.open),
    nav .nav-links:not(.open),
    #navLinks:not(.open),
    .nav-links:not(.open) {
        display: none !important;
    }
    
    /* Speziell für beige/hellere Hintergrund-Container */
    section,
    .subsection,
    .contact-info,
    div[style*="background"] {
        overflow: visible;
        word-wrap: break-word;
    }
    
    /* Flexbox-Container sollten nicht überlaufen */
    .header-content,
    .footer-content,
    .content {
        flex-wrap: wrap;
        min-width: 0;
    }
    
    /* Main-Anpassungen */
    main {
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Speziell für mobile-onepager falls vorhanden */
    .mobile-onepager {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-onepager section,
    .mobile-onepager p,
    .mobile-onepager h2,
    .mobile-onepager h3,
    .mobile-onepager h4 {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    /* Zusätzliche Anpassungen für sehr kleine Geräte */
    .container {
        padding: 0 8px;
    }
    
    nav .container {
        padding: 0 8px;
    }
    
    main .container,
    .container.main-page {
        padding: 0 8px;
    }
    
    footer .container {
        padding: 8px;
    }
    
    .logo {
        width: 120px;
        height: auto;
        min-width: 120px;
        min-height: auto;
        max-height: none;
    }
    
    .header-image {
        min-height: 120px;
        max-height: none;
        overflow: visible;
    }
    
    .header-image img {
        object-fit: contain;
    }
    
    .contact-info {
        padding: 12px;
    }
    
    .subsection {
        padding: 12px;
    }
}

/* Kontakt specific styles */
.contact-info p {
    margin-bottom: 0;
    line-height: 1.6;
}

.contact-info .info-box p {
    margin-bottom: 0;
}

.contact-info a {
    color: #777;
    text-decoration: none;
}

.contact-info a:hover {
    color: #666;
    text-decoration: underline;
}

/* Impressum specific styles */
.impressum .content {
    display: flex;
    gap: 4rem;
}

.impressum .left-column, .impressum .right-column {
    flex: 1;
}
