/* ===== CSS-Variablen für konsistentes Design ===== */
:root {
    --primary: #d32f2f;
    --primary-dark: #9a0007;
    --primary-light: #ff6659;
    --secondary: #f44336;
    --accent: #e53935;
    --light: #ffffff;
    --dark: #424242;
    --text: #333333;
    --text-light: #ffffff;
    --gray-100: #f9f9f9;
    --gray-200: #e9e9e9;
    --gray-300: #d9d9d9;
    --gray-400: #c9c9c9;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --section-padding: 80px 0;
    --border-radius: 8px;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--gray-100);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Hilfsklassen */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto;
    border-radius: 3px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    height: 100%;
}

/* ===== Header Styles ===== */
.header {
    height: 100vh;
    background: linear-gradient(rgba(211, 47, 47, 0.85), rgba(211, 47, 47, 0.85)), 
                url('https://test1-emgndhaqd0c9h2db.a01.azurefd.net/images/ff3aa380-24fd-46cf-aa89-dd4f5362e948.png') center/cover no-repeat;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

.header-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    color: white;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(211, 47, 47, 0.9) 100%);
    z-index: 1;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Header-Card komplett ausblenden, wie gewünscht */
.header-card {
    display: none;
}

.logo-container {
    margin-bottom: 2.5rem;
    animation: fadeIn 1.5s ease-out;
}

.header-logo, .footer-logo, .nav-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Anpassung für das Logo in der Navigationsleiste */
.nav-logo {
    height: 80px;
    width: auto;
    margin-right: 10px;
    transition: var(--transition);
}

/* Logo-Varianten für Farbwechsel */
.white-logo {
    display: block;
}

.color-logo {
    display: none;
}

.nav-scrolled .white-logo {
    display: none;
}

.nav-scrolled .color-logo {
    display: block;
}

.mouse-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--light);
    border-radius: 15px;
    opacity: 0.7;
    transition: var(--transition);
    z-index: 2;
}

.mouse-scroll::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: var(--light);
    border-radius: 2px;
    animation: scrollDown 2s infinite;
}

.mouse-scroll:hover {
    opacity: 1;
}

@keyframes scrollDown {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
    box-shadow: var(--shadow);
    z-index: -1;
}

.nav-scrolled::before {
    opacity: 1;
}

.nav-scrolled .nav-link {
    color: var(--text);
}

.nav-scrolled .logo-link {
    color: var(--primary);
}

.scroll-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 1000;
    transition: width 0.1s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    z-index: 1001;
    transition: var(--transition);
    margin-left: -20px; /* Logo nach links schieben */
}

.nav-links {
    display: flex;
    list-style: none;
    transition: var(--transition);
}

.nav-link {
    color: white;
    margin-left: 30px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-light);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Für den gescrollten Zustand */
.nav-scrolled .nav-link.active {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    background: transparent;
    border: none;
    z-index: 1001;
    transition: var(--transition);
}

.nav-scrolled .mobile-toggle {
    color: var(--text);
}

/* ===== About Section ===== */
.about {
    background: #ffffff;
    min-height: 500px; /* Mindesthöhe hinzugefügt */
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.team-member {
    display: flex;
    gap: 30px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 1; /* Änderung von 0 auf 1, damit der Inhalt sofort sichtbar ist */
    transform: translateY(0); /* Änderung, damit keine initiale Verschiebung stattfindet */
}

.team-member.animated {
    opacity: 1;
    transform: translateY(0);
}

.team-member:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.team-img-container {
    position: relative;
    flex-shrink: 0;
}

.team-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background-color: var(--gray-200); /* Hintergrundfarbe hinzugefügt */
}

