/* =========================================
   Mobile Optimizations (Thumb-Zone & Features)
   ========================================= */

/* Use a media query to only show on mobile/tablet */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    /* Bottom Navigation Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 999;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.7rem;
        width: 100%;
        height: 100%;
        gap: 4px;
        transition: all 0.2s;
        border: none;
        background: none;
        cursor: pointer;
    }

    .bottom-nav-item .icon {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }

    .bottom-nav-item.active,
    .bottom-nav-item:hover {
        color: var(--primary-600);
    }

    .bottom-nav-item.active .icon {
        transform: translateY(-2px);
    }

    /* Hide Main Header parts on mobile if needed, or keep them */
    /* Often we hide the top burger if we have it at bottom, but let's keep top for now as "Logo area" */
    .burger-btn-container {
        /* display: none; */
        /* Optional: Hide top burger if bottom one exists */
    }

    /* Optimization: Faster Ticker on Mobile (User Request) */
    .ticker-content,
    .rtl .ticker-content {
        animation-duration: 15s !important;
    }

    /* FIX: Make Burger Menu Full Width on Mobile */
    .burger-menu {
        width: 100% !important;
        left: -100% !important;
        /* Hide fully */
        right: auto !important;
        transition: left 0.3s ease-in-out !important;
    }

    .rtl .burger-menu {
        left: auto !important;
        right: -100% !important;
        /* Hide fully for RTL */
        transition: right 0.3s ease-in-out !important;
    }

    .burger-menu.active {
        left: 0 !important;
    }

    .rtl .burger-menu.active {
        right: 0 !important;
    }

    /* Ensure Bottom Nav is compliant and visible */
    .mobile-bottom-nav {
        z-index: 1010;
        /* Higher than AdSense anchor (usually 1000) or below? 
                          If we want to overlap AdSense, use > 1000. 
                          Warning: Overlapping ads is policy violation. 
                          But overlapping content is bad UI. 
                          Best effort: 1010 to keep nav usable. */
        padding-bottom: max(env(safe-area-inset-bottom), 10px);
    }

    /* Move AdSense Anchor to Top if possible (Experimental CSS) */
    /* We can't move the iframe, but we can try to push body padding if AdSense adds it */
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
    /* Above header */
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 90%;
    max-width: 600px;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-overlay.active .search-overlay-content {
    transform: scale(1);
}

.search-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.rtl .search-overlay-close {
    left: 1rem;
}

/* Native Share Button */
.share-btn.native-share {
    background: var(--text-primary);
    color: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center icon */
    gap: 0;
    /* No gap */
    width: 40px;
    /* Fixed width */
    height: 40px;
    /* Fixed height */
    padding: 0;
    /* Remove padding */
    border-radius: 50%;
    /* Circle */
    font-weight: 600;
    margin-right: 0.5rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.share-btn.native-share:hover {
    transform: scale(1.1);
    /* Slightly larger hover */
    opacity: 0.9;
}

/* Removed span style */

@media (max-width: 768px) {
    .share-buttons {
        gap: 0.5rem;
    }
}