/* Show mobile hero video and hide desktop on small screens */
@media (max-width: 1150px) {
    .hero-desktop-video {
        display: none !important;
    }
    .hero-mobile-video {
        display: block !important;
    }
}

/* Hero Slider Styles */
.hero-slider-section {
    position: relative;
}

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.7s cubic-bezier(0.35, 0, 0.25, 1);
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.hero-slide.slide-in-left {
    transform: translateX(-100%);
}

.hero-slide.slide-in-right {
    transform: translateX(100%);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text Overlay in Lower Left Corner */
.hero-slide-text-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Arrows */
.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-prev {
    left: 30px;
}

.hero-slider-next {
    right: 30px;
}

/* Navigation Dots */
.hero-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}
/* Section styling */
.upper-section {
    max-width: 100% !important;
    background-color: black;
    padding: 40px 0;
}

/* Flex row (default) */
.upper-flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
}

/* Left container */
.video-container-left {
    flex: 1;
    width: 50%;
    min-width: 0;
    position: relative;
    margin-left: 120px;
}

.video-container-left img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Right container */
.video-container-right {
    flex: 1;
    width: 50%;
    min-width: 0;
    position: relative;
    margin-right: 120px;
}

.text-box-wrapper {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
}

.top-square-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: justify;
}

/* ============================= */
/* RESPONSIVE BELOW 1150px */
/* ============================= */
@media (max-width: 1150px) {
    .upper-flex {
        flex-direction: column !important;
        /* Stack vertically */
        align-items: stretch !important;
        gap: 24px !important;
        height: 100% !important;
    }

    .video-container-left,
    .video-container-right {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        min-height: unset !important;
        height: auto !important;
        display: flex !important;
        align-items: flex-start !important;
    }

    .text-box-wrapper {
        padding-bottom: 0 !important;
        /* Remove video-style ratio */
        height: auto !important;
    }

    .top-square-content {
        position: static !important;
        /* Remove absolute centering */
        transform: none !important;
        width: 95% !important;
        margin: 0 auto !important;
        padding: 20px 0 !important;
        text-align: left !important;
        text-align-last: left !important;
        word-spacing: normal;
        hyphens: auto;
    }

    .upper-section.container-fluid.no-margins {
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        padding: 32px 0 !important;
    }
}

/* Generic 2-column layout (default desktop) */
.section-flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: 20px;
}

/* Shared left/right containers */
.section-left,
.section-right {
    flex: 1;
    width: 50%;
    min-width: 0;
    position: relative;
}

/* Videos and images responsive */
.section-left img,
.section-right img,
.section-left video,
.section-right video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Position for overlay titles */
.gteck-title {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

/* PRODUCT BUTTON POSITIONS */
.details-product-button-left,
.details-product-button-right {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 3;
}

.details-product-button-right {
    left: auto;
    right: 20px;
}

/* ============================= */
/* RESPONSIVE BELOW 1150 PX */
/* ============================= */
@media (max-width: 1150px) {

    /* Remove section side margins on mobile */
    section:not(.hero) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .section-flex {
        flex-direction: column;
        /* Stack vertically in normal order */
        gap: 40px;
    }

    /* Reverse order for specific sections */
    .reverse-mobile .section-flex {
        flex-direction: column-reverse;
    }

    .section-left,
    .section-right {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Make inner content full width on mobile */
    .section-left>div,
    .section-right>div {
        width: 100% !important;
        padding: 0 20px;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    /* Make video-centered blocks behave normally */
    .centered-video-wrapper {
        display: block !important;
        height: auto !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Center the right content container in .reverse-mobile for the software section */
    .reverse-mobile .section-right>div {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    /* Remove overlay button overlap issues */
    .details-product-button-left,
    .details-product-button-right {
        position: static;
        margin-top: 15px;
        display: inline-block;
    }

    /* Titles on mobile */
    .gteck-title {
        top: 10px !important;
        left: 10px;
        font-size: 1rem;
    }

    #titan.gteck-title {
        top: -100px !important;
        left: 10px;
        font-size: 1rem;
    }

    #raptor.gteck-title {
        top: -80px !important;
        left: 10px;
        font-size: 1rem;
    }

    #kuka.gteck-title {
        top: -80px !important;
        left: 10px;
        font-size: 1rem;
    }

    .raptor-rot-video-wrapper {
        display: flex !important;
        justify-content: center !important;
    }

/* Show/hide the two inline video elements depending on screen width.
   We keep the margin-left inline on each element per request and only
   toggle display here. */
#raptor-rot-video-desktop { display: block; }
#raptor-rot-video-mobile { display: none; }

/* When viewport is 1150px or smaller, hide the desktop video and show mobile */
@media (max-width: 1150px) {
    #raptor-rot-video-desktop { display: none !important; }
    #raptor-rot-video-mobile { display: block !important; width: 100% !important; margin-left: 20px !important; margin-top: 20px !important; }
}

/* When viewport is wider than 1150px, enforce desktop show (optional explicit rule) */
@media (min-width: 1151px) {
    #raptor-rot-video-desktop { display: block !important; }
    #raptor-rot-video-mobile { display: none !important; }
}

    /* Full width slider on mobile */
    .company-logos-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .company-logos-section>div {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100vw !important;
    }

    .logos-slider-container,
    .logos-slider {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100vw !important;
    }

    /* Center product buttons on mobile */
    .details-product-button-left,
    .details-product-button-right {
        display: block !important;
        text-align: center;
        margin-left: auto !important;
        margin-right: auto !important;
        width: fit-content;
    }

    /* Two Card Section Responsive */
    .container-fluid>.row {
        flex-direction: column !important;
        gap: 40px !important;
        align-items: center !important;
    }

    .container-fluid>.row>.card {
        max-width: 95vw !important;
        width: 100% !important;
        margin: 0 auto 0 auto !important;
    }
}