.team-member:hover .team-img {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.team-social {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0.8; /* Änderung auf sichtbar */
    transform: translateY(0); /* Keine Verschiebung */
}

.team-member:hover .team-social {
    opacity: 1;
    transform: translateY(0);
}

.team-info {
    flex: 1;
}

.team-info h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* ===== Services Section ===== */
.services {
    background: var(--gray-100);
    position: relative;
    min-height: 500px; /* Mindesthöhe hinzugefügt */
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://placehold.co/100x100/d32f2f/ffffff') center/30px;
    opacity: 0.05;
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover .service-icon {
    transform: scale(1.1);
    color: var(--primary-light);
}

.card h3 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.card:hover h3::after {
    width: 100px;
}

/* ===== References Section ===== */
.references {
    background: #ffffff;
    min-height: 500px; /* Mindesthöhe hinzugefügt */
}

.reference-container {
    margin: 40px 0;
}

.reference-card {
    padding: 30px;
    margin-bottom: 40px;
}

.reference-logo {
    max-width: 150px;
    margin-bottom: 30px;
    transition: var(--transition);
    background-color: var(--gray-200); /* Hintergrundfarbe hinzugefügt */
}

.reference-card:hover .reference-logo {
    transform: scale(1.05);
}

.reference-quote {
    position: relative;
    padding: 20px 0;
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

.reference-quote::before,
.reference-quote::after {
    content: '"';
    font-size: 2.5rem;
    color: var(--primary-light);
    opacity: 0.3;
    position: absolute;
}

.reference-quote::before {
    top: 0;
    left: -20px;
}

.reference-quote {
    margin-bottom: 20px; /* Reduzierter Abstand zum Autorennamen */
    position: relative;
    padding: 0 30px;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
}

.reference-quote::before,
.reference-quote::after {
    content: '"';
    font-size: 2rem;
    color: #d32f2f;
    position: absolute;
    opacity: 0.8;
}

.reference-quote::before {
    top: -10px;
    left: 0;
}

.reference-quote::after {
    bottom: -20px;
    right: 0;
}

.reference-author {
    margin-top: 0; /* Reduzierter Abstand nach oben */
    margin-bottom: 25px; /* Einheitlicher Abstand nach unten */
    display: flex;
    align-items: center;
}

.reference-author-info {
    padding-left: 0;
}

.reference-author-info h4 {
    margin: 0 0 5px 0; /* Kompakter Autorname */
    color: #d32f2f;
    font-size: 1.2rem;
}

.reference-author-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Projektbeschreibung */
.reference-card h3 {
    margin: 30px 0 15px 0; /* Einheitlicher Abstand vor/nach dem Projekttitel */
    color: #d32f2f;
    font-size: 1.3rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 20px;
}

.reference-card p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.reference-card p:last-child {
    margin-bottom: 0;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--gray-100);
    position: relative;
    min-height: 500px; /* Mindesthöhe hinzugefügt */
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 20%, 0 60%);
    opacity: 0.05;
    pointer-events: none;
}

/* Horizontale Anordnung der Kontaktkacheln */
.contact-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.contact-item {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    color: var(--primary);
    font-size: 1.8rem;
    margin-right: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
}

.contact-item:hover .contact-icon {
    transform: scale(1.2);
}

/* Anpassungen für WhatsApp-Verfügbarkeit */
.fa-whatsapp {
    color: #25D366;
    margin-right: 5px;
}

/* Responsive Anpassung für Kontakte */
@media (max-width: 992px) {
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        max-width: 400px;
    }
}

/* ===== Legal pages ===== */
.legal-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.legal-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary);
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.legal-content li {
    margin-bottom: 10px;
}

.subheader {
    background: linear-gradient(rgba(211, 47, 47, 0.85), rgba(211, 47, 47, 0.85)), url('https://placehold.co/1920x1080/d32f2f/ffffff') center/cover no-repeat;
    padding: 80px 0 40px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}

.subheader h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary);
    color: var(--light);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
    margin-bottom: 40px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.footer-about p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-heading {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-light);
}

.footer-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
}

