/*!
 * MOVING BOX MEDIA Website
 * (c) [2025] [Peter Bauditsch]
 */


:root {
    --MBM-orange: rgb(255, 102, 0);
    --MBM-white: #ffffff;
    --MBM-dark: #1a1a1a;
    --bg-color: var(--MBM-white);
    --text-color: var(--MBM-dark);
    --scroll-progress: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    background-color: var(--bg-color); /* Light background */
    color: var(--text-color); /* Dark text */
    overflow-x: hidden;
    overflow-y: overlay;
}

  
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--MBM-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.loading-spinner img {
    width: 80px;
    height: 80px;
    animation: spin 2.5s ease-in-out infinite;
}

@media (max-width: 768px) {
    .loading-spinner img {
        width: 50px;
        height: 50px;        
    }
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(360deg) scale(1.5); }
    100% { transform: rotate(720deg) scale(1); }
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2; 
    background: transparent;  
    overflow-x: hidden;
}

.scroll-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.dark-theme-content {
    color: var(--MBM-white);
    padding: 60vh 18% 0 18%;
}

.light-theme-content {
    background-color: var(--MBM-white);
    color: var(--MBM-dark);
    padding: 30vh 18% 0 18%;
    overflow: hidden;
}

.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    position: relative;
    max-width: calc(100% - 36%);
    z-index: 2;
}

@media screen and (max-width: 450px) {
    .main-content {
        max-width: calc(100% - 6%);
    }    
    .dark-theme-content {
        padding: 60vh 3% 0 3%;
    }
    .light-theme-content {
        padding: 30vh 3% 0 3%;
    }
}

h2 {
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem); /* Größere Schrift */
    margin: 6rem 0 4rem; /* Mehr Abstand oben und unten */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: inherit;
    text-align: center;
    word-break: normal;
}

p {
    font-weight: 400;
    line-height: 1.6;
}

.showreel-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.showreel-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--MBM-dark);
    opacity: var(--overlay-opacity, 0.5); /* Fallback to 0.5 if variable not set */
    z-index: 1;
    transition: none; /* Entferne CSS Transition */
    will-change: opacity;
    bottom: -1px; /* Überlappt mögliche Rendering-Lücke */
}

.showreel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transform-origin: center center;
    transition: none;
    will-change: transform, filter; /* Optimierung für GPU */
    filter: blur(0);
    scale: 1;
    border: none;
    margin-bottom: -1px;
}

.welcome-page {
    position: relative;
    height: 100vh; /* Platzhalter für fixed Video */
    z-index: 1;
}

.welcome-container {
    position: absolute;
    bottom: 15%;  /* Position weiter unten */
    left: 0;
    width: 100%;
    z-index: 2;
    opacity: calc(1 - var(--scroll-progress)); /* Ausblenden beim Scrollen */
    transition: opacity 0.3s ease;
}

.welcome-text-animation {
    padding: 0 10vw;  /* Mehr seitlicher Abstand */
    color: var(--MBM-white);
    font-size: clamp(1em, 5vw, 3.5em);  /* Responsive Textgröße */
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);  /* Bessere Lesbarkeit über Video */
    text-transform: uppercase; /* Großbuchstaben */
    text-align: center; /* Horizontale Zentrierung */
}

.welcome-text-animation p {
    margin: 0;
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: center; /* Horizontale Zentrierung des Flex-Containers */
}

.txt-rotate {
    min-width: 10px;
    border-right: 2px solid #fff;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #fff }
}



.scroll-arrow {
    position: fixed; /* Position fixed statt absolute */
    bottom: 5vh;
    left: 50vw;
    transform: translateX(-50%);
    color: var(--MBM-white);
    z-index: 3;
    width: clamp(30px, 4vw, 40px);
    height: clamp(30px, 4vw, 40px);
    cursor: pointer !important; /* Force pointer cursor */
    pointer-events: auto !important;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 2.5s forwards, bounce 2s infinite 3.3s;
    transition: opacity 0.3s ease;
}

.scroll-arrow.hidden {
    opacity: 0;
    pointer-events: none !important;
}

