/* Sticky Menü CSS - ReyMu Panel (Frontend) */

/* Body scroll lock for mobile menu */
body.reymu-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.reymu-sticky-menu {
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    flex: var(--flex, 1);
    min-width: 0;
    z-index: 10;
}

.reymu-sticky-menu.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999;
}

.reymu-sticky-menu__inner {
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

.reymu-sticky-menu__content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Desktop Menü */
.reymu-desktop-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    flex-wrap: wrap;
    width: 100%;
}

.reymu-desktop-menu li {
    display: inline-flex;
    margin: 0;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

.reymu-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    min-width: 70px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-radius: 0;
    font-weight: 500;
    height: calc(var(--menu-height, 60px) - 12px);
    background-color: rgba(0, 0, 0, 0.05);
}

.reymu-menu-link.has-bg-image {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background-color: transparent;
}

.reymu-menu-link.has-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    transition: background 0.3s ease;
}

.reymu-menu-link.has-bg-image:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.reymu-menu-link span {
    position: relative;
    z-index: 3;
}

.reymu-menu-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hamburger Trigger */
.reymu-hamburger-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    height: 100%;
    width: 100%;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 99999;
    position: relative;
}

.reymu-hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
}

.reymu-hamburger-icon span {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.reymu-hamburger-text {
    font-weight: 500;
}

/* Hamburger Menu (Dropdown) */
.reymu-hamburger-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 99998;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .reymu-sticky-menu {
        width: 100%;
        flex: none;
    }
    
    .reymu-desktop-menu {
        display: none;
    }
    
    .reymu-hamburger-trigger {
        display: flex;
    }
    
    .reymu-sticky-menu__content {
        justify-content: center;
    }
    
    /* Overlay effect for mobile */
    .reymu-sticky-menu.menu-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        background: transparent;
    }
    
    .reymu-sticky-menu.menu-open .reymu-sticky-menu__inner {
        position: relative;
        z-index: 100000;
    }
    
    .reymu-sticky-menu.menu-open .reymu-hamburger-menu {
        display: block;
        position: fixed;
        top: var(--menu-height, 60px);
        left: 0;
        right: 0;
        bottom: 0;
        max-height: calc(100vh - var(--menu-height, 60px));
        background: var(--menu-bg, #fff);
        animation: reymuSlideUp 0.3s ease;
        overflow-y: auto;
        z-index: 99999;
    }
    
    /* Semi-transparent overlay behind menu */
    .reymu-sticky-menu.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99998;
        animation: reymuFadeIn 0.3s ease;
    }
}

/* Desktop hamburger (8+ link varsa) */
@media (min-width: 769px) {
    .reymu-sticky-menu--hamburger .reymu-desktop-menu {
        display: none;
    }
    
    .reymu-sticky-menu--hamburger .reymu-hamburger-trigger {
        display: flex;
    }
    
    .reymu-sticky-menu.menu-open .reymu-hamburger-menu {
        display: block;
    }
}

/* Animations */
@keyframes reymuSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes reymuSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes reymuFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Açık hamburger ikonu animasyonu */
.reymu-sticky-menu.menu-open .reymu-hamburger-icon span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.reymu-sticky-menu.menu-open .reymu-hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.reymu-sticky-menu.menu-open .reymu-hamburger-icon span:last-child {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Çoklu menü wrapper */
.reymu-menus-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

/* Hamburger menu link styles */
.reymu-hamburger-menu ul {
    list-style: none;
    margin: 0;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reymu-hamburger-menu .reymu-menu-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    transition: all 0.2s;
    background-size: cover;
    background-position: center;
    position: relative;
    height: auto;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
}

.reymu-hamburger-menu .reymu-menu-link.has-bg-image::before {
    background: rgba(0, 0, 0, 0.5);
}

.reymu-hamburger-menu .reymu-menu-link:hover {
    transform: translateX(5px);
    box-shadow: none;
}

/* Responsive */
@media (max-width: 480px) {
    .reymu-menu-link {
        padding: 0 10px;
        min-width: 50px;
        font-size: 13px;
    }
    
    .reymu-hamburger-text {
        font-size: 14px;
    }
    
    .reymu-hamburger-menu .reymu-menu-link {
        font-size: 14px;
        padding: 10px 12px;
    }
}