/* תיקוני מובייל לנדלן360 - גרסה סופית עובדת */

/* הסתרת תפריט דסקטופ במובייל */
@media screen and (max-width: 768px) {
    .main-navigation .menu {
        display: none;
    }
}

/* כפתור המבורגר */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 10001;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* קווי המבורגר */
.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* אנימציית X כאשר התפריט פתוח */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* רקע כהה מאחורי התפריט */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* תפריט מובייל */
@media screen and (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100%;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        z-index: 9999;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding-top: 60px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu .menu {
        display: block !important;
        list-style: none;
        padding: 0;
        margin: 0;
        opacity: 1;
        background: transparent;
    }

    .mobile-menu .menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu .menu li:last-child {
        border-bottom: none;
    }

    .mobile-menu .menu a {
        display: block;
        padding: 15px 20px;
        color: #ffffff !important;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s ease;
        opacity: 1 !important;
        border: none;
        background: transparent;
    }

    .mobile-menu .menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-right: 30px;
    }

    /* כפתור CTA במובייל */
    .mobile-menu .menu .cta-button a {
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
        color: #1e3c72 !important;
        font-weight: bold;
        margin: 10px 20px;
        border-radius: 25px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
        padding: 12px 20px;
    }

    .mobile-menu .menu .cta-button a:hover {
        background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
        padding-right: 20px;
    }
}

/* תמיכה ב-RTL */
[dir="rtl"] .mobile-menu {
    right: auto;
    left: -300px;
}

[dir="rtl"] .mobile-menu.active {
    left: 0;
    right: auto;
}

[dir="rtl"] .mobile-menu .menu a:hover {
    padding-right: 20px;
    padding-left: 30px;
}

/* אנימציות חלקות */
.mobile-menu .menu li {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active .menu li {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu.active .menu li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .menu li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .menu li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .menu li:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active .menu li:nth-child(5) { transition-delay: 0.5s; }

/* הבטחת תצוגה נכונה על כל המכשירים */
@media screen and (max-width: 480px) {
    .mobile-menu {
        width: 280px;
        right: -280px;
    }
    
    [dir="rtl"] .mobile-menu {
        left: -280px;
        right: auto;
    }
}

/* תמיכה נוספת במכשירים ישנים */
@supports not (backdrop-filter: blur(5px)) {
    .menu-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
}