.scroll-arrow:hover {
    color: var(--MBM-orange);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Media Queries für feinere Anpassungen */
@media screen and (max-width: 768px) {
    .welcome-container {
        bottom: 20%;
    }
}

@media screen and (max-width: 480px) {
    .welcome-container {
        bottom: 25%;
    }
}

.intro-text {
    position: relative;
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 50vh;
    margin-bottom: 50vh;        
}

.intro-text.hidden {
    opacity: 0;
}
.intro-text.visible {
    opacity: 1;
}

.intro-text-content {
    max-width: 800px;
    text-align: center;
}

.intro-text p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.6;
    margin: 1rem 0;
    opacity: 0;
    transition: opacity 1s ease;
    transform-origin: center;
    will-change: transform, opacity;
}

.intro-text p:first-child {
    color: var(--MBM-white);
}

.intro-text p:last-child {
    color: var(--MBM-orange); /* Änderung zu weiß */
    font-weight: 600;
}

.intro-text p.visible {
    opacity: 1;
}


.highlight {
    color: var(--MBM-orange);
}

.text-highlight {
    font-weight: 500;
}


/* LEISTUNGEN */
.leistungen-page {  
    padding-top: 10vh;
}

.leistungen-split-view {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1300px;
    margin: 40px auto;
    position: relative;
}

.leistungen-category {
    flex: 1;
    position: relative;
    height: auto;
    transition: all 0.5s ease;
    max-width: 350px;
    min-width: 250px;
    margin: 0;
}

/* Kategorie-Bilder mit 9:16 Seitenverhältnis */
.category-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    max-height: 80vh;
    /* min-width: 250px; */
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.category-image:hover img {
    transform: scale(1.0);
}

/* Immer sichtbarer Kategorietitel */
.category-title {
    position: absolute;
    top: 20px;
    left: 10px;
    width: 100%;    
    color: white;
    font-size: clamp(2rem, 4vw, 3rem);
    z-index: 1;
    text-shadow: 0 0 10px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.6), 0 0 30px rgba(0,0,0,0.4);
    padding: 0 10px;
}

/* Fade-in Animation for UX */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 2s ease, transform 2s cubic-bezier(.25,.8,.25,1);
  will-change: opacity, transform;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-title .default-text,
.category-title .hover-text {
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 0.5s ease;
  width: 100%;
}

.category-title .hover-text {
  opacity: 0;
}

.leistungen-category:hover .category-title .default-text {
  opacity: 0;
}

.leistungen-category:hover .category-title .hover-text {
  opacity: 1;
}

/* Beschreibungs-Overlay mit fließendem Text */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-image:hover .image-overlay {
    opacity: 1;
}

/* Mobile/touch: toggle overlay via .active class */
@media (hover: none), (pointer: coarse) {
    /* On touch, ignore hover to avoid sticky overlays; use .active only */
    .category-image:hover .image-overlay { opacity: 0;}
    .category-image.active .image-overlay { opacity: 1;}
    
    /* On touch, swap title texts when .category-image has .active */
    .category-image.active .category-title .default-text { opacity: 0 !important; }
    .category-image.active .category-title .hover-text { opacity: 1 !important; }

    /* On touch, scale image when .category-image has .active (scale to 1.0 like hover) */
    .category-image.active img { transform: scale(1.0) !important; }
    
    /* Neutralize ALL hover effects on touch devices */
    .leistungen-category:hover .category-title .default-text { opacity: 1; }
    .leistungen-category:hover .category-title .hover-text { opacity: 0; }
    .category-image:hover img { transform: scale(1.1); }
}

.service-description {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    bottom: 0;
    max-width: 90%;
    overflow-y: auto;
    max-height: none;
}

/* Kategorie-Bilder als Container-Query-Container definieren */
.leistungen-category {
    container-type: inline-size;
    container-name: service-container;
}

