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

:root {
    --primary-color: #003366;
    --primary-dark: #002244;
    --secondary-color: #f5f5f5;
    --text-color: #222;
    --text-light: #444;
    --white: #fff;
    --black: #000;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --navbar-height: 80px;
    --bg-color: #f0f0f0;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    transform: translateY(-200%);
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 16px;
    border-radius: 6px;
    z-index: 20000;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:hover {
    color: var(--primary-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
iframe:focus-visible {
    outline: 3px solid #ff8800;
    outline-offset: 3px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

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

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

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

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

/* Segment Separator */
.segment-separator {
    height: 4px;
    background-color: var(--primary-color);
    width: 100%;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 20px;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-copy {
    flex: 1;
    min-width: 300px;
}

.cookie-copy h2 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 24px;
}

.cookie-content p {
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

/* Navigation - Transparent with grey font and black outline */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    height: var(--navbar-height);
    border-bottom: 1px solid rgba(0, 51, 102, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.nav-container {
    padding: 0 20px 0 0;
}

.nav-container .logo-link {
    margin-left: -600px;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 60px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: flex-end;
    position: relative;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: #b84d00;
    font-weight: 400;
    font-size: 16px;
    position: relative;
    transition: var(--transition);
    padding: 8px 16px;
    display: block;
    z-index: 1;
}

.nav-links a:hover {
    color: #8f3c00;
}

/* Sliding highlight bubble */
.nav-highlight {
    position: absolute;
    background-color: rgba(200, 200, 200, 0.3);
    border-radius: 20px;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    opacity: 0;
}

.nav-highlight.active {
    opacity: 1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 20px;
}

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

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    color: #b84d00;
    font-weight: 400;
    font-size: 18px;
    display: block;
    padding: 10px 0;
}

/* Segments - Fullscreen with uniform background */
.segment {
    min-height: 100vh;
    padding: calc(var(--navbar-height) + 20px) 40px 40px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    scroll-snap-align: start;
    scroll-margin-top: 0;
}

.section-header {
    display: none;
}

/* Mobile section headers - hidden on desktop */
.mobile-section-header {
    display: none;
    font-size: 28px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Segment 1: Hero Carousel */
.segment-hero {
    padding: 0;
    margin-top: 0;
    padding-top: var(--navbar-height);
    min-height: 100vh;
    scroll-snap-align: start;
}

.carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
    margin-top: 0;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Text Overlay */
.carousel-text {
    position: absolute;
    top: 72%;
    left: 0;
    transform: translate(-100%, -50%);
    text-align: left;
    z-index: 10;
    opacity: 0;
    transition: all 0.8s ease-out;
}

.carousel-slide.active .carousel-text {
    opacity: 1;
    transform: translate(0, -50%);
    transition-delay: 1s;
}

.carousel-banner {
    background: linear-gradient(90deg, rgba(206, 205, 205, 0.96) 0%, rgba(165, 165, 165, 0.829) 70%, rgba(185, 185, 185, 0.623) 100%);
    border-left: 0;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    padding: 32px 42px 32px 34px;
    min-width: min(540px, 72vw);
    max-width: min(680px, 82vw);
}

.carousel-title {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    color: #ff6600;
    text-shadow: none;
    margin-bottom: 20px;
    letter-spacing: 3px;
    line-height: 1.05;
}

.carousel-content {
    font-size: clamp(18px, 2.2vw, 28px);
    color: #003366;
    font-weight: 600;
    text-shadow: none;
    line-height: 1.4;
    max-width: 24ch;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease-out;
}

.carousel-slide.active .carousel-content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1.5s;
}

.carousel-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #fff;
    color: #003366;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease-out;
}

.carousel-btn:hover {
    background-color: #f0f0f0;
    color: #003366;
}

.carousel-slide.active .carousel-btn {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 2s;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 12;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.indicator.active {
    background-color: var(--white);
}

/* Segment 2: Text */
.segment-text {
    justify-content: center;
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.text-content p {
    margin-bottom: 20px;
    font-size: 20px;
    line-height: 1.8;
    color: #4d4d4d;
}

/* Segment 3: Leistungen - Carousel with arrows */
.segment-leistungen {
    justify-content: flex-start;
    padding: calc(var(--navbar-height) + 20px) 0 40px;
}

.segment-leistungen .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100%;
    padding: 0;
}



.leistungen-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    position: relative;
    min-height: calc(100vh - 150px);
    padding: 0;
}

.leistungen-carousel {
    flex: 1;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.leistungen-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
    touch-action: pan-y;
}

.leistung-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: 50% 50%;
    height: calc(100vh - 150px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leistung-slide.active {
    opacity: 1;
}

.leistung-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 20px;
}

.leistung-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.leistung-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    height: 100%;
}

.leistung-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.leistung-logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.leistung-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.leistung-header-row img {
    display: block;
}

.leistung-header-row .leistung-logo {
    max-width: 180px;
    margin-bottom: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 36px;
}

.leistung-header-row h3 {
    font-size: 36px;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.leistung-header-row .leistung-logo img {
    height: 100%;
    width: auto;
    transform: translateY(-7px);
}

.leistung-content h3 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.leistung-content p {
    font-size: 20px;
    color: #4d4d4d;
    line-height: 1.8;
}

.leistung-intro {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.leistung-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.leistung-list li {
    font-size: 18px;
    color: #4d4d4d;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

/*
.leistung-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}
*/

.leistung-list li strong {
    color: var(--primary-color);
}

.leistung-punchline {
    font-size: 16px;
    color: #4d4d4d;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.carousel-arrow {
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-prev {
    left: 24px;
}

.carousel-next {
    right: 24px;
}

.carousel-arrow:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.carousel-arrow:focus-visible,
.indicator:focus-visible,
.footer-cookie-button:focus-visible {
    outline: 3px solid #ff8800;
    outline-offset: 4px;
}

.leistungen-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.leistungen-indicators .indicator {
    background-color: rgba(0, 51, 102, 0.3);
}

.leistungen-indicators .indicator.active {
    background-color: var(--primary-color);
}

/* Segment 4: Referenzen */
.segment-slideshow {
    padding: calc(var(--navbar-height) + 20px) 40px 40px;
}

.fullscreen-slideshow {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    touch-action: pan-y;
}

.leistungen-track.is-dragging,
.fullscreen-slideshow.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 2;
    background-color: rgba(0, 51, 102, 0.82);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.slideshow-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.32) 100%);
}

.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.slideshow-prev {
    left: 24px;
}

.slideshow-next {
    right: 24px;
}

.slideshow-indicators {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 180px);
    z-index: 10;
}

.slideshow-indicators .indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
}

.slideshow-indicators .indicator.active {
    background-color: var(--white);
}

/* Segment 5: Showroom (3D Viewer) */
.segment-3d {
    padding: calc(var(--navbar-height) + 20px) 40px 40px;
}

.segment-3d .slideshow-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    /*padding: 0px;
    background-color: var(--white);*/
    margin: 0;
}

.viewer-container {
    position: relative;
    background-color: var(--white);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    border-radius: 8px;
}

.viewer-container iframe {
    display: block;
    border: none;
    flex: 1;
    width: 100%;
    height: 100%;
}

.cookie-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    background-color: var(--secondary-color);
    text-align: center;
    padding: 40px;
}

