@keyframes test2 {
    0% {
        opacity: 0;
        transform: translateY(-55px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EXIT ANIMATION (REVERSE) ===== */
@keyframes test2-reverse {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-55px);
    }
}

.menu.hide-m li {
    opacity: 1;
    animation-name: test2-reverse;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    animation-timing-function: linear;
}

.menu.force-hide {
    display: none !important;
}

.menu.hide-m li:nth-child(5) {
    animation-delay: 0.4s;
}
.menu.hide-m li:nth-child(4) {
    animation-delay: 0.3s;
}
.menu.hide-m li:nth-child(3) {
    animation-delay: 0.2s;
}
.menu.hide-m li:nth-child(2) {
    animation-delay: 0.1s;
}
.menu.hide-m li:nth-child(1) {
    animation-delay: 0s;
}

/* ===== MASTHEAD: after one viewport of scroll (villa / estate / private pages only) ===== */
body.kallianou-masthead-scroll #masthead.is-scrolled {
    background-color: #fff;
    box-shadow: 1px 1px 20px #000;
}

body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-58bdeb6 > .e-con-inner {
    position: relative;
    align-items: center;
    min-height: 72px;
}

/* Center the existing header logo */
body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-42d933d {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto !important;
    max-width: min(300px, 58vw);
    z-index: 3;
    flex: none !important;
    margin: 0 !important;
}

body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-42d933d .elementor-widget-container,
body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-42d933d a {
    display: flex;
    justify-content: center;
    width: 100%;
}

body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-42d933d img {
    display: block !important;
    width: auto !important;
    max-width: 100%;
    max-height: 58px;
    height: auto;
    margin: 0 auto;
    mix-blend-mode: normal;
}

/* Keep nav / burger on the right */
body.kallianou-masthead-scroll #masthead.is-scrolled .elementor-element-50ed64d {
    position: relative;
    z-index: 4;
    width: 100% !important;
    flex: 1 1 auto !important;
    justify-content: flex-end;
}

/* Optional mount point in Elementor header HTML widget: <div id="header-burger-slot"></div> */
.header-burger-slot {
    position: fixed;
    top: 30px;
    right: 55px;
    z-index: 10001;
    width: 30px;
    height: 22px;
    pointer-events: none;
}

.header-burger-slot .burger-btn {
    pointer-events: auto;
       top: 30px;
    right: 55px;
}