/* Service-Description mit Container-abhängiger Schriftgröße */
.service-description p {
font-size: clamp(0.9rem, 2vw, 1.2rem);
line-height: 1.4;
margin-bottom: 0.8rem;
color: white;
text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Erstes Wort Anpassungen */
.leistungen-category[data-category="video"] .service-description p:first-child::first-letter,
.leistungen-category[data-category="web"] .service-description p:first-child::first-letter {
color: var(--MBM-orange);
font-size: 2.4rem;
font-weight: bold;
float: left;
line-height: 1;
padding-right: 10px;
}

.leistungen-carousels {
    position: absolute;
    left: 0;
    width: 100vw;
    height: 80px;
    z-index: 6;
 }

.carousel-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to left, rgba(26, 26, 26, 1) 15%, rgba(26, 26, 26, 0) 25%),
        linear-gradient(to right, rgba(26, 26, 26, 1) 15%, rgba(26, 26, 26, 0) 25%);
    z-index: 5;
}

@media screen and (min-width: 1600px) {
    .carousel-gradient-overlay {
        background: 
            linear-gradient(to left, rgba(26, 26, 26, 1) 15%, rgba(26, 26, 26, 0) 25%),
            linear-gradient(to right, rgba(26, 26, 26, 1) 15%, rgba(26, 26, 26, 0) 25%);
    }
}

@media screen and (max-width: 450px) {
    .carousel-gradient-overlay {
        display: none;
    }
}

.leistungen-inf-carousel,
.leistungen-inf-rev-carousel {
position: relative;
left: 0;
white-space: nowrap;
width: 100vw;     
z-index: 2;
}


.leistungen-inf-carousel-track,
.leistungen-inf-rev-carousel-track {
display: inline-flex;

gap: 2rem;
/* Animation initial deaktiviert */
animation: none;
z-index: 1; /* Stellt sicher, dass der Track hinter dem Overlay bleibt */
}
  
  /* Aktive Animation nur wenn im Viewport */
.leistungen-carousels.is-visible .leistungen-inf-carousel-track {
    animation: scroll-left 36s linear infinite;
}

.leistungen-carousels.is-visible .leistungen-inf-rev-carousel-track {
    animation: scroll-right 36s linear infinite;
}
  
.leistungen-inf-carousel-track span,
.leistungen-inf-rev-carousel-track span {
font-size: 1.2rem;
font-weight: 300; /* weniger fett */
position: relative;
}

/* Trennzeichen nach jedem Element */
.leistungen-inf-carousel-track span::after,
.leistungen-inf-rev-carousel-track span::after {
content: "·";
margin-left: 2rem;
color: var(--MBM-orange);
}

/* Kein Trennzeichen am letzten Element (optional) */
.leistungen-inf-carousel-track span:last-child::after,
.leistungen-inf-rev-carousel-track span:last-child::after {
content: "";
margin: 0;
}

/* Animationen */
@keyframes scroll-left {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
0% { transform: translateX(-50%); }
100% { transform: translateX(0); }
}


@media screen and (max-width: 450px) {
    .leistungen-split-view {
         max-width: 70vw;
    }
}

.leistungen-category {
    max-width: 100%;
    width: 100%;
}

.category-image {
    max-height: 50vh; /* Reduziere die maximale Höhe auf 50vh */
}


/* WHY MBM Split-Screen Layout */
.why-mbm-split {
    display: flex;
    gap: 2.5rem;
    align-items: stretch;
    justify-content: center;
    margin-top: 2.5rem;
}

.why-mbm-text {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1.6;
    padding-right: 1.5rem;
}

.why-mbm-video-teaser {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    max-width: 480px;
}

.why-mbm-video-thumbnail-container {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9/16;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6);
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.why-mbm-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
    filter: blur(2px);
    transition: 0.3s
}

.why-mbm-video-gradient-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.0) 100%);
    border-bottom-right-radius: 24px;
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s;
}

.why-mbm-video-overlay-text {
    position: absolute;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    color: var(--MBM-white);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 18px rgba(255, 255, 255, 0.3);
    z-index: 2;
    text-align: center;
    padding: 0.3em 2em;
    width: 90%;
    max-width: 95%;
    pointer-events: none;
    transition: bottom 0.3s cubic-bezier(.4,0,.2,1), font-size 0.3s cubic-bezier(.4,0,.2,1), padding 0.3s cubic-bezier(.4,0,.2,1);
}

.why-mbm-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 3;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.why-mbm-video-thumbnail-container:hover .why-mbm-play-button {
    transform: translate(-50%, -50%) scale(1.2);    
}

