/* Gallery style */

.page-content h1 {
    color: #683802;
    margin-bottom: 30px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: 2.5rem;
}

.gallery-intro {
    font-size: 1.1rem;
    color: #683802;
    margin-bottom: 30px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Nav */
.gallery-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-nav-link {
    padding: 12px 24px;
    background: #f4f4f4;
    color: #683802;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.gallery-nav-link:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.gallery-nav-link.active {
    background: #c9a96e;
    color: white;
}

/* Gallery section */
.gallery-section {
    margin-bottom: 60px;
    padding: 30px 0;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #683802;
}

.gallery-section h2 i {
    color: #c9a96e;
    margin-right: 10px;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 15px;
    background: white;
    text-align: center;
    font-size: 0.95rem;
    color: #683802;
    line-height: 1.4;
}

/* sections animation */
.gallery-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Force dishes section to be visible */
#dishes {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: block !important;
    visibility: visible !important;
}

/* Alternative grid layout for dishes */
#dishes .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Adaptability */
@media (max-width: 768px) {
    .gallery-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-nav-link {
        width: 200px;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        margin: 0 10px;
    }
    
    .gallery-caption {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* active section effect */
.gallery-section:target {
    animation: highlightSection 1.5s ease;
}

@keyframes highlightSection {
    0% { background-color: transparent; }
    50% { background-color: rgba(201, 169, 110, 0.1); }
    100% { background-color: transparent; }
}

/* Modal window styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 0 auto;
    width: auto;
    max-width: 90vw;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    display: inline-block;
    max-width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    vertical-align: middle;
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    margin: 0 auto;
}

.modal-caption {
    text-align: center;
    color: white;
    padding: 15px;
    font-size: 1.1rem;
    background: rgba(104, 56, 2, 0.9);
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    border: none;
}

.close-modal:hover {
    color: #c9a96e;
    background: rgba(0, 0, 0, 0.7);
}

/* Animations for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: translateY(-50%) scale(0.8); }
    to { transform: translateY(-50%) scale(1); }
}

/* Adaptability for modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    
    .modal-caption {
        font-size: 1rem;
        padding: 12px;
    }
    
    .modal-image {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98vw;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        font-size: 25px;
        width: 30px;
        height: 30px;
    }
    
    .modal-caption {
        padding: 10px;
        font-size: 0.9rem;
    }
}