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

:root {
    --primary-red: #dc2626;
    --dark-red: #b91c1c;
    --light-red: #fee2e2;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    /* Aggressive word breaking for German compound words */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Header & Navigation */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
    text-decoration: none;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-red);
}

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

.phone-number {
    font-weight: bold;
    color: var(--primary-red);
    font-size: 1.1rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--light-red) 100%);
    padding: 140px 0 80px;
    text-align: center;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
}

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

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

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--white);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--light-red);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--light-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-red);
    color: var(--white);
}

.service-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

.experience-badge {
    background: var(--primary-red);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    margin-top: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-red);
    display: block;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--white);
}

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

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--light-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.contact-details p {
    color: var(--text-light);
    margin: 0;
}

/* Contact Form - com_connect plugin fixes */
.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
}

.contact-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.contact-form legend {
    display: none;
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

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

/* com_connect confirmation and error messages */
.comThanks,
.comError,
.com_connect_success,
.com_connect_error {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border-left: 6px solid;
}

.comThanks,
.com_connect_success {
    color: #065f46;
    background: #d1fae5;
    border-left-color: #10b981;
}

.comError,
.com_connect_error {
    color: #991b1b;
    background: #fee2e2;
    border-left-color: #ef4444;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--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 {
    margin-bottom: 1rem;
    color: var(--primary-red);
}

.footer-section p,
.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--white);
}

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

/* Main Content Layout for Standard Pages */
.main-content {
    padding-top: 80px; /* Account for fixed header */
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--light-red) 100%);
    padding: 60px 0 40px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Page Content */
.page-content {
    padding: 60px 0;
    background: var(--white);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.content-wrapper.has-sidebar {
    grid-template-columns: 2fr 1fr;
}

/* Article Content Styling */
.article-content {
    max-width: none;
    /* German compound word handling */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    /* Aggressive breaking for long German words */
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.article-content h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid var(--light-red);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.875rem;
    color: var(--primary-red);
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-light);
}

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

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-light);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-red);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.article-content a {
    color: var(--primary-red);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: var(--dark-red);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-content th {
    background: var(--primary-red);
    color: var(--white);
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background: var(--bg-light);
}

/* Sidebar */
.sidebar {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.sidebar h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid #e5e7eb;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: var(--primary-red);
}

/* Service Pages Specific */
.service-page .page-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

.service-page .page-title,
.service-page .page-subtitle {
    color: var(--white);
}

/* Cards for content sections */
.content-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.content-card h3 {
    color: var(--primary-red);
    margin-top: 0;
}

/* Info boxes */
.info-box {
    background: var(--light-red);
    border-left: 4px solid var(--primary-red);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.info-box.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.info-box.success {
    background: #d1fae5;
    border-left-color: #10b981;
}

/* Tablet/Small Desktop adjustments */
@media (max-width: 1024px) {
    .logo {
        font-size: 1.35rem;
    }
    
    .nav-menu {
        gap: 1.3rem;
    }
    
    .phone-number {
        font-size: 0.95rem;
    }
}

/* Additional breakpoint for tighter screens */
@media (max-width: 900px) {
    .logo {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .phone-number {
        font-size: 0.9rem;
    }
}

/* Mobile Design */
@media (max-width: 768px) {
    .logo {
        font-size: 1.3rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

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

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

    .contact-header {
        display: none;
    }

    .hero-title {
        font-size: 1.6rem;
        line-height: 1.1;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text h2 {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .page-title {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
    
    .page-subtitle {
        font-size: 1rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
    
    .content-wrapper.has-sidebar {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-content {
        padding: 40px 0;
    }
    
    .article-content h1 {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .article-content p,
    .article-content li {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .service-title {
        font-size: 1.15rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .service-description {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
    }

    /* Additional safety for very long words */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 60px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .services,
    .about,
    .contact {
        padding: 60px 0;
    }

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

    /* Even smaller fonts for very small screens */
    .hero-title {
        font-size: 1.4rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .section-title {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .about-text h2 {
        font-size: 1.5rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .service-title {
        font-size: 1.1rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .service-description {
        font-size: 0.9rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Additional mobile styles for very small screens */
@media (max-width: 380px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .hero-title {
        font-size: 1.3rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .section-title {
        font-size: 1.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .about-text h2 {
        font-size: 1.3rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .service-title {
        font-size: 1.05rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .service-description {
        font-size: 0.85rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .page-title {
        font-size: 1.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .article-content h1 {
        font-size: 1.5rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .article-content h2 {
        font-size: 1.3rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}
