/* Custom scroll animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom hover effects */
.food-card {
    transition: all 0.3s ease;
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Category button active state */
.category-btn.active {
    background-color: #f97316;
    color: white;
}

/* Modal animations */
.modal-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: translateX(0);
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    transition: all 0.3s ease;
}

/* Burger Menu Styles */
.burger-menu {
    display: none;
}

@media (max-width: 1024px) {
    .burger-menu {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 40;
        background: white;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
    }
}

/* Burger Icon Animation */
.burger-icon {
    width: 30px;
    height: 20px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    color:white;
}

.burger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    color:white;
}

.burger-icon span:nth-child(1) {
    top: 0px;
}

.burger-icon span:nth-child(2) {
    top: 8px;
}

.burger-icon span:nth-child(3) {
    top: 16px;
}

.burger-icon.open span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.burger-icon.open span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

.burger-icon.open span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 30;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Search results dropdown */
.search-results {
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



/* Mobile Footer */
.mobile-footer {
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Adjust main content padding to account for mobile footer */
.main-content {
    padding-bottom: 80px; /* Space for mobile footer */
}

@media (min-width: 1024px) {
    .main-content {
        padding-bottom: 0; /* Remove padding on desktop */
    }
}

/* Info Modal Animation */
#info-modal .modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#info-modal.active .modal-content {
    transform: scale(1);
}

/* Sidebar Styles */
.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.sidebar.open {
    transform: translateX(0);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.mobile-menu-overlay.open {
    display: block;
}

/* Burger Icon Animation */
.burger-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.burger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.burger-icon.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-icon.open span:nth-child(2) {
    opacity: 0;
}

.burger-icon.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Modal Styles */
.modal-overlay {
    display: none;
}

.modal-overlay.active {
    display: flex;
}

/* Scroll animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Search Results */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Large screens sidebar */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
        position: fixed;
    }
}
/* Loader Styles */
#page-loader {
    transition: opacity 0.5s ease-in-out;
}

/* Pulse animation for dots */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.animate-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Ensure content is hidden until loader is gone */
body:not(.loaded) {
    overflow: hidden;
}

body.loaded #page-loader {
    opacity: 0;
    pointer-events: none;
}