/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(85, 85, 85, 0.8);
}

/* Hide Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: transparent !important;
}

.no-scrollbar {
    -ms-overflow-style: none !important;
    /* IE and Edge */
    scrollbar-width: none !important;
    /* Firefox */
}

/* Breaking News Ticker Animation - Optimized */
@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-ticker {
    display: flex;
    /* Ensure flex for inline items */
    white-space: nowrap;
    animation: ticker 60s linear infinite;
    padding-right: 50px;
    /* Safety buffer */
    min-width: 200%;
    /* Ensure it takes space */
}

/* Pause on Hover */
.ticker-container:hover .animate-ticker {
    animation-play-state: paused;
}

/* Sticky Header Transition & Shrink */
header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.1);
    padding-top: 0;
    padding-bottom: 0;
}

header.scrolled .logo-text {
    font-size: 1.5rem;
    /* Shrink logo */
}

header.scrolled nav a {
    font-size: 0.85rem;
}

/* Weather Modal / Dropdown */
.weather-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.weather-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Backdrop Blur for Weather Card */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile Bottom Sheet Animation */
@media (max-width: 768px) {
    .weather-modal-mobile {
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }

    .weather-modal-mobile.active {
        transform: translateY(0);
    }
}

/* Notifications Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Utility: Linear Gradient Mask */
.mask-image-linear-gradient {
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
}

/* Utility: Text Shadow */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.text-shadow-md {
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-in {
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.notification-out {
    animation: slideOutDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}