.why-mbm-video-thumbnail-container:hover .why-mbm-video-thumbnail{
    scale: 1.05;
}

.why-mbm-video-thumbnail-container:hover .why-mbm-video-gradient-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.0) 100%);
}

.why-mbm-video-player-container {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9/16;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    display: none;
}

.why-mbm-video-player-container.active {
    display: block;
}

.why-mbm-video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Video Fullscreen Fix für hochkant Videos */
.why-mbm-video:fullscreen {
    width: auto !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: 100vh !important;
    object-fit: contain !important; /* Wichtig: contain statt cover */
    background: black;
}

/* Webkit-basierte Browser (Chrome, Safari, Edge) */
.why-mbm-video:-webkit-full-screen {
    width: auto !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    background: black;
}

/* Mozilla Firefox */
.why-mbm-video:-moz-full-screen {
    width: auto !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    background: black;
}

/* Responsive */
@media (max-width: 900px) {
    .why-mbm-split {
        flex-direction: column;
        gap: 2rem;
    }
    .why-mbm-text {
        padding-right: 0;
        margin-bottom: 1.5rem;
    }
    .why-mbm-video-teaser {
        max-width: 80vw;
        margin: 0 auto;
    }
    .why-mbm-video-player-container,
    .why-mbm-video-thumbnail-container {
        max-width: 80vw;
    }
}


.values-content {
    display: flex;
    flex-direction: column;
}

.values-video-container {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
    padding-top: 50px;
}

.values-video {
    width: 100%;
    height: 30vh;
    object-position: center;
    object-fit: cover;
    display: block;
    z-index: 1;
}

@media screen and (min-width: 768px) {
    .values-video {
        height: 50vh;
    }
}

@media screen and (min-width: 1600px) {
    .values-video {
        object-fit: contain;
    }
}

/* versteckte h1 Überschrift für Screenreader */
.hidden-h1 {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
}
    
/* Scroll-basierte Klassen */
.video-scrolled .showreel {
    filter: blur(calc(15px * var(--scroll-progress)));
    scale: calc(1 + var(--scroll-progress)); /* 200% Zoom */
    transform: translateY(calc(50% * var(--scroll-progress))); /* Erhöht von -50% auf -100% */
}

/* Transparente Container */
.scroll-section:not(.leistungen-page){
    position: relative;    
}

.scroll-section{
    width: 100%;
    background: transparent;    
    z-index: 2;
    color: inherit;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15vh;
}

@media screen and (max-width: 768px) {
    .scroll-section {
        margin-bottom: 10vh;
    }
}



/* Gemeinsame Styles für beide Pause-Buttons */
.pause-button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    color: var(--MBM-white);
    padding: 8px;
    transition: all 0.3s ease;
    opacity: 0.5;
    z-index: 3;
    pointer-events: auto;
}

/* Gemeinsame Hover-Effekte */
.pause-button:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.pause-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

