html,
body,
.page-wraper {
    overflow-x: hidden !important;
}

@media (max-width: 991px) {
    .testimonial-5 .testimonial-pic-block.radius-bx .testimonial-pic:after {
        left: -5%;
        top: -5%;
        width: 100%;
        height: 100%;
    }

    /* 3. SLIDER - CONSTRAINED HEIGHT & ARROWS */
    .rev_slider_wrapper,
    .rev_slider {
        max-height: none !important;
        min-height: 100vh !important;
        height: auto !important;
        overflow: visible !important;
    }

    .top-bar .container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 8px;
        padding: 0 5px;
    }

    .wt-topbar-left,
    .wt-topbar-right {
        width: auto;
        text-align: center;
        white-space: nowrap;
    }

    .top-bar ul {
        display: flex;
        gap: 8px;
        margin: 0;
        padding: 0;
    }

    .wt-topbar-left i,
    .wt-topbar-right i {
        font-size: 10px;
        margin-right: 3px;
    }

    .logo-header {
        float: none;
        display: block;
        text-align: left;
        height: auto;
        width: 100%;
        max-width: 180px;
    }

    .logo-header img {
        width: 160px;
        height: auto;
    }

    .navbar-toggler {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 35px;
        background: transparent;
        border: none;
        padding: 6px 10px;
        z-index: 1002;
        margin: 0;
    }

    .navbar-toggler .fa {
        display: none !important;
    }

    .navbar-toggler .icon-bar {
        display: block;
        width: 28px;
        height: 3px;
        background-color: #FAD1B2;
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
        border-radius: 2px;
    }

    .navbar-toggler:not(.collapsed) .icon-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggler:not(.collapsed) .icon-bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .navbar-toggler:not(.collapsed) .icon-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-nav.navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(5, 5, 16, 0.95) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 1001 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        opacity: 0;
        visibility: hidden;
    }

    .header-nav .nav {
        width: 100%;
        text-align: left;
        margin: 0;
        padding: 0;
        list-style: none;
        overflow-y: auto;
    }

    .header-nav .nav>li {
        width: 100%;
        text-align: center;
        border: none;
        margin: 20px 0;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .header-nav.navbar-collapse.show .nav>li,
    .header-nav.navbar-collapse.in .nav>li,
    .header-nav.navbar-collapse[style*="block"] .nav>li {
        opacity: 1;
    }

    .header-nav .nav>li>a {
        padding: 0;
        color: #ffffff !important;
        font-size: 20px;
        font-weight: 700;
        text-transform: capitalize;
        font-family: 'Poppins', sans-serif;
        background: transparent !important;
        transition: all 0.3s ease;
        display: inline-block;
    }

    .header-nav .nav>li>a:hover,
    .header-nav .nav>li.active>a {
        color: #FAD1B2 !important;
        transform: scale(1.1);
        /* Modern pop-out effect */
    }

    /* Submenus (if any) - Simplify or hide for clean look */
    .sub-menu {
        display: none !important;
        /* Simplify for now or style similarly */
    }

    /* 3. SLIDER - CONSTRAINED HEIGHT & ARROWS */
    .rev_slider_wrapper,
    .rev_slider {
        max-height: none !important;
        min-height: 100vh !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Standardize slider buttons dimensions and stacking */
    .button-container a {
        width: 250px !important;
        text-align: center !important;
        display: block !important;
        margin: 10px auto !important;
        min-width: 250px !important;
        height: 50px !important;
        line-height: 50px !important;
        padding: 0 !important;
        font-size: 14px !important;
    }

    /* Remove the margin-left from the second button on mobile */
    .button-container a.m-l10 {
        margin-left: auto !important;
    }

    .tparrows {
        min-width: 60px !important;
        min-height: 60px !important;
        width: 60px !important;
        height: 60px !important;
        background: rgba(0, 0, 0, 0.65) !important;
        border-radius: 50%;
        line-height: 60px !important;
    }

    .tparrows:before {
        font-size: 24px !important;
        line-height: 60px !important;
    }

    .tp-leftarrow {
        left: 10px !important;
    }

    .tp-rightarrow {
        right: 10px !important;
    }

    .site-footer {
        text-align: center !important;
    }

    .site-footer .widget {
        text-align: center !important;
        margin-bottom: 30px;
    }

    .site-footer .widget.text-left,
    .site-footer .widget.text-right {
        text-align: center !important;
    }

    .footer-title,
    .widget-title {
        text-align: center !important;
    }

    .social-icons,
    .logo-footer {
        justify-content: center;
        display: flex;
        margin-bottom: 20px;
    }

    .widget_services ul,
    .widget_about ul {
        display: inline-block !important;
        text-align: center !important;
        padding: 0;
    }

    .widget_services li,
    .widget_about li {
        text-align: center !important;
    }

    /* Footer Bottom */
    .footer-bottom {
        text-align: center !important;
        padding: 20px 0;
    }

    .ftr-btm {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .masonry-item.cat-team {
        width: 50% !important;
        float: left !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .team-box {
        margin-bottom: 0 !important;
        border-radius: 0 !important;
    }

    .ow-img img {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }

    .team-name-normal {
        font-size: 12px !important;
    }

    .wt-footer-bot-left {
        width: 100%;
        text-align: center;
        order: 1;
        padding: 0;
    }

    /* Footer Links - Order 2 */
    .wt-footer-bot-right {
        width: 100%;
        text-align: center;
        order: 2;
        /* Second */
        padding: 0;
    }

    .copyrights-text {
        display: block;
        margin-bottom: 5px;
        font-size: 13px;
    }

    .copyrights-nav {
        float: none !important;
        display: inline-block;
        padding: 0;
        margin: 0;
    }

    .copyrights-nav li {
        display: inline-block;
        margin: 0 10px;
    }

    /* Hide Back to Top Button on Mobile */
    .scroltop {
        display: none !important;
    }

    /* 6. GENERAL PADDING/FONTS */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .p-t100 {
        padding-top: 80px !important;
    }

    .p-t60 {
        padding-top: 60px !important;
    }

    .p-b100 {
        padding-bottom: 0px !important;
    }

    .p-b70 {
        padding-bottom: 0px !important;
    }

    /* Polish typography based on Stimmen image */
    .testimonial-name {
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        text-transform: uppercase;
        color: #333;
        margin-top: 15px;
        display: block;
    }

    .testimonial-position {
        font-size: 12px !important;
        color: #FAD1B2 !important;
    }

    .testimonial-pic img {
        width: 80px !important;
        height: 80px !important;
    }

    /* General Image Constraint for Mobile */
    .section-content img,
    .wp-block-image img,
    .team-section img,
    .latest-blog-post img,
    .portfolio-wrap img,
    .ow-client-logo img {
        max-width: 80% !important;
        /* Constrain width so they aren't huge */
        height: auto !important;
        margin: 0 auto;
        display: block;
        border-radius: 5px;
        /* Optional polish */
    }

    /* Specific overrides for Team/Gallery to ensure they obey */
    .wt-team-media img,
    .wt-post-media img,
    .masonry-item img {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 0 !important;
    }


    h1 {
        font-size: 26px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    h3 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {

    /* Extra small screens - further slider constraint */
    .rev_slider_wrapper,
    .rev_slider {
        max-height: none !important;
        min-height: 100vh !important;
        height: auto !important;
    }

    #welcome {
        padding-top: 200px !important;
    }
}

@media (max-width: 991px) {
    #welcome {
        padding-top: 160px !important;
    }
}


/* Very Small Devices - Stack Topbar */
@media (max-width: 360px) {
    .top-bar .container {
        flex-wrap: wrap !important;
        gap: 2px !important;
    }

    .top-bar {
        padding: 2px 0 !important;
    }

    .navbar-toggler {
        top: 55px !important;
    }
}

/* Counter Section - Smaller on Mobile */
@media (max-width: 767px) {
    .summary-counter .icon-lg {
        font-size: 40px !important;
    }

    .summary-counter .icon-lg i {
        font-size: 40px !important;
    }

    .summary-counter .counter {
        font-size: 28px !important;
    }

    .summary-counter b {
        font-size: 28px !important;
    }

    .summary-counter .text-uppercase {
        font-size: 11px !important;
    }

    .wt-icon-box-wraper {
        padding: 5px !important;
    }
}

/* TESTIMONIAL IMAGE FIX - Override general constraints */
@media (max-width: 991px) {

    .testimonial-pic img,
    .testimonial-pic-block img,
    .testimonial-5 .testimonial-pic img,
    .testimonial-pic-block.radius-bx img {
        max-width: none !important;
        width: 80px !important;
        height: 80px !important;
        margin: 0 !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
}

/* Testimonial Image Refinement - Match User Request */
@media (max-width: 991px) {

    .testimonial-5 .testimonial-pic,
    .testimonial-grid-5 .testimonial-pic {
        width: 100px !important;
        height: 100px !important;
        position: relative !important;
        display: inline-block !important;
        border: 5px solid #FFF !important;
        background: #FFF !important;
    }

    .testimonial-pic.radius {
        border-radius: 100% !important;
    }

    .testimonial-pic img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 100% !important;
    }
}

/* Restore padding for Testimonials Section */
@media (max-width: 991px) {
    #testimonials-section {
        padding-top: 50px !important;
    }
}

/* 10. GENERAL UI & FILTERS MOBILE FIX - Scoped */
@media (max-width: 991px) {
    .site-button {
        font-size: 13px !important;
        padding: 10px 20px !important;
    }

    .masonry-filter {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 10px 0 !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .masonry-filter li {
        display: inline-block !important;
        margin: 0 !important;
    }

    .masonry-filter li a {
        font-size: 13px !important;
        padding: 8px 15px !important;
        display: block !important;
        touch-action: manipulation;
    }
}

@media (max-width: 991px) {
    #preise {
        padding-top: 60px !important;
        padding-bottom: 40px !important;
    }

    .filter-wrap {
        position: relative !important;
        z-index: 50 !important;
    }

    .masonry-filter li a {
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    #our-gallery {
        padding-top: 60px !important;
    }
}

/* 16. REDESIGNED MOBILE HEADER & COOKIE (Glassmorphism) */
@media (max-width: 767px) {

    /* 1. Header - Frosty Glass Effect */
    .sticky-header .main-bar {
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* 2. Fullscreen Menu - Blur everything */
    .header-nav.navbar-collapse.show {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        z-index: 998 !important;
        padding-top: 100px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    /* Menu Items Centered */
    .header-nav .nav {
        float: none !important;
        margin: 0 !important;
        text-align: center !important;
        width: 100% !important;
    }

    .header-nav .nav li {
        margin: 15px 0 !important;
        display: block !important;
    }

    .header-nav .nav li a {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #333 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }

    /* 3. Cookie Banner - Centered & Full */
    .cookie-modal-overlay.show {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(5px);
    }

    .cookie-panel {
        width: 90% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        max-height: 80vh !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3) !important;
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        top: auto !important;
    }

    .cookie-header-gray h3 {
        font-size: 16px !important;
    }

    .cookie-header-gray p {
        font-size: 12px !important;
    }

    .cookie-header-gray .site-button {
        font-size: 12px !important;
    }
}

/* 17. FINAL HEADER REDESIGN & COOKIE FIX */
@media (max-width: 991px) {
    .sticky-header {
        z-index: 10000 !important;
        position: relative !important;
        background: #fff !important;
    }

    /* 2. INLINE Toggler (Not Fixed) */
    .navbar-toggler {
        position: relative !important;
        z-index: 10001 !important;
        border: none !important;
        background: transparent !important;
        margin-right: 0 !important;
        top: auto !important;
        right: auto !important;
    }

    .logo-header {
        display: flex;
        align-items: center;
    }

    .header-nav.navbar-collapse.show {
        position: fixed !important;
        top: 40px !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(10, 10, 10, 0.95) !important;
        z-index: 9998 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        overflow-y: auto !important;
        transition: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .header-nav .nav {
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .header-nav .nav li {
        margin: 20px 0 !important;
        opacity: 1 !important;
        display: block !important;
        animation: none !important;
    }

    .header-nav .nav li a {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1f1f1d !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
    }

    .header-nav .nav li.active a {
        color: #FAD1B2 !important;
    }

    .footer-top .logo-footer,
    .footer-top .text-center-mobile {
        text-align: center !important;
        margin: 0 auto 20px auto !important;
        display: flex;
        justify-content: center;
    }
}

/* Topbar Stack Fix for < 554px */
@media (max-width: 554px) {
    .top-bar .container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 5px 0 !important;
        height: auto !important;
    }

    .wt-topbar-left,
    .wt-topbar-right {
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 2px;
        white-space: normal !important;
        padding-left: 15px !important;
    }
}

/* Slider Fixes for Small Screens */
@media (max-width: 400px) {

    /* Fix oversized buttons */
    .button-container a {
        width: auto !important;
        min-width: 140px !important;
        font-size: 11px !important;
        padding: 8px 12px !important;
        height: auto !important;
        line-height: normal !important;
        margin: 5px auto !important;
    }

    /* Adjust huge slider text */
    .tp-caption.WebProduct-Title {
        font-size: 20px !important;
        line-height: 24px !important;
    }

    .tp-caption.WebProduct-SubTitle {
        font-size: 14px !important;
        line-height: 18px !important;
    }

    .tp-caption.WebProduct-Content {
        font-size: 12px !important;
        line-height: 16px !important;
        /* display: none !important; - Restored per user request */
    }
}

/* -------------------------------------------
   NEW: Filter, Welcome & Medien Fixes (User Request)
------------------------------------------- */

/* 1. Filters: Single Line & No Slash (< 991px for broad coverage, or <554px) */
@media (max-width: 991px) {

    /* Remove the slash separator */
    .masonry-filter.link-style>li:after {
        content: none !important;
        display: none !important;
    }

    /* Keep items in one line, scrollable if needed, or centered row */
    .masonry-filter {
        display: block !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        text-align: center !important;
        padding-bottom: 15px !important;
        /* Space for scrollbar and breathing room */
        margin-bottom: 20px !important;
        /* Prevent touching content below */
        -webkit-overflow-scrolling: touch;
    }

    .masonry-filter>li {
        display: inline-block !important;
        float: none !important;
        margin-right: 15px !important;
        /* Reduce margin */
        margin-bottom: 0 !important;
    }

    /* Ensure links define the line */
    .masonry-filter>li a {
        font-size: 13px !important;
        padding: 5px 0 !important;
    }
}

/* 2. Welcome Section: Increase Top Padding */
@media (max-width: 480px) {
    #welcome {
        /* User previously set 200px, increasing to 260px for more separation */
        padding-top: 260px !important;
    }
}

/* 3. Medien Section: Reduce Spacing (User request: No white space) */
@media (max-width: 991px) {
    #medien {
        padding-top: 0px !important;
        padding-bottom: 0px !important;
    }

    /* Remove margins inside medien grid */
    .medien-grid {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
    }
}

/* 4. Instagram Fix: Ensure they fit in container */
@media (max-width: 991px) {
    .instagram-media {
        min-width: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}