.cookie-notice.hidden {
    display: none;
}

.cookie-notice p {
    font-size: 18px;
    color: #4d4d4d;
    margin-bottom: 20px;
}

/* Segment 6: Partner */
.segment-partner {
    justify-content: flex-start;
    padding: calc(var(--navbar-height) + 20px) 40px 40px;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 20px;
    flex: 1;
    min-height: calc(100vh - 150px);
}

.partner-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
}

.partner-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.partner-item:focus-within {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.partner-item a,
.partner-no-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-color);
    width: 100%;
    height: 100%;
}

.partner-item img {
    width: 100%;
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.partner-item span {
    font-weight: 500;
    text-align: center;
    font-size: 16px;
}

/* Segment 7: Aktuelles */
.segment-news {
    justify-content: flex-start;
}

.news-content {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.news-item h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 8px;
}

.form-message.success {
    background: #e9f7ef;
    color: #14532d;
    border: 1px solid #86d19a;
}

.form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #f0a5a5;
}

.field-error {
    margin-top: 8px;
    color: #991b1b;
    font-size: 14px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border: 2px solid #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.news-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.news-item p {
    color: var(--text-color);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Segment 8: Kontakt */
.segment-contact {
    justify-content: flex-start;
    padding-bottom: 0;
    min-height: 100vh;
    position: relative;
}

.segment-contact {
    padding-left: 0;
    padding-right: 0;
}

.segment-contact > .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.segment-contact .mobile-section-header,
.segment-contact .contact-wrapper {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 120px;
}

.footer-content {
    width: 100%;
    margin: 0;
    padding: 48px 40px 32px;
    background-color: #353535;
    color: var(--white);
    border-radius: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 28px;
    margin-bottom: 18px;
}

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

.footer-nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-cookie-button {
    appearance: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: none;
    transition: var(--transition);
}

.footer-cookie-button:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
}