.footer-link {
    margin: 10px 0;
    color: var(--light);
    opacity: 0.8;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-link::before {
    content: '›';
    margin-right: 5px;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
    opacity: 1;
    transform: translateX(5px);
}

.footer-link:hover::before {
    color: var(--primary-light);
}

.copyright {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-accept {
    background: var(--primary);
    color: white;
    border: none;
}

.cookie-accept:hover {
    background: var(--primary-dark);
}

.cookie-settings {
    background: transparent;
    border: 1px solid var(--gray-300);
}

.cookie-settings:hover {
    background: var(--gray-200);
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

/* Animation-Fixes */
.animate {
    opacity: 1; /* Änderung: Sofort sichtbar */
    transform: translateY(0); /* Keine anfängliche Verschiebung */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sequenzielle Animation für Cards */
.animate.delay-1 { transition-delay: 0.1s; }
.animate.delay-2 { transition-delay: 0.2s; }
.animate.delay-3 { transition-delay: 0.3s; }
.animate.delay-4 { transition-delay: 0.4s; }

/* Responsives Design */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .team-member {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .team-img {
        margin-bottom: 20px;
    }

    .team-social {
        right: 20px;
        bottom: -15px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .navbar {
        padding: 15px 0;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        margin: 15px 0;
    }

    .nav-link {
        color: var(--text);
        margin: 15px 0;
        font-size: 1.2rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* HIER DIE NEUEN ANPASSUNGEN FÜR DIE TEAMMITGLIEDERBILDER */
/* Strikte Container-Fixierung mit absoluter Größe */
.team-img-container {
    position: relative;
    flex-shrink: 0;
    width: 150px !important; /* Strikt erzwungene Breite */
    height: 150px !important; /* Strikt erzwungene Höhe */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Verhindert, dass Bilder aus dem Container herausragen */
}

/* Team-Bilder allgemein */
.team-img {
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: absolute; /* Absolute Positionierung innerhalb des Containers */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bernhards Portrait anpassen */
.team-member:first-of-type .team-img {
    object-position: center 20%; /* Bild-Fokus anpassen - Wert nach Bedarf ändern */
}

/* Marcs Portrait anpassen */
.team-member:nth-of-type(2) .team-img {
    transform: scale(1.0); /* Bild auf 90% skalieren - Wert nach Bedarf ändern */
    transform-origin: center center;
    object-position: center 40%; /* Bild-Fokus anpassen - Wert nach Bedarf ändern */
}

/* Hover-Effekte für beide Bilder */
.team-member:hover .team-img {
    border-color: var(--primary-light);
}

/* Separater Hover-Zoom für Bernhard */
.team-member:first-of-type:hover .team-img {
    transform: scale(1.05);
}

/* Separater Hover-Zoom für Marc */
.team-member:nth-of-type(2):hover .team-img {
    transform: scale(1.05); 
}

/* LinkedIn-Verknüpfungen in LinkedIn-Blau */
.team-social {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #0077b5; /* LinkedIn-Blau */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0.8;
    z-index: 1; /* Sicherstellen, dass es über dem Bild liegt */
}

/* Hover-Effekt für LinkedIn-Links */
.team-social:hover {
    background: #0061a8; /* Etwas dunkleres LinkedIn-Blau beim Hover */
    opacity: 1;
}

/* Verbesserte Abstände für mobile Geräte */
@media (max-width: 480px) {
    /* Verbesserte Abstände für Header-Inhalte */
    .header-content {
        padding: 0 25px; /* Erhöhter seitlicher Abstand */
        max-width: 100%;  /* Sicherstellen, dass der Inhalt nicht über den Bildschirm hinausragt */
    }
    
    /* Spezifische Anpassungen für Überschriften */
    .header h1 {
        font-size: 1.8rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
        padding: 0 5px; /* Zusätzlicher Innenabstand */
        margin-left: 10px;
        margin-right: 10px;
    }
    
    /* Paragraph im Header */
    .header p {
        font-size: 0.9rem;
        padding: 0 10px;
        margin-left: 5px;
        margin-right: 5px;
    }
    
    /* Container für das Logo */
    .logo-container {
        padding: 0 15px;
    }
    
    /* Allgemeine Container auf mobile optimieren */
    .container {
        padding: 0 25px; /* Erhöhter seitlicher Abstand für alle Container */
    }
}

/* Für sehr schmale Bildschirme (iPhone SE und ähnliche) */
@media (max-width: 375px) {
    .header-content {
        padding: 0 20px; /* Etwas weniger Abstand für sehr schmale Bildschirme */
    }
}

/* Verbesserte Responsive-Anpassungen für rechtliche Seiten */
@media (max-width: 768px) {
    /* Subheader-Bereich mit Seitenüberschrift */
    .subheader {
        padding: 80px 20px 40px; /* Seitlichen Abstand erhöhen */
    }
    
    .subheader h1 {
        font-size: 2.2rem; /* Etwas kleinere Schrift */
        padding: 0 15px; /* Zusätzlicher Innenabstand */
        word-wrap: break-word; /* Wortumbruch bei langen Wörtern */
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto; /* Silbentrennung aktivieren */
    }
    
    /* Inhaltsbereich für rechtliche Seiten */
    .legal-content {
        padding: 30px 25px; /* Mehr seitlicher Abstand */
    }
    
    /* Überschriften im Inhaltsbereich */
    .legal-content h2, 
    .legal-content h3, 
    .legal-content h4 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
        font-size: 95%; /* Schriftgröße leicht reduzieren */
    }
}

/* Für noch kleinere Bildschirme (iPhone und ähnliche) */
@media (max-width: 480px) {
    .subheader h1 {
        font-size: 1.8rem; /* Noch kleinere Schrift */
    }
    
    .legal-content {
        padding: 25px 20px; /* Angepasster Abstand */
    }
    
    /* Überschriften im Legal-Bereich weiter verkleinern und Abstände anpassen */
    .legal-content h2 {
        font-size: 1.4rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }
    
    .legal-content h3 {
        font-size: 1.2rem;
        margin-top: 20px;
    }
    
    .legal-content h4 {
        font-size: 1.1rem;
    }
    
    /* Listenelemente besser formatieren */
    .legal-content ul, 
    .legal-content ol {
        padding-left: 20px; /* Weniger Einrückung */
    }
    
    /* Tabellen (falls vorhanden) anpassen */
    .legal-content table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Horizontales Scrollen für Tabellen */
    }
    
    /* Datenschutz-spezifische Anpassungen */
    body.datenschutz .legal-content h2,
    body.datenschutz .legal-content h3 {
        word-break: break-word; /* Zusätzliche Umbruchlogik speziell für Datenschutz */
    }
}