/* ===== BURGER (div toggle — not a <button>, avoids theme teal button styles) ===== */
.burger-btn {
    position: fixed;
    top: 30px;
    right: 55px;
    width: 36px;
    height: 16px;
    display: none;
    cursor: pointer;
    z-index: 10050;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    box-shadow: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.burger-btn:hover,
.burger-btn:focus,
.burger-btn:focus-visible {
    background: transparent;
    outline: none;
    box-shadow: none;
}

.burger-btn .burger-icon {
    position: relative;
    width: 36px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.burger-btn .burger-icon > span {
    display: block;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
    transform-origin: center;
    transition: transform 0.5s ease, width 0.5s ease, opacity 0.35s ease, background-color 0.3s ease, top 0.5s ease, left 0.5s ease;
}

.burger-btn .burger-icon > span:nth-child(1) {
    width: 60%;
}
.burger-btn:hover:not(.active):not(.button-open) .burger-icon > span:nth-child(1),
.burger-btn:hover:not(.active):not(.button-open) .burger-icon > span:nth-child(3) {
    width: 100%;
    transition: width 0.5s ease;
}
.burger-btn .burger-icon > span:nth-child(2) {
    width: 100%;
}

.burger-btn .burger-icon > span:nth-child(3) {
    width: 42%;
    margin-left: auto;
}

/* Dark bars once masthead has white bg (100vh scroll on villa / estate pages) */
body.is-masthead-scrolled .burger-btn:not(.active):not(.button-open) .burger-icon > span {
    background-color: #1f1f1f;
}

/* Other pages: dark burger after scroll when it replaces the nav links */
body:not(.kallianou-masthead-scroll) .burger-btn.show-m:not(.active):not(.button-open) .burger-icon > span {
    background-color: #1f1f1f;
}

.burger-btn.show-m {
    display: block;
    animation: test2 0.5s linear forwards;
}

/* After first entrance, show/hide on scroll without replaying animation */
.burger-btn.show-m.show-m--seen {
    display: block;
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes burger-hide {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-55px);
    }
}

.burger-btn.hide-anim {
    display: block;
    animation: burger-hide 0.4s linear forwards;
}

/* Open menu: stay fixed above slide panel */
.burger-btn.active,
.burger-btn.button-open {
    z-index: 10051;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    background: transparent;
    pointer-events: auto;
}

/* Close (X): white bars on dark panel */
.burger-btn.active .burger-icon > span,
.burger-btn.button-open .burger-icon > span {
    background-color: #fff !important;
}

.mobile-slide-menu.open .menu-wrap {
    padding-top: 52px;
}

/* ===== BURGER → X ===== */
.burger-btn.active .burger-icon,
.burger-btn.button-open .burger-icon {
    justify-content: center;
}

.burger-btn.active .menu-bar-top,
.burger-btn.active .burger-icon > span:nth-child(1),
.burger-btn.button-open .menu-bar-top,
.burger-btn.button-open .burger-icon > span:nth-child(1) {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80% !important;
    height: 2px;
    margin: 0;
    transform: translateY(-50%) rotate(42deg);
    transition: transform 0.5s ease, width 0.5s ease, opacity 0.35s ease;
}

.burger-btn.active .menu-bar-middle,
.burger-btn.active .burger-icon > span:nth-child(2),
.burger-btn.button-open .menu-bar-middle,
.burger-btn.button-open .burger-icon > span:nth-child(2) {
    opacity: 0;
    width: 0 !important;
}

.burger-btn.active .menu-bar-bottom,
.burger-btn.active .burger-icon > span:nth-child(3),
.burger-btn.button-open .menu-bar-bottom,
.burger-btn.button-open .burger-icon > span:nth-child(3) {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80% !important;
    height: 2px;
    margin: 0;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.5s ease, width 0.5s ease, opacity 0.35s ease;
}

/* ===== SLIDE MENU ===== */
.mobile-slide-menu {
    background: #1f1f1f;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 25px 15px 50px 85px;
    position: fixed;
    top: 0;
    right: -50%;
    width: 50%;
    z-index: 10040;
    max-width: 350px;
    transition: all 0.5s ease;
    align-items: flex-start;
}

.mobile-slide-menu.open {
    right: 0;
}

.menu-wrap {
    position: relative;
    flex: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.mobile-slide-menu__badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    flex-shrink: 0;
    pointer-events: none;
}

.mobile-slide-menu__badge .villa-badge--landscape-dark {
    display: block;
    width: 100%;
    max-width: min(300px, 100%);
    height: auto;
    margin: 0 auto;
    pointer-events: auto;
}

.mobile-slide-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    align-self: center;
}

.mobile-slide-menu li {
    font-size: 22px;
    margin-bottom: 18px;
    color: #fff;
}

.mobile-slide-menu li:last-child {
    margin-bottom: 0;
}

.mobile-slide-menu a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

/* ===== SOCIAL ICONS ===== */
.mobile-socials {
    margin-top: auto;
    display: flex;
    gap: 12px;
    margin-bottom: 5vh;
}

.mobile-socials a {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.mobile-socials a:hover {
    transform: scale(1.08);
}

.mobile-socials svg {
    width: 20px;
    height: 20px;
    fill: #1f1f1f;
}

/* Shortcode / inline use (not inside slide panel flex layout) */
.mobile-socials--shortcode {
    margin-top: 0;
    margin-bottom: 0;
}

/* ===== MOBILE BEHAVIOR ===== */
@media (max-width: 767px) {
    .menu {
        display: none !important;
    }

    .burger-btn,
    .burger-btn.show-m,
    .burger-btn.hide-anim,
    .burger-btn.active,
    .burger-btn.button-open {
        display: block !important;
        animation: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10051;
    }

    .mobile-slide-menu {
        width: 80%;
        right: -80%;
        padding: 25px 20px 40px 35px;
    }

    .mobile-slide-menu.open {
        right: 0;
    }

    .mobile-socials {
        margin-bottom: 15vh;
    }
}
