/* =========================================
   TEXT READABILITY & MOBILE OPTIMIZATIONS
   ========================================= */

/* 1. Mobile Only Navigation Links */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
}

/* === CINEMATIC HERO ANIMATION (DESKTOP) === */
#hero {
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background-color: #000;
}

.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero-cinematic.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;

    /* Animation Defaults */
    opacity: 0;
    transform: scale(1.08);
    -webkit-transform: scale(1.08);
    /* Safari fallback */

    animation: cinemaEnter 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    -webkit-animation: cinemaEnter 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cinemaEnter {
    0% {
        opacity: 0;
        transform: scale(1.08);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(1.0);
    }
}

@-webkit-keyframes cinemaEnter {
    0% {
        opacity: 0;
        -webkit-transform: scale(1.08);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        -webkit-transform: scale(1.0);
    }
}

#hero .container {
    position: relative;
    z-index: 5;
    width: 100%;
}

/* 2. Text Contrast & Background Layers */
.hero-content,
.gastro-hero-left,
.gastro-hero-right {
    background: rgba(0, 0, 0, 0.45);
    padding: 30px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Hero Content Entrance */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    -webkit-transform: translateY(30px);

    animation: contentSlideUp 1.0s ease-out 0.8s forwards;
    -webkit-animation: contentSlideUp 1.0s ease-out 0.8s forwards;

    max-width: 650px;
}

@keyframes contentSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes contentSlideUp {
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

/* Ensure headings in these containers are white */
.hero-content h1,
.hero-content p,
.hero-content li,
.gastro-hero-left h1,
.gastro-hero-left p,
.gastro-hero-right h3,
.gastro-hero-right li {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    position: relative;
    z-index: 10;
}

/* === FIX FÜR EINSATZBEREICHE KACHELN === */
.bereich-card {
    background: rgba(15, 15, 15, 0.75) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    padding: 30px 25px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bereich-card:hover {
    background: rgba(10, 10, 10, 0.85) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6) !important;
}

.bereich-card h3 {
    color: #FFFFFF !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
    margin-top: 15px !important;
    font-weight: 700 !important;
}

.bereich-card p {
    color: #f2f2f2 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
}

.bereich-icon {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* === SHOP BILDER OPTIMIERUNG === */
.set-card img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.set-card:hover img {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* === LOGO OPTIMIZATION === */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.nav-logo {
    height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: brightness(0) saturate(100%) invert(41%) sepia(65%) saturate(712%) hue-rotate(140deg) brightness(93%) contrast(94%);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.container {
    padding-left: 22px;
    padding-right: 22px;
}

/* === GASTRO HERO UPDATE (Dynamic Fix) === */
#gastro-hero,
.gastro-hero {
    background-image: url('images/gastro-hero-new.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    /* Ensure it works */
}

/* 4. Mobile Text Size Optimization */
@media (max-width: 768px) {

    body,
    p,
    li {
        font-size: 17px !important;
        line-height: 1.6;
    }

    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 26px !important;
    }

    h3 {
        font-size: 22px !important;
    }

    .hero-content,
    .gastro-hero-left,
    .gastro-hero-right {
        width: 100%;
        margin: 0 auto 20px auto;
        padding: 24px 20px;
    }

    .product-text,
    .legal-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tech-images,
    .tech-text {
        grid-template-columns: 1fr;
    }

    /* === MOBILE VISIBILITY FIX === */
    /* Force simple background on parent, effectively bypassing the animation container issues */
    #hero {
        background: url('images/hero-cinematic.jpg') no-repeat center center scroll !important;
        background-size: cover !important;
        min-height: 100vh !important;
        /* Standard vh for reliability */
        justify-content: center;
        align-items: center;
    }

    /* Hide the complex animation container on mobile */
    .hero-bg-anim {
        display: none !important;
    }

    /* Hero-Content Animation bleibt aktiv für Zeitversatz zum Video */
    .hero-content {
        /* Animation wird in styles.css definiert: heroContentFadeIn 1.2s ease-out 0.8s both */
    }


    .set-card img {
        height: 240px;
        margin-bottom: 20px;
    }

    .nav-logo {
        height: 100px;
        max-height: 100px;
    }
}

/* Made in Germany Badge */
.badge-mig {
    position: absolute;
    top: -80px;
    right: -15px;
    width: 70px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .badge-mig {
        width: 140px;
        top: -50px;
        right: -40px;
    }
}

.badge-mig:hover {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}