/* Gemeinsame Styles für den pausierten Zustand */
.pause-button.paused {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.pause-button.paused svg{
    transform: none;
}

/* POSITIONIERUNG: Showreel-Pause-Button (fixed im Viewport) */
.showreel-pause-button {
    position: fixed;
    bottom: 20px;
    right:3vw;
}

/* POSITIONIERUNG: Video-Container-Pause-Buttons (absolut in Containern) */
.values-video-pause-button,
.testimonial-pause-button {
    position: absolute;
    bottom: 20px;
    right: 3vw;
}

.rate-us {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rate-us-link {
    display: block;
    color: var(--MBM-white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    background-color: var(--MBM-orange);
    will-change: transform;
    transition: transform 0.3s ease;
}

.rate-us-link:hover {
    transform: scale(1.05);
}


.projects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem; /* Einheitlicher Abstand für beide Container */
    overflow: hidden;
}

.project-card {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    padding: 0; /* Entferne das Padding */
    contain: layout;
    display: block; /* Als Block-Element anzeigen da es jetzt ein Link ist */
    text-decoration: none; /* Keine Link-Unterstreichung */
    color: inherit; /* Erbe die Textfarbe */
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: -1px;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    /* Add GPU acceleration to enhance rendering */
    will-change: opacity;
    transform-style: preserve-3d;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.8s ease;
}

.project-info {
    position: absolute;
    inset: 0;
    padding: 2rem;
    color: inherit;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.project-text {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.6s ease;
}

/* Ersetze .property-type mit .customer-name */
.customer-name {
    display: block;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.5s ease;
}

/* Ersetze .location mit .service-type */
.service-type {
    font-size: clamp(0.75rem, 2vw, 1.1rem);
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.5s ease;
}

/* Aktualisiere die Hover-Effekte */
.project-card:hover .customer-name,
.project-card:hover .service-type {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.project-card:hover .service-type {
    transition-delay: 0.2s;
}

.project-plus {
    position: absolute;
    bottom: 2rem; /* Änderung von top zu bottom */
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--MBM-orange);
    border: none;
    color: var(--MBM-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translate(100%, 100%); /* Startet außerhalb unten rechts */
    opacity: 0;
     /* Split the transitions for different properties */
     transition-property: opacity, transform;
     transition-duration: 0.6s, 0.6s;
     transition-timing-function: ease;
     transition-delay: 0.3s, 0.3s; /* Apply delay to initial appearance only */
     pointer-events: auto;
}

/* Hover Effekte */
.project-card:hover::before {
    opacity: 1;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover .project-text,
.project-card:hover .customer-name,
.project-card:hover .service-type {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.project-card:hover .service-type {
    transition-delay: 0.2s;
}

/* Hover Effekte */
.project-card:hover .project-info,
.project-card:hover .customer-name,
.project-card:hover .service-type,
.project-card:hover .project-plus {
    transform: translateX(0);
    opacity: 1;
}

.project-card:hover .project-plus:hover {
    transform: translate(0, 0) scale(1.1); /* Combine both transforms */
    transition-delay: 0s;
}


/* Media Queries anpassen */

@media (max-width: 2000px) {
    .projects {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 1200px) {
    .projects {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .projects {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-content: center; /* Ensure centering on small viewports */
        max-width: 100%; /* Ensure the grid does not exceed the viewport width */
        overflow-x: hidden; /* Prevent horizontal overflow */
    }

    .project-info{
        padding: 1rem;
    }
    
    .project-plus {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 450px) {    
    .project-plus {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}



/* Section Headers - Konsolidierte Version */
.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 4rem 0 4rem 0;
    padding: 0;
}

.section-heading {
    position: relative;
    padding-right: 2rem;
    display: flex;
    align-items: center;
}

.section-heading h2 {
    margin: 0;
    text-align: left;
    white-space: normal;
    line-height: 1.1;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
}

.section-heading::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 3rem;
    background-color: var(--MBM-orange);
}

.section-subtitle {
    flex: 1;
    display: flex;
    align-items: center;
    text-shadow: none;
}

.section-subtitle p {
    color: inherit;
    font-size: clamp(1rem, 1.6vw, 1.6rem);
    font-weight: 300;
    opacity: 0.8;
    margin: 0;
}

/* testimonial Styling - Unified for all screen sizes */
.testimonial-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 100px 0 0;
    text-align: center;
    opacity: 0;
    transition: opacity 2s ease;
    /* Height and padding will be set dynamically by JS */
}

.testimonial-track {
    position: relative;
    width: 100%;
    /* Height will be set dynamically by JS */
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    top: 0;
    left: 100%; /* Start off-screen to the right */
    padding: 20px;
    box-sizing: border-box;
    transition: left 0.8s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0; /* Start invisible */
}

@media screen and (max-width: 450px) {
    .testimonial-slide {        
        padding: 0;        
    }
}

.testimonial-slide.active {
    left: 0; /* Active slide is visible in center */
    opacity: 1;
}

.testimonial-slide.previous {
    left: -100%; /* Previous slide moves to left */
    opacity: 0.5; /* Partially visible during exit */
}

.testimonial-slide.next {
    left: 100%; /* Next slide waits on right */
    opacity: 0.5; /* Partially visible during entrance */
}

.testimonial-stars {
    text-align: center; /* Keep this for fallback */
    width: 100%;
    display: flex;
    justify-content: center; /* This will properly center the stars */
    align-items: center;
    gap: 5px; /* Optional: adds space between stars */
}

blockquote {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 40px;
    margin-inline-end: 40px;
    unicode-bidi: isolate;
}

@media (max-width: 450px) {
    blockquote {
        margin-inline-start: 20px;
        margin-inline-end: 20px;
        unicode-bidi: isolate;
    }
}

.testimonial-author {
    text-align: center;
    width: 100%;
    display: block;
}

.testimonial-author {    
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 20px; /* Space before dots */
}

.testimonial-indicators {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    /* bottom position is set by JS */
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.dot.active {
    background: var(--MBM-orange);
    transform: scale(1.2);
}


.testimonial-indicators .dot {
    background-color: #ccc;
}

.testimonial-indicators .dot:hover {
    transform: scale(1.1);
    background-color: #9c9c9c;
}

.testimonial-indicators .dot.active {
    background: var(--MBM-orange);
    transform: scale(1.2);
}

.contact-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0 10vh 0;
    max-width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 2rem 0;
}

/* Reset button styling for contact items */
.contact-item {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: pointer;
    
    /* Reset button styling */
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: var(--MBM-dark);
    text-align: left;
    width: 100%;
}

.contact-item:hover:not(:last-child) {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--MBM-orange);
    color: white;
    flex-shrink: 0;
}

.contact-item .icon svg {
    width: 20px;
    height: 20px;
}

.contact-item .details {
    flex: 1 1 auto;
    /* allow content to wrap and grow the button height */
    height: auto;
    min-height: 50px; /* keep at least icon height for alignment */
    box-sizing: border-box;
}

.contact-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 0.3rem;
    color: var(--MBM-dark);
}

.contact-item .value,
.contact-item a:not(.social-icon) {
    display: inline-block;
    width:fit-content;
    font-size: 1.1rem;
    color: var(--MBM-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word;
}

/* Special styling for links */
a.contact-item {
    display: inline;
    text-decoration: none;
    color: inherit;    
}

/* Ensure link text color matches other items */
.contact-item a:hover {
    background-color: rgba(255, 102, 0, 0.4);
}

/* Tooltip for copy items */
.contact-item .tooltip {
    position: absolute;
    right: 10px;
    top: 0;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--MBM-white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Tooltip anzeigen, wenn contact-item gehovert ist, aber NICHT der Link darin */
.contact-item:hover:has(a:not(:hover)) .tooltip {
    opacity: 0.7;
}

/* Sicherstellen, dass Tooltip ausgeblendet ist, wenn der Link selbst gehovert wird */
.contact-item a:hover ~ .tooltip {
    opacity: 0 !important;
}

.contact-item.copied .tooltip {
    opacity: 1;
    background-color: var(--MBM-orange);
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}


#social-container .social-icons {
    width: 100%;
    justify-content: flex-start;
    margin-top: auto;
}

.social-icon svg {
    width: 22px;
    height: 22px;
    color: var(--MBM-dark);
}

.social-icon:hover {
    transform: scale(1.1);
    background-color: var(--MBM-orange);
}


/* Bounce animation for social icons */
#social-container:hover .social-icons {
    animation: none;
}

/* Füge individuelle Animation für jedes Icon hinzu */
#social-container:hover .social-icon:nth-child(4) {
    animation: socialBounce 0.5s ease 0s; /* LinkedIn (letztes Icon) startet sofort */
}

#social-container:hover .social-icon:nth-child(3) {
    animation: socialBounce 0.5s ease 0.1s; /* Drittes Icon startet mit 0.1s Verzögerung */
}

#social-container:hover .social-icon:nth-child(2) {
    animation: socialBounce 0.5s ease 0.2s; /* Zweites Icon startet mit 0.2s Verzögerung */
}

#social-container:hover .social-icon:nth-child(1) {/* Entferne die bisherige Animation */
    animation: socialBounce 0.5s ease 0.3s; 
}

@keyframes socialBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Media query for mobile */
@media (max-width: 768px) {
    .contact-info {
        padding: 1rem;
    }
    
    .contact-item {
        padding: 0.8rem;
    }
    
    .contact-item .value,
    .contact-item a {
        font-size: 1rem;
    }
    
    .social-icons {
        justify-content: center;
    }
}


/* Service List & Customer Logo Styling */
.service-list {
    color: inherit;
}

.service-list h3 {
    color: var(--MBM-orange);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.service-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: '•';
    color: var(--MBM-orange);
    position: absolute;
    left: 0;
}

/* ABOUT */

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    flex: 2;
    max-width: 800px;
}

