/* Image Optimization CSS - WebP Support and Performance */

/* Gallery grid improvements for WebP images */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: #f0f0f0;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* WebP fallback support */
.no-webp .gallery-item img[src$=".webp"] {
    display: none;
}

/* Lazy loading optimization */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Gallery overlay improvements - Remove text, keep hover effect */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 70%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Click to enlarge indicator */
.gallery-overlay::before {
    content: "🔍";
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.2s ease;
}

.gallery-item:hover .gallery-overlay::before {
    transform: scale(1);
}

.overlay-content {
    display: none; /* Hide text content */
}

/* Modal styles for enlarged images */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e73b3b;
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.modal-info h4 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 1.2rem;
}

.modal-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Hero image optimization */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Chef image optimization */
.chef-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness for images */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .chef-image {
        height: 300px;
    }
    
    .overlay-content {
        padding: 1rem;
    }
    
    .overlay-content h4 {
        font-size: 1.1rem;
    }
    
    .overlay-content p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
}
