/* ============================================= */
/* == MOBILE EXPERIENCE - Complete Mobile UI == */
/* ============================================= */

/* Mobile Bottom Bar */
.mobile-bottom-bar {
    display: none !important; /* Disabled bottom bar */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg,
            rgba(139, 25, 120, 0.98) 0%,
            rgba(112, 36, 130, 0.98) 50%,
            rgba(59, 10, 90, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-bottom-bar.active {
    display: flex;
}

.mobile-bottom-bar-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 0 10px;
}

.mobile-bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    min-width: 60px;
    position: relative;
}

.mobile-bottom-bar-item.active,
.mobile-bottom-bar-item:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.mobile-bottom-bar-item i {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.mobile-bottom-bar-item span {
    font-size: 11px;
    font-weight: 600;
    font-family: 'Fredoka', 'Comic Neue', sans-serif;
    text-align: center;
}

.mobile-bottom-bar-item .badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #FF6B6B;
    color: #FFFFFF;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Sidebar Menu */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg,
            rgba(139, 25, 120, 0.98) 0%,
            rgba(112, 36, 130, 0.98) 50%,
            rgba(59, 10, 90, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    visibility: hidden;
}

[dir="rtl"] .mobile-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-sidebar.active {
    transform: translateX(0) !important;
    visibility: visible;
}

[dir="rtl"] .mobile-sidebar.active {
    transform: translateX(0) !important;
    visibility: visible;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-sidebar-logo {
    max-height: 80px;
    width: auto;
}

.mobile-sidebar-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    z-index: 10001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-sidebar-close * {
    pointer-events: none !important;
}

.mobile-sidebar-close:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.mobile-sidebar-content {
    padding: 20px 0;
}

.mobile-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-nav-item {
    margin: 0;
}

.mobile-sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Fredoka', 'Comic Neue', sans-serif;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

[dir="rtl"] .mobile-sidebar-nav-link {
    border-left: none;
    border-right: 3px solid transparent;
}

.mobile-sidebar-nav-link:hover,
.mobile-sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border-left-color: #FF6B6B;
}

[dir="rtl"] .mobile-sidebar-nav-link:hover,
[dir="rtl"] .mobile-sidebar-nav-link.active {
    border-left-color: transparent;
    border-right-color: #FF6B6B;
}

.mobile-sidebar-nav-link i {
    width: 24px;
    height: 24px;
    font-size: 24px;
    flex-shrink: 0;
}

.mobile-sidebar-nav-link.btn-subscribe-nav {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    margin: 15px 20px;
    border-radius: 25px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    border: none;
}

.mobile-sidebar-nav-link.btn-subscribe-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Mobile Footer - Simplified */
.mobile-footer {
    display: none;
    background: linear-gradient(180deg,
            rgba(16, 0, 31, 0.95) 0%,
            rgba(44, 5, 60, 0.95) 100%);
    padding: 30px 20px;
    margin-top: 80px;
    text-align: center;
}

.mobile-footer.active {
    display: block;
}

.mobile-footer-logo {
    max-height: 100px;
    width: auto;
    margin-bottom: 20px;
}

.mobile-footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mobile-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
}

.mobile-footer-social a img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 20px;
}

/* Hide Desktop Footer on Mobile */
@media (max-width: 991px) {
    footer.footer {
        display: none !important;
    }

    .mobile-footer.active {
        display: block;
    }

    .mobile-bottom-bar.active {
        display: none !important; /* Disabled bottom bar */
    }

    /* Add padding to body for header only (no bottom bar) */
    body {
        padding-top: 60px;
        padding-bottom: 0; /* Removed bottom padding since no bottom bar */
    }

    /* Home page has transparent header overlay */
    body.is-home-page {
        padding-top: 0;
    }

    /* Reduced padding since no bottom bar */
    .home-sections:last-of-type,
    section:last-of-type {
        padding-bottom: 60px !important;
        margin-bottom: 0 !important;
    }

    /* Disable scroll snap on mobile */
    html, body {
        scroll-snap-type: none !important;
    }

    .scroll-section {
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
    }
    }
}

/* Desktop - Hide Mobile Elements */
@media (min-width: 992px) {

    .mobile-sidebar,
    .mobile-sidebar-overlay,
    .mobile-bottom-bar,
    .mobile-footer {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Safe Area Support for iOS */
@supports (padding: max(0px)) {
    .mobile-bottom-bar {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .mobile-sidebar {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Viewport Meta Tag Support */
@supports (-webkit-touch-callout: none) {
    .mobile-bottom-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Smooth Scrolling for Mobile */
@media (max-width: 991px) {
    html {
        /* scroll-behavior: smooth; */
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Prevent horizontal scroll */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* Fix for fixed elements on mobile */
    .mobile-sidebar,
    .mobile-bottom-bar {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Touch-friendly sizes */
@media (max-width: 991px) {
    .mobile-sidebar-nav-link {
        min-height: 48px;
        /* Minimum touch target size */
    }

    .mobile-bottom-bar-item {
        min-height: 48px;
        min-width: 60px;
    }
}
