/* 
Theme Name: Mediaapparat Theme
Description: Mediaapparat Theme is a child theme of Hello Elementor, designed for optimal performance and full compatibility with Elementor page builder.
Author: WP-Stars GmbH
Author URI: https://wp-stars.com
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
*/

@view-transition {
    navigation: auto;
}

/* Hide the WPML staging site notice */
.otgs-development-site-front-end {
    display: none;
}

/*base variables*/
:root {
    --map-rd-corner-sm: 4px;
    --map-rd-corner: 8px;
    --map-rd-corner-lg: 12px;
    --Neutral-White: #FFFFFF;
    --Neutral-Black: #181818;
    --Neutral-8: #EDEDED;
    --Neutral-16: #DADADA;
    --Neutral-32: #B5B5B5;
    --Neutral-64: #6B6B6B;
    --Neutral-48: #909090;
    --Neutral-80: #262626;
    --Neutral-90: #121212;
    --highlight-viking: #a2a2a2;
    --ff-heading: "Inter Variable", serif;
    --btn-transition-duration: 400ms;
    --btn-transition-easing: ease-in-out;

}

body {
    font-family: var(--ff-heading);

}

* {
    word-break: break-word;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
p {
    margin: 0 0 6px 0;
}

p a,
ul li a {
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    font-family: inherit;

    &:hover {
        color: var(--Neutral-White) !important;
    }
}

/*sometimes they use <ul> in textareas. we need some class surrounding this to not style the menu-items..*/
.elementor-widget-container ul {
    li {
        margin-left: 10px;
    }
}

.elementor-widget.elementor-widget-text-editor {
    & ul {
        padding-left: 20px;
    }
}

/* mobile top heading position. avoid overlap with sticky menu */
.map-video-header h1,
.map-intro-section-widget.full-width.map-u.u-px-3 {
    margin-top: 2rem;
}
@media screen and (max-width: 768px) {
    .map-video-header h1,
    .map-intro-section-widget.full-width.map-u.u-px-3 {
        margin-top: 5rem;
    }
}


/*helper classes */

/* .container-boxed:
set a container in a full-width container to the elementor-content width (styles copied from .e-con)
example usage: custom-elementor-widget with a full-width background image (e.g.: map-services-widget.php
*/
@media screen and (min-width: 769px) {

    .full-width {
        /*there is a little padding on the parent container. and the bg-img wont stretch to the browser edges. this is how we solve that*/
        width: calc( 100% + 20px );
        transform: translatex(-10px);
        margin: 0 -10px;
        position: relative;

        & .container-boxed {
            margin: 0 auto;
            max-width: var(--content-width);
            padding-inline-end: 10px;
            padding-inline-start: 10px;
            width: 100%;
        }
    }
}

@media screen and (max-width: 768px) {
    .full-width  .container-boxed  > * {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.map-vertical-text {
    writing-mode: sideways-lr;
    text-orientation: mixed;
}

/* Override vertical text to horizontal when text has 3+ lines (applied via JS) */
.map-vertical-text.map-horizontal-override {
    writing-mode: horizontal-tb;
    text-orientation: unset;
    text-align: left !important;
    align-self: flex-start; 
    height: auto !important;    
}

.map-rd-corner {
    border-radius: var(--map-rd-corner) !important;
}

.btn {
    /* Body 1/Medium */
    font-family: "Inter Variable";
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
    padding: 12px 20px;

    /* light - default*/
    color: var(--Neutral-Black) !important;
    border:1px solid var(--Neutral-White);
    background-color: var(--Neutral-White);
    border-radius: var(--map-rd-corner);
    transition: all var(--btn-transition-duration) var(--btn-transition-easing);

    /* the arrow needs some space */
    padding-right: 50px;
    display: flex;
    align-items: center;
    position: relative;

    min-width: 240px;

    &:after {
        content: "";
        display: inline-block;
        /* use SVG as mask , so that we can change the icon color via css.. */
        mask: url('/wp-content/themes/mediaapparat/assets/icons/arrow-up-dark.svg') no-repeat center;
        -webkit-mask: url('/wp-content/themes/mediaapparat/assets/icons/arrow-up-dark.svg') no-repeat center;
        background-color: currentColor;

        height: 32px;
        width: 32px;
        position: absolute;
        right: 12px;

        /* animation setup */
        transform: rotate(0deg);
        transform-origin: center;
        transition: transform var(--btn-transition-duration) var(--btn-transition-easing), background-color var(--btn-transition-duration) var(--btn-transition-easing);
    }

    &:hover {
        color: var(--Neutral-White) !important;
        background-color: var(--Neutral-Black);
        border-color: var(--Neutral-Black);

        &:after {
            transform: rotate(45deg);
        }
    }

    /* dark */
    &.dark {
        color: var(--Neutral-White) !important;
        background-color: var(--Neutral-Black);

        &:after {
            background-color: var(--Neutral-White);
        }

        &:hover {
            color: var(--highlight-viking) !important;
            border-color: var(--highlight-viking);

            &:after {
                background-color: var(--highlight-viking);
            }
        }
    }
}

.mrp-linear-gradiant-1:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1; /*dont change this, otherwise it might overlay some text content*/
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.00) 32.03%) ;
}

