/**
 * CUSTOM SCROLLBAR
 * Antalya Korsan Taksi - Özel Kaydırma Çubuğu
 * 
 * @package AntalyaKorsanTaksi
 * @version 1.0
 * @date 18 Kasım 2025
 * @author Burak KAYA
 */

/* ============================================
   WEBKIT SCROLLBAR (Chrome, Safari, Edge)
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1A1A1A;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFD700 0%, #FF6B00 100%);
    border-radius: 10px;
    border: 2px solid #1A1A1A;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF6B00 0%, #FFD700 100%);
    border-width: 1px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #FFD700 0%, #FF6B00 50%, #FFD700 100%);
}

/* Corner */
::-webkit-scrollbar-corner {
    background: #1A1A1A;
}

/* ============================================
   FIREFOX SCROLLBAR
   ============================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: #FFD700 #1A1A1A;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #FFD700 0%, #FF6B00 50%, #FFD700 100%);
    background-size: 200% 100%;
    z-index: 9998;
    transition: width 0.1s ease-out;
    animation: progressShine 2s linear infinite;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

@keyframes progressShine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* ============================================
   SCROLL INDICATOR (Side)
   ============================================ */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scroll-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scroll-indicator-dot.active {
    background: #FFD700;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    transform: scale(1.3);
}

.scroll-indicator-dot:hover {
    background: rgba(255, 215, 0, 0.6);
    transform: scale(1.2);
}

/* Tooltip */
.scroll-indicator-dot::before {
    content: attr(data-section);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #FFD700;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scroll-indicator-dot:hover::before {
    opacity: 1;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FFD700, #FF6B00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top i {
    color: #000;
    font-size: 1.25rem;
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ============================================
   SMOOTH SCROLL ANIMATION
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   CUSTOM SCROLLBAR ANIMATIONS
   ============================================ */

/* Pulse Animation */
@keyframes scrollbarPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

::-webkit-scrollbar-thumb:hover {
    animation: scrollbarPulse 1.5s ease-in-out infinite;
}

/* ============================================
   THEME VARIATIONS
   ============================================ */

/* Corporate Theme */
body[data-theme="corporate"] ::-webkit-scrollbar-track,
body:not([data-theme]) ::-webkit-scrollbar-track {
    background: #1A1A1A;
}

body[data-theme="corporate"] ::-webkit-scrollbar-thumb,
body:not([data-theme]) ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFD700 0%, #FF6B00 100%);
    border-color: #1A1A1A;
}

body[data-theme="corporate"] .scroll-progress,
body:not([data-theme]) .scroll-progress {
    background: linear-gradient(90deg, #FFD700 0%, #FF6B00 50%, #FFD700 100%);
}

body[data-theme="corporate"] .scroll-indicator-dot,
body:not([data-theme]) .scroll-indicator-dot {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

body[data-theme="corporate"] .scroll-indicator-dot.active,
body:not([data-theme]) .scroll-indicator-dot.active {
    background: #FFD700;
    border-color: #FFD700;
}

/* Dark Theme */
body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #000000;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF0000 0%, #8B0000 100%);
    border-color: #000000;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8B0000 0%, #FF0000 100%);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

body[data-theme="dark"] .scroll-progress {
    background: linear-gradient(90deg, #FF0000 0%, #8B0000 50%, #FF0000 100%);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.5);
}

body[data-theme="dark"] .scroll-indicator-dot {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.5);
}

body[data-theme="dark"] .scroll-indicator-dot.active {
    background: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

body[data-theme="dark"] .scroll-to-top {
    background: linear-gradient(135deg, #FF0000, #8B0000);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

body[data-theme="dark"] .scroll-to-top:hover {
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

body[data-theme="dark"] * {
    scrollbar-color: #FF0000 #000000;
}

/* Light Theme */
body[data-theme="light"] ::-webkit-scrollbar-track {
    background: #F8F9FA;
}

body[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #007BFF 0%, #FFA500 100%);
    border-color: #F8F9FA;
}

body[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFA500 0%, #007BFF 100%);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

body[data-theme="light"] .scroll-progress {
    background: linear-gradient(90deg, #007BFF 0%, #FFA500 50%, #007BFF 100%);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.5);
}

body[data-theme="light"] .scroll-indicator-dot {
    background: rgba(0, 123, 255, 0.3);
    border-color: rgba(0, 123, 255, 0.5);
}

body[data-theme="light"] .scroll-indicator-dot.active {
    background: #007BFF;
    border-color: #007BFF;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.8);
}

body[data-theme="light"] .scroll-to-top {
    background: linear-gradient(135deg, #007BFF, #FFA500);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

body[data-theme="light"] .scroll-to-top:hover {
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

body[data-theme="light"] * {
    scrollbar-color: #007BFF #F8F9FA;
}

/* ============================================
   HORIZONTAL SCROLLBAR
   ============================================ */
.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #FFD700 0%, #FF6B00 100%);
    border-radius: 10px;
}

/* ============================================
   THIN SCROLLBAR
   ============================================ */
.thin-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
    border-width: 1px;
}

/* ============================================
   HIDDEN SCROLLBAR (But Still Scrollable)
   ============================================ */
.hidden-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hidden-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   SCROLL SNAP
   ============================================ */
.scroll-snap-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

.scroll-snap-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-progress {
        height: 3px;
    }
}

@media (max-width: 480px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .scroll-to-top i {
        font-size: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-progress,
    .scroll-to-top i,
    ::-webkit-scrollbar-thumb {
        animation: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .scroll-progress,
    .scroll-indicator,
    .scroll-to-top {
        display: none !important;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */
.scroll-to-top,
.scroll-indicator-dot {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* ============================================
   CUSTOM SCROLLBAR EFFECTS
   ============================================ */

/* Glow Effect on Scroll */
@keyframes scrollGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

body.scrolling ::-webkit-scrollbar-thumb {
    animation: scrollGlow 1s ease-in-out;
}

/* Rainbow Scrollbar (Optional) */
.rainbow-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #FF0000 0%,
        #FF7F00 16.67%,
        #FFFF00 33.33%,
        #00FF00 50%,
        #0000FF 66.67%,
        #4B0082 83.33%,
        #9400D3 100%
    );
}

/* Neon Scrollbar */
.neon-scrollbar::-webkit-scrollbar-thumb {
    background: #FFD700;
    box-shadow: 0 0 10px #FFD700,
                0 0 20px #FFD700,
                0 0 30px #FFD700;
}

/* ============================================
   SCROLL PERCENTAGE DISPLAY
   ============================================ */
.scroll-percentage {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
}

.scroll-percentage.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-percentage::before {
    content: '📊 ';
}

/* ============================================
   SCROLL ANIMATION TRIGGER
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