.footer-bottom::before {
    content: "";
    display: block;
    height: 1px;
    width: min(700px, 100%);
    margin: 0 auto 18px;
    background-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 1024px) {
    .carousel-banner {
        min-width: min(500px, 84vw);
        max-width: min(580px, 86vw);
        padding: 28px 30px 28px 24px;
    }

    .carousel-title {
        font-size: 48px;
    }

    .carousel-content {
        font-size: 22px;
        max-width: 22ch;
    }
}

@media (max-width: 768px) {
    .carousel-text {
        top: auto;
        bottom: 72px;
        left: 0;
        transform: translate(-100%, 0);
    }

    .carousel-slide.active .carousel-text {
        transform: translate(0, 0);
    }

    .carousel-banner {
        min-width: 0;
        max-width: calc(100vw - 32px);
        padding: 22px 22px 22px 18px;
        border-radius: 0 14px 14px 0;
    }

    .carousel-title {
        font-size: 34px;
        letter-spacing: 1px;
    }

    .carousel-content {
        font-size: 18px;
        line-height: 1.4;
        max-width: 100%;
    }

    .slideshow-arrow {
        width: 42px;
        height: 42px;
    }

    .slideshow-prev {
        left: 4px;
    }

    .slideshow-next {
        right: 4px;
    }

    .slide-info {
        left: 14px;
        bottom: 58px;
        font-size: 14px;
        padding: 8px 14px;
    }

    .slideshow-indicators {
        max-width: calc(100% - 40px);
        bottom: 14px;
    }

    .segment-contact .mobile-section-header,
    .segment-contact .contact-wrapper {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 120px;
    }

    .footer-content {
        width: 100%;
        margin: 60px 0 0;
        padding: 40px 20px 24px;
    }
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-info address {
    font-style: normal;
    margin-bottom: 30px;
}

.contact-info address p {
    margin-bottom: 8px;
    color: var(--text-color);
}

.opening-hours h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.opening-hours p {
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-form-wrapper h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 4px;
}

.checkbox-label span {
    font-weight: normal;
    color: var(--text-light);
}

.form-message {
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.form-message.hidden {
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* reCAPTCHA badge */
.recaptcha-badge {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.recaptcha-badge small {
    color: #222;
    font-size: 12px;
    line-height: 1.5;
}

.recaptcha-badge a {
    color: #2c5530;
    text-decoration: underline;
}

.recaptcha-badge a:hover {
    color: #1e3d22;
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 40px 0 20px;
    min-height: auto;
}

/* Footer inside Kontakt segment */
.segment-contact .footer-content {
    background-color: var(--text-color);
    color: var(--white);
    padding: 30px 40px;
    margin-top: auto;
    border-radius: 0;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.segment-contact .container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    margin-bottom: 0;
}

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

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-nav a {
    color: var(--white);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.footer-bottom p {
    opacity: 0.6;
    font-size: 14px;
}

/* Responsive Design */

/* Mobile First: Base mobile styles */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    /* Navbar mobile adjustments */
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-container .logo-link {
        margin-left: 0;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo-img {
        height: 45px;
    }
    
    /* Hero Carousel mobile adjustments */
    .carousel {
        height: calc(100vh - var(--navbar-height));
    }
    
    .carousel-text {
        position: absolute;
        top: auto;
        bottom: 72px;
        left: 0;
        transform: translate(-100%, 0);
        text-align: left;
        z-index: 10;
        width: auto;
        padding: 0;
    }
    
    .carousel-slide.active .carousel-text {
        opacity: 1;
        transform: translate(0, 0);
        transition-delay: 1s;
    }

    .carousel-banner {
        min-width: 0;
        max-width: calc(100vw - 20px);
        padding: 22px 22px 22px 18px;
        border-radius: 0 14px 14px 0;
    }
    
    .carousel-title {
        font-size: 36px;
        margin-bottom: 15px;
        letter-spacing: 2px;
    }
    
    .carousel-content {
        font-size: 20px;
        line-height: 1.4;
    }
    
    .carousel-btn {
        font-size: 16px;
        padding: 10px 20px;
        margin-top: 15px;
    }
    
    /* Segment padding adjustments */
    .segment {
        padding: calc(var(--navbar-height) + 10px) 15px 15px;
        min-height: auto;
        scroll-snap-align: none;
    }
    
    .segment-hero {
        padding: 0;
        min-height: 100vh;
        scroll-snap-align: none;
    }
    
    /* Mobile section headers */
    .mobile-section-header {
        display: block;
        font-size: 24px;
        color: var(--primary-color);
        text-align: center;
        margin-bottom: 15px;
        margin-top: 10px;
        font-weight: 600;
    }
    
    .segment-hero .mobile-section-header {
        display: none;
    }
    
    /* Text content mobile adjustments */
    .text-content p {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    /* Mobile menu styling */
    .mobile-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        z-index: 999;
        padding: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-bottom: 2px solid var(--primary-color);
    }
    
    .mobile-menu ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-menu li {
        border-bottom: 1px solid rgba(0, 51, 102, 0.1);
    }
    
    .mobile-menu li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu a {
        color: var(--primary-color);
        font-weight: 500;
        font-size: 18px;
        display: block;
        padding: 16px 20px;
        transition: var(--transition);
    }
    
    .mobile-menu a:hover,
    .mobile-menu a:active {
        background-color: rgba(0, 51, 102, 0.05);
        color: #ff6600;
    }
    
    /* Mobile menu hamburger animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Leistungen Carousel mobile */
    .segment-leistungen {
        padding: calc(var(--navbar-height) + 10px) 0 15px;
    }
    
    .leistungen-carousel-wrapper {
        min-height: auto;
        padding: 0;
        align-items: flex-start;
    }
    
    .leistung-slide {
        grid-template-columns: 1fr;
        height: auto;
        gap: 0;
        align-content: start;
    }
    
    .leistung-image {
        height: clamp(280px, 58vw, 360px);
        padding: 0 15px;
        margin: 0;
        overflow: hidden;
        align-self: start;
    }
    
    .leistung-image img {
        border-radius: 8px;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .leistung-content {
        padding: 15px 15px 20px;
        margin-top: 0;
        justify-content: flex-start;
        align-self: start;
        height: auto;
    }
    
    .leistung-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .leistung-content h3,
    .leistung-content p,
    .leistung-content .leistung-list,
    .leistung-content .leistung-punchline {
        margin-top: 0;
    }

    .leistung-content > * + * {
        margin-top: 12px;
    }
    
    .leistung-header-row h3,
    .leistung-content h3 {
        font-size: 24px;
        line-height: 1.2;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
        max-width: 100%;
    }
    
    .leistung-content p,
    .leistung-intro {
        font-size: 16px;
        line-height: 1.6;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .leistung-list li {
        font-size: 15px;
        margin-bottom: 8px;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .leistung-punchline {
        font-size: 14px;
    }
    
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
        top: clamp(140px, 29vw, 190px);
        transform: translateY(-50%);
    }

    .carousel-prev {
        left: 30px;
    }

    .carousel-next {
        right: 30px;
    }

    .leistungen-carousel {
        padding: 0 12px;
        box-sizing: border-box;
    }
    
    .leistungen-indicators {
        margin-top: 15px;
        gap: 6px;
    }
    
    .leistungen-indicators .indicator {
        width: 8px;
        height: 8px;
    }
    
    /* Referenzen Slideshow mobile */
    .segment-slideshow {
        padding: calc(var(--navbar-height) + 10px) 15px 15px;
    }
    
    .fullscreen-slideshow {
        height: 300px;
        min-height: 250px;
    }
    
    .slide-info {
        top: 12px;
        left: 12px;
        bottom: auto;
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .slideshow-indicators {
        gap: 6px;
        bottom: 10px;
    }
    
    .slideshow-indicators .indicator {
        width: 8px;
        height: 8px;
    }
    
    /* 3D Viewer mobile */
    .segment-3d {
        padding: calc(var(--navbar-height) + 10px) 15px 15px;
    }
    
    .viewer-container {
        height: 300px;
        min-height: 250px;
    }
    
    .cookie-notice {
        padding: 20px;
    }
    
    .cookie-notice p {
        font-size: 16px;
    }
    
    /* Partner grid mobile */
    .segment-partner {
        padding: calc(var(--navbar-height) + 10px) 15px 15px;
    }
    
    .partner-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, auto);
        gap: 10px;
        min-height: auto;
    }
    
    .partner-item {
        padding: 0;
    }
    
    .partner-item a,
    .partner-no-link {
        padding: 15px;
        flex-direction: row;
        gap: 15px;
        justify-content: flex-start;
    }
    
    .partner-item img {
        max-width: 100px;
        max-height: 60px;
        margin-bottom: 0;
    }
    
    .partner-item span {
        font-size: 15px;
        text-align: left;
    }
    
    /* Aktuelles mobile */
    .news-item {
        padding: 20px;
    }
    
    .news-item h3 {
        font-size: 22px;
    }
    
    .news-item p {
        font-size: 16px;
    }
    
    /* Kontakt mobile */
    .segment-contact {
        padding: calc(var(--navbar-height) + 10px) 15px 0;
        min-height: calc(100vh - var(--navbar-height));
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .contact-info address p {
        font-size: 15px;
    }
    
    .contact-form-wrapper h3 {
        font-size: 20px;
    }
    
    .form-group label {
        font-size: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .checkbox-label span {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
    }
    
    .contact-form .btn {
        margin-bottom: 140px;
    }
    
    /* Footer mobile */
    .segment-contact .container {
        padding-bottom: 0;
    }
    
    .segment-contact .footer-content {
        padding: 20px 15px;
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
    
    .footer-nav {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .footer-nav a {
        font-size: 14px;
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
    
    /* Cookie banner mobile */
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-content p {
        min-width: auto;
        font-size: 14px;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
    
    /* Disable scroll snap on mobile for better UX */
    html {
        scroll-snap-type: none;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .carousel-title {
        font-size: 28px;
    }
    
    .carousel-content {
        font-size: 18px;
    }
    
    .leistung-image {
        height: clamp(280px, 72vw, 360px);
    }
    
    .leistung-header-row h3,
    .leistung-content h3 {
        font-size: 22px;
    }
    
    .fullscreen-slideshow,
    .viewer-container {
        height: 250px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-container .logo-link {
        margin-left: 0;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .carousel-title {
        font-size: 48px;
    }
    
    .carousel-content {
        font-size: 22px;
    }
    
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, auto);
        gap: 15px;
    }
    
    .leistung-slide {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .leistung-image {
        height: 350px;
    }
    
    .leistung-content {
        padding: 25px;
    }
    
    .leistungen-carousel-wrapper {
        min-height: auto;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .fullscreen-slideshow {
        height: 450px;
    }
    
    .viewer-container {
        height: 450px;
    }
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    .nav-container {
        padding: 0 40px;
    }

    .nav-container .logo-link {
        margin-left: -140px;
    }
}

/* Hide desktop-only elements on mobile */
@media (max-width: 768px) {
    .nav-highlight {
        display: none;
    }
}