/* header : usually on pageload on browser bottom, until on scroll sticky until scrolled to top - fixed */
header.elementor-location-header {
    position: fixed;
    bottom: 10px;
    z-index: 20;


    &.sticky {
        top: 10px;
        bottom: unset !important;
    }

    & .elementor-widget-theme-site-logo {
        margin-left: 22px;
    }

    /* we need to set the width to this container, ohterwise it will overflow*/
    & > .elementor-element {
        width: 100vw;
    }

    & nav.elementor-nav-menu__container ul{
        color: var(--Neutral-Black);
        gap: 8px;
        li a {
            padding: 6px 12px;
            transition: background-color 0.3s ease-in-out;

            &:hover,&:focus {
                padding: 6px 12px !important;
                background-color: var(--Neutral-White);
                border-radius: var(--map-rd-corner-sm);
                color: inherit !important;

                &:after {
                    content: unset!important;
                }
            }
        }
    }
    /* Initially hide the mobile close button */
    .menu-trigger-close {
        display: none;
    }

    .menu-trigger-open, 
    .menu-trigger-close {
        cursor: pointer;
    }    
}

/* .header-menu-align-top header.elementor-location-header {
    top:0;
    bottom: unset !important;
} */
/* if the mobile-menu-popup is active and the header already is sticky to top ,
- we need to push the mobile menu-popup down a bit*/
body.popup-menu-enabled {
    header.elementor-location-header.sticky {
        top: unset !important;
        bottom: 10px !important;
    }
}
/* Show Reel Button */
.desktop-show-reel-sortcode {
    display: inline-flex;
}

.showreel-button {
    position: relative;
    display: inline-block;
    font-family: var(--ff-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--Neutral-Black);
    line-height: 28px;
    padding: 12px;
    background: #EDEDEDD9;
/*     background: var(--Neutral-8); */
	
    border-radius: var(--map-rd-corner);
    cursor: pointer;
    transition: all 0.3s ease;
    word-break: keep-all;

    & video.hover-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 0;
    }

    & span {
        position: relative;
        z-index: 1;
        word-break: keep-all;
		white-space: nowrap;
    }

    &:hover {

        & video.hover-video {
            opacity: 1;
        }

        & span {
            color: var(--Neutral-White);
        }
    }

    /*on mobile we need to see the video initially*/
    &.is-mobile {
        background: unset;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        display: flex;
        color: white;
        align-items: center;
        justify-content: center;

        & span {
            font-size: 18px
        }

        video.hover-video {
            opacity: unset;
            transition: unset;
        }
    }
}


/* Fullscreen Modal */
.showreel-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,1);
    justify-content: center;
    align-items: center;
    z-index: 9999;

    &.active {
        display: flex;
    }

    & .showreel-content {
        position: relative;
        max-width: 100%;
        max-height: 100%;

        & .showreel-full {
            width: 100%;
            height: auto;
            border-radius: 12px;
        }

        & .showreel-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            z-index: 10;
            background: var(--Neutral-8);
            border: none;
            border-radius: var(--map-rd-corner);
            padding: 12px 20px;
            min-width: unset;
            color: var(--Neutral-80);
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease-in-out;

            &:hover, &:focus {
                background: var(--Neutral-80);
                color: var(--Neutral-White);
            }

            &:after {
                content: unset;
            }
        }
    }
}

@media screen and (max-width: 768px) {
    body.showreel-fullscreen-active {
        header.elementor-location-header {
            z-index: 0;
        }
    }
}

/* Make the modal truly fullscreen on mobile */
.showreel-modal.is-mobile.active {


    & .showreel-content {
        position: relative !important;
        width: 100vw !important;
        height: 100vh !important;

        @media (orientation: portrait) {
            & .showreel-full {
                position: absolute;
                top: 50%;
                left: 50%;
                /* height: 100vw; */
                transform: translate(-50%, -50%) rotate(90deg);
                max-width: unset !important;
                max-height: unset !important;
                width: 100vh !important;
            }

            & .mobile-rotate-container {
                display: block !important;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                text-align: center;
            }
        }

        & .mobile-rotate-container {
           display: none;
        }

        & .btn.showreel-close {
            display: flex;
            padding: 12px;
            top: unset;
            bottom: 0;
            left: 50%;
            right: unset;
            transform: translate(-50%);
        }
    }
}