.about-text a{
    color: var(--MBM-dark);    
    text-decoration: none;
    text-shadow: none;
    font-weight: 800;
    padding: 0 0.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.about-text a:hover{
    color: var(--MBM-dark);    
    text-decoration: none;
    font-weight: 800;
    background-color: rgba(255, 102, 0, 0.4);
}

.about-pic-side {
    display: flex;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.about-me-pic {
    width: 100%;
    max-width: 50vw;
    height: auto;
    object-fit: cover;
    filter: grayscale(100%);
}

@media screen and (max-width: 1000px) {
    .about-content {
        flex-direction: column-reverse;
        gap: 2rem;
    }

    .about-text,
    .about-pic-side {
        flex: none;
        max-width: 100%;
    }
   
    .about-pic-side img {
        height: 100%;
        width: 100%;
        max-height: 400px;
        object-fit: contain;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .section-heading {
        padding-right: 0;
        padding-bottom: 1.5rem;
        width: 100%;
    }

    .section-heading::after {
        top: auto;
        bottom: 0;
        left: 0;
        right: auto;
        width: 3rem;
        height: 1px;
        transform: none;
    }

    .section-subtitle {
        padding-left: 0;
    }
}

@media screen and (max-width: 450px) {
    .about-pic-side {
        justify-content: center;
    }
    
}

.customers-grid {
    flex: 1 1 calc(50% - 10px); /* Mindestens zwei Spalten */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.customer-logo {
    display: flex;
    width: 200px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.customer-logo img {
    max-width: 85%;
    max-height: 94px;
    object-fit: contain;
}

.mannundhummel-logo img {
    max-height: 66px;
    object-fit: contain;
}

/*Big Screens! */
@media screen and (min-width: 1200px) {
    .customer-logo {
        width: 300px;
        height: 160px;
    }

    .avisio-logo img {
        max-width: 100%;
        max-height: 100%;
        transform: scale(1.2);
        object-fit: contain;
    }

}


@media screen and (max-width: 768px) {
    .customers-grid {
        flex: 1 1 calc(50% - 10px); /* Mindestens zwei Spalten */
        gap: 5px;
    }

    .customer-logo {
        max-width: 220px; /* Reduzierte maximale Breite */
        max-height: 120px; /* Reduzierte maximale Höhe */
        width: auto;
        min-width: 166px;
    }

    .customer-logo img {
        max-width: 78%;
        max-height: 64px;
        object-fit: contain;
    }
}

@media screen and (max-width: 450px) {
    .customers-grid {
        flex: 1 1 calc(50% - 10px); /* Mindestens zwei Spalten */
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .customer-logo {
        width: 100%;
        min-width: 80px;
        width: 48%;/* Immer zwei Spalten auf <=450px */
        box-sizing: border-box;
    }

    .customer-logo img {
        width: 100%;
        max-height: 60px;
        object-fit: contain;
    }

    .kleinblatt-logo img {
        max-width: 85%;
        max-height: 70px;
        object-fit: contain;
    }

    .avisio-logo img {
        max-width: 70%;
    }

    .mannundhummel-logo img {
        max-width: 66%;
    }

    .wohlfeil-logo img, .ludwigsburg-logo img {
        max-width: 90%;
    }
}

/* Rocket Icon Styling */
.rocket-container {
    position: absolute;
    top: 10vh;
    left: 50%;
    z-index: 2;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    perspective: 1000px;
}

#rocket-svg {
    width: 100%;
    height: auto;
    max-width: 300px; /* Adjust as needed for the final size */
    color: var(--MBM-dark);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}

@media screen and (max-width: 768px) {
    .rocket-container {
        top: 10vh; /* Adjust for smaller screens */
        left: 50%;
    }
}


form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
    background-color: var(--MBM-white); /* Light input background */
    color: var(--MBM-dark); /* Dark input text */
    border: 1px solid #ccc; /* Light border */
}

form button {
    background-color: var(--MBM-orange); /* Button remains orange */
    color: var(--MBM-white); /* White text on button */
}

/* PROJECT SUBPAGE STYLES */
.project-content {
    background: var(--MBM-white);
    color: var(--MBM-dark);
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 4rem 18% 3rem 18%;
    box-sizing: border-box;
}
/* FLEX META TABLE FOR PROJECT SUBPAGES */
.project-meta-table-flex {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    padding: 2rem 0;
    flex-wrap: wrap;
}
.meta-column {
    flex: 1 1 0;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.meta-header {
    font-size: 1.15rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    color: var(--MBM-dark);
}
.meta-value {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--MBM-dark);
}

@media (max-width: 900px) {
    .project-meta-table-flex {
        gap: 1rem;
    }
    .meta-column {
        min-width: 140px;
        padding: 0.5rem 0.5rem;
    }
}
@media (max-width: 600px) {
    .project-meta-table-flex {
        flex-direction: column;
        gap: 0.7rem;
        padding: 1rem 0;
    }
    .meta-column {
        width: 100%;
        min-width: 0;
        border-radius: 6px;
        padding: 0.5rem 0.5rem;
    }
}


@media screen and (max-width: 450px) {
    .project-content {
        padding: 2rem 3% 2rem 3%;
    }
}
.project-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
    margin-top: 6rem;
}
.project-hero-img {
    width: 100%;
    max-width: 1100px;
    height: auto;
    max-height: 600px;
    aspect-ratio: 16/9;
    /* border-radius: 18px; */
    box-shadow: 0 6px 32px rgba(0,0,0,0.08);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}
.project-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}
.project-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--MBM-dark);
    letter-spacing: -1px;
    text-align: left;
    padding-left: 2.5rem;
}
.project-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--MBM-dark);
    text-align: left;
}
.project-meta {
    margin-bottom: 2rem;
    font-size: 1.05rem;
}
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    align-items: center;
    width: 100%;
}
.gallery-img {
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}
.project-process {
    margin-bottom: 2.5rem;
    text-align: center;
}
.project-process h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    color: var(--MBM-dark);
    text-align: center;
}
.project-process ul {
    margin: 0 auto;
    color: var(--MBM-dark);
    display: inline-block;
    text-align: left;
}
.project-video {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}
.project-video-iframe {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/10;
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    display: block;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .project-hero-img,
    .gallery-img,
    .project-video-iframe {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .project-section {
        padding: 1rem 0;
    }
    .gallery-img {
        max-width: 100%;
    }
    .project-video-iframe {
        max-width: 100%;
        height: 200px;
    }
}

/* =============================================================================
   LEGAL PAGES CONTENT
   ============================================================================= */

body.legal-page {
    min-height: 100vh;    
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body.legal-page h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin: 0;
    padding: 2rem 0;
    color: var(--MBM-dark);
    text-align: center;
    font-weight: bold;
    overflow-wrap: break-word;
    hyphens: auto;
}

body.legal-page h2 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin: 0;
    padding-top: 2rem;
    color: var(--MBM-dark);
    text-align: center;
    font-weight: bold;
}

/* Hauptinhalt */
.legal-content {
    flex: 1;
    max-width: 800px;
    margin: 10vh auto;
    padding: 0 18% 0 18%;
    line-height: 1.6;
    position: relative;
}

.legal-text {
    font-size: 1rem;
    color: var(--MBM-dark);
    text-align: left;
}

/* Links im Text */
.legal-content a {
    text-decoration: none; 
    font-weight: bold;
    color: var(--MBM-dark);
    background-color: rgba(255, 102, 0, 0.4);
    transition: background-color 0.2s ease;
}

.legal-content a:hover {
    background-color: var(--MBM-orange);
}

/* Responsive Einstellungen für Legal Pages */
@media screen and (max-width: 768px) {
    body.legal-page h1 {
        overflow-wrap: anywhere;
    }    
}


@media screen and (max-width: 450px) {
    .legal-content {
        padding: 0 3% 0 3%;
    }
}