/* =============================================
   GERMAN LANGUAGE ADJUSTMENTS
   Fixes for long German words (overflow issues)
   Only applies when html[lang="de"]
   ============================================= */

/* =========================
   GLOBAL WORD-BREAK FOR GERMAN
   ========================= */
html[lang="de"] {
    /* Enable hyphenation for better word breaking */
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

html[lang="de"] body {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =========================
   NAVIGATION MENU
   ========================= */
/* Fix for "Kundenbewertungen" overflow in menu */
html[lang="de"] .navbar-links a {
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}


/* Submenu items */
html[lang="de"] .submenu a {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   SERVICE HERO TITLES
   ========================= */
/* Fix for long service page titles */
html[lang="de"] .service-hero-title {
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

html[lang="de"] .service-hero-title .highlight {
    word-break: break-word;
    hyphens: auto;
}

html[lang="de"] .service-hero-subtitle {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   SERVICES GRID (Homepage)
   ========================= */
/* Fix for service cards with long titles */
html[lang="de"] .service-card h3,
html[lang="de"] .service-card-title {
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

html[lang="de"] .service-card p,
html[lang="de"] .service-card-description {
    word-break: break-word;
    hyphens: auto;
}

html[lang="de"] .services-heading {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   AVIS / REVIEWS SECTION
   ========================= */
/* Fix for "Kundenbewertungen" title overflow */


/* =========================
   HERO SECTION (Homepage)
   ========================= */
html[lang="de"] .hero-title,
html[lang="de"] .hero-section h1 {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   FOOTER
   ========================= */
html[lang="de"] footer h3,
html[lang="de"] footer h4,
html[lang="de"] .footer-title {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   BUTTONS & LINKS
   ========================= */
/* Most buttons should NOT break */
html[lang="de"] .btn,
html[lang="de"] .cta-button,
html[lang="de"] button {
    word-break: normal;
    hyphens: manual;
}

/* But allow long link text to break if needed */
html[lang="de"] a:not(.btn):not(.cta-button):not(button) {
    word-break: break-word;
    hyphens: auto;
}

/* =========================
   AVIS / REVIEWS SECTION
   ========================= */
/* Fix for "Kundenbewertungen" title overflow */
html[lang="de"] .avis-hero h1,
html[lang="de"] .section-title,
html[lang="de"] h1,
html[lang="de"] h2 {
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Fix for avis-note-row with score + button */
html[lang="de"] .avis-note-row {
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 12px;
}

html[lang="de"] .avis-score {
    font-size: 0.95rem; /* Slightly smaller */
    word-break: break-word;
    flex-shrink: 1;
    min-width: 0;
}

html[lang="de"] .avis-btn {
    word-break: normal; /* Buttons shouldn't break */
    white-space: nowrap;
    font-size: 0.9rem; /* Slightly smaller for long text */
    padding: 10px 16px; /* Adjust padding */
    flex-shrink: 0;
}

/* =========================
   RESPONSIVE ADJUSTMENTS
   ========================= */
@media (max-width: 768px) {
    /* Mobile: more aggressive word breaking */
    html[lang="de"] .navbar-links li {
        max-width: 140px;
    }
    
    html[lang="de"] .service-hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    html[lang="de"] .hero-title {
        font-size: clamp(2.2rem, 7vw, 3.5rem);
    }
    
    html[lang="de"] .avis-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    html[lang="de"] .avis-score {
        font-size: 0.85rem;
    }
    
    /* Force wrap on mobile */
    html[lang="de"] .avis-note-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    /* Very small screens: even more compact */
    html[lang="de"] h1 {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }
    
    html[lang="de"] .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }
    
    html[lang="de"] .navbar-links a {
        font-size: 1rem;
    }
}
