@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: #333333;
}

html {
    scroll-behavior: smooth;
}

/* Common Elements */
.btn-primary, .btn-wolt, .map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #000000;
    border: 1px solid #ffffff;
}

.btn-primary:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Header Styles */
header {
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

header.scrolled, 
header.bg-secondary\/95 {
    background: var(--secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

header nav a {
    color: white;
    font-weight: 500;
}

header nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Navigation Buttons */
.nav-button {
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-2px);
}

.nav-button:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

header.scrolled .nav-button {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero-section {
    padding-top: 5rem;
    position: relative;
    min-height: 30vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('https://imageproxy.wolt.com/assets/6788fe26362be7192070c35c') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Menu Cards */
.menu-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.menu-card img {
    height: 192px;
    object-fit: cover;
    width: 100%;
}

.menu-card .card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-card .card-content .description {
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.menu-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.menu-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.price {
    display: block;
    color: #000000;
    font-weight: bold;
    font-size: 1.5rem;
    margin-top: 1rem;
}

#menu-items {
    min-height: 850px;
    position: relative;
    transition: min-height 0.5s ease;
}

/* Menu Filter Styles */
.menu-filter {
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.menu-filter.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.05);
}

.menu-filter.active:hover {
    color: #000000;
    background-color: #f0f0f0;
}

.menu-filter:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Feature Card Styles */
.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-0.5rem);
}

/* Gallery Styles */
.gallery-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-item img {
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-title {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7) 50%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(0);
    padding: 12px;
    font-weight: 500;
}

.gallery-item:hover .gallery-title {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 60%);
}

/* Lightbox Styles */
.lightbox {
    transition: opacity 0.3s ease;
}

.lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

.lightbox-content {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 50px;
    box-sizing: border-box;
    position: relative;
}

.lightbox.show .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.lightbox-content img {
    transition: opacity 0.3s ease;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

#lightbox-title {
    transition: opacity 0.3s ease;
    margin-top: 1rem;
    font-size: 1.25rem;
    max-width: 100%;
    text-align: center;
    padding: 0 1rem;
}

/* Add these styles for lightbox buttons to ensure they work on mobile */
#close-lightbox,
#prev-image,
#next-image {
    z-index: 60;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#close-lightbox:hover,
#prev-image:hover,
#next-image:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    height: 3rem;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#scroll-to-top:hover {
    transform: translateY(-5px);
}

#scroll-to-top.show {
    display: flex !important;
    opacity: 1;
}

#scroll-to-top.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Menu Styles */
#mobile-menu-button {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: #f8f8f8;
    transform: scale(1.05);
}

#mobile-menu-button.active {
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#mobile-menu {
    opacity: 1;
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-overlay {
    z-index: -1;
}

/* Menu Icon Animation */
.menu-icon-bars,
.menu-icon-close {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-icon-close {
    opacity: 0;
    position: absolute;
    transform: rotate(-90deg);
}

#mobile-menu-button.active .menu-icon-bars {
    opacity: 0;
    transform: rotate(90deg);
}

#mobile-menu-button.active .menu-icon-close {
    display: block !important;
    opacity: 1;
    transform: rotate(0deg);
}

/* Map and Action Buttons */
.btn-wolt {
    background-color: #009de0;
}

.google-maps-button {
    background-color: #4285F4;
}

.waze-button {
    background-color: #33CCFF;
}

/* Unified hover states for buttons */
.btn-wolt:hover,
.google-maps-button:hover,
.waze-button:hover,
.map-button:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Inside index.html there may be hover classes that need to be updated in stylesheet */
a.btn-primary:hover, a.btn-wolt:hover, button.pagination-btn:hover, a.map-button:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.fade-in-left.visible,
.fade-in-right.visible {
    transform: translateX(0);
}

/* Utility Classes */
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }

/* Animation Delay Classes */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Accessibility Focus Styles */
a:focus, button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 5rem;
        min-height: 40vh;
    }
    
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .lightbox-content {
        padding: 0 40px;
    }
    
    #prev-image, #next-image {
        width: 36px;
        height: 36px;
    }
    
    #prev-image { left: 10px; }
    #next-image { right: 10px; }
    #close-lightbox { top: 10px; right: 10px; }

    #lightbox-title {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .map-button {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 1024px) {
    #mobile-menu-button {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-in-left,
    .fade-in-right,
    .menu-card {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

@media print {
    .lightbox, #scroll-to-top, #mobile-menu, #mobile-menu-button {
        display: none !important;
    }
}