/* Map Back Button */
.map-back-btn-wrapper {
    width: fit-content;
    display: none;

    @media (min-width: 1024px) {
            display: block;
            margin-right: 400px;
        }
    & .map-back-button-container {
        min-height: 52px;
        min-width: 70px;
        display: flex;
        justify-content: center;
        align-items: center;   
        background-color: #EDEDED;
    }
}
.conditional-shortcode-col:has(.elementor-shortcode:empty) {
  display: none;
}

/* arrow icon rotate effect */
.map-arrow-hover-rotate {
  .map-arrow-icon {
    transition: all 0.3s ease-in-out;
    transform: rotate(0deg);
  }

  &:hover {
    .map-arrow-icon {
      transform: rotate(45deg);
    }
  }
}

/* header logo text size fix */
header .elementor-widget-image a img[src$=".svg"] {
    width: auto !important;
}

/* Hide post tags on single post @ Elementor Hello Theme */
.page-content .post-tags {
    display: none !important;
}

/* Workaround for the horizontal scrollbar */
.map-testimonial-parent-container {
    overflow: hidden;
}

.e-loop-item .project-card-col {
    transition: transform 0.3s ease !important;
}

.e-loop-item:hover .project-card-col {
    transform: scale(1.05) !important;
}

.team-member, .project-card-col {
	opacity: 0;
    transform: translateY(40px) scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


.team-member.show, .project-card-col.show {
    opacity: 1;
    transform: translateY(0) scale(1);;
	height: 100%;
	width: 100%;
}

body, html {
	overflow-x: hidden !important;
}

.cky-btn-revisit-wrapper {
	display: none !important; 
}

.menu-link .trp-flag-image {
	display: none !important;
}



/* Dynamic Dropdown */

/* Desktop Dropdown Styles */
.elementor-nav-menu .menu-item.has-dropdown {
    position: relative;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255,255,255,0.8);
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 12px 0;
    margin: 8px 0 0 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    max-height: 70vh;
    overflow-y: auto;
	display: block !important;
}

.dropdown-item:hover {
	padding: 7px 12px !important;
}

/* Show dropdown on hover (desktop) */
.has-dropdown.dropdown-open > .custom-dropdown-menu,
.has-dropdown:hover > .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.sub-arrow {
	display: none !important;
}

/* Dropdown items */
.custom-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.custom-dropdown-menu a {
    display: block;
    padding: 10px 24px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #000000;
    border-left-color: #007cba; /* Change to your brand color */
    padding-left: 28px;
}

/* Toggle button for mobile */
.dropdown-toggle {
    display: none;
    margin-left: 2px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Arrow icon */
.dropdown-toggle::after {
    content: '▼';
    font-size: 8px;
    color: currentColor;
    display: inline-block;
	position: absolute;
  	top: 6px;
}

/* Mobile Styles */
@media (max-width: 1024px) {
    .dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .has-dropdown > a {
        position: relative;
        padding-right: 50px !important;
    }
    
    .custom-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        background: #f8f8f8;
        border-radius: 0;
        min-width: 100%;
        transition: max-height 0.4s ease, padding 0.3s ease;
    }
    
    .has-dropdown.dropdown-open > .custom-dropdown-menu {
        max-height: 500px;
        padding: 8px 0;
    }
    
    .custom-dropdown-menu a {
        padding-left: 32px;
        border-left: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .custom-dropdown-menu a:hover {
        padding-left: 36px;
        border-left: none;
    }
    
    /* Rotate arrow when open */
    .has-dropdown.dropdown-open .dropdown-toggle {
        transform: translateY(-50%) rotate(180deg);
    }
}

/* Animation for dropdown items */
.custom-dropdown-menu li {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.has-dropdown.dropdown-open .custom-dropdown-menu li,
.has-dropdown:hover .custom-dropdown-menu li {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation for items */
.custom-dropdown-menu li:nth-child(1) { transition-delay: 0.05s; }
.custom-dropdown-menu li:nth-child(2) { transition-delay: 0.1s; }
.custom-dropdown-menu li:nth-child(3) { transition-delay: 0.15s; }
.custom-dropdown-menu li:nth-child(4) { transition-delay: 0.2s; }
.custom-dropdown-menu li:nth-child(5) { transition-delay: 0.25s; }
/* Add more if you have many items */

/* Scrollbar styling for long dropdowns */
.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}


.menu-item-object-custom .dropdown-toggle{
	display: block !important;
}


/* Default — opens below */
.custom-dropdown-menu { top: 100%; bottom: auto; }

/* When header is at bottom — opens above */
.custom-dropdown-menu.open-upward { top: -100px !important }

.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li ul.open-upward {
	top: -107px !important;
	border-bottom-left-radius: 0px !important;
	border-bottom-right-radius: 0px !important;
	border-top-left-radius: 4px !important;
	border-top-right-radius: 4px !important;	
}

.has-dropdown {
	padding-bottom: 10px !important;
	margin-bottom: -10px !important;
}

.has-dropdown .custom-dropdown-menu {
	transform: translatey(0px);
}