/* ===== MOBILE SCROLL ENHANCEMENT ===== */
/* Enhanced scrolling experience for mobile users */

/* Back to Top Button - Enhanced for Mobile */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #f4d03f, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Section Navigation for Mobile */
.mobile-section-nav {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 8px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.mobile-section-nav.show {
    display: flex;
}

.section-nav-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #d4af37;
    border-radius: 50%;
    color: #d4af37;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-nav-btn:hover,
.section-nav-btn.active {
    background: #d4af37;
    color: white;
    transform: scale(1.1);
}

.section-nav-btn:active {
    transform: scale(0.95);
}

/* Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f4d03f);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Mobile Scroll Indicator */
.mobile-scroll-indicator {
    position: fixed;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 998;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 8px 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 4px 0;
}

.scroll-dot.active {
    background: #d4af37;
    transform: scale(1.5);
}

.scroll-dot:hover {
    background: #d4af37;
    transform: scale(1.2);
}

/* Smooth Scroll Enhancement */
html {
    scroll-behavior: smooth;
}

/* Mobile-specific scroll improvements */
@media (max-width: 768px) {
    /* Show mobile scroll features */
    .mobile-section-nav.show {
        display: flex;
    }
    
    .mobile-scroll-indicator {
        display: flex;
    }
    
    /* Enhanced back to top for mobile */
    .back-to-top {
        bottom: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    /* Adjust section nav position */
    .mobile-section-nav {
        bottom: 90px;
        right: 25px;
    }
    
    /* Better touch targets */
    .section-nav-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Scroll indicator positioning */
    .mobile-scroll-indicator {
        right: 15px;
    }
    
    .scroll-dot {
        width: 10px;
        height: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .scroll-dot::before {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: currentColor;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-section-nav {
        bottom: 80px;
        right: 20px;
    }
    
    .section-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

/* Floating Action Menu for Mobile */
.mobile-fab-menu {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: none;
}

.fab-main {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #f4d03f, #d4af37);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-fab-menu.active .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #d4af37;
    border-radius: 50%;
    color: #d4af37;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fab-item:hover {
    background: #d4af37;
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-fab-menu {
        display: block;
    }
}

/* Scroll Hint Animation */
.scroll-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #d4af37;
    font-size: 14px;
    z-index: 999;
    animation: bounce 2s infinite;
}

.scroll-hint.show {
    display: flex;
}

.scroll-hint i {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@media (max-width: 768px) {
    .scroll-hint {
        display: flex;
    }
}

/* Hide scroll hint after user scrolls */
.scroll-hint.hidden {
    display: none !important;
}

/* Enhanced Mobile Optimizations */
body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Momentum Scrolling Enhancement */
.momentum-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

/* Better touch targets */
.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* Apply touch targets to interactive elements */
.section-nav-btn,
.scroll-dot,
.fab-item,
.back-to-top {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

/* Prevent text selection during scroll gestures */
.back-to-top,
.section-nav-btn,
.scroll-dot,
.fab-main,
.fab-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced focus states for accessibility */
.back-to-top:focus,
.section-nav-btn:focus,
.scroll-dot:focus,
.fab-main:focus,
.fab-item:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .back-to-top,
    .section-nav-btn,
    .fab-main {
        border: 3px solid currentColor;
        font-weight: bold;
    }
    
    .scroll-progress {
        background: currentColor;
        height: 6px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-progress,
    .back-to-top,
    .section-nav-btn {
        transition: none;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .back-to-top,
    .section-nav-btn {
        background: rgba(30, 30, 30, 0.9);
        border-color: #f4d03f;
        color: #f4d03f;
    }
    
    .back-to-top:hover,
    .section-nav-btn:hover {
        background: #f4d03f;
        color: #1e1e1e;
    }
    
    .scroll-progress {
        background: linear-gradient(90deg, #f4d03f, #d4af37);
    }
}