/* Gallery Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    overflow: auto;
}

.modal-content {
    display: flex;
    flex-direction: row;
    max-width: 1000px;
    height: 80%;
    margin: 5% auto;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.modal-image {
    flex: 1;
    overflow: hidden;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details {
    flex: 1;
    padding: 30px;
    position: relative;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.8rem;
    color: #d62300;
    margin-bottom: 15px;
}

.modal-description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #d62300;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1002;
}

.modal-nav-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(214, 35, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-nav-btn:hover {
    background-color: #d62300;
}

.modal-prev {
    transform: translateY(-50%);
}

.modal-next {
    transform: translateY(-50%);
}

.no-scroll {
    overflow: hidden;
}

/* Mobile Responsive Styles for Gallery Modal */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        height: 90%;
        margin: 5% auto;
    }
    
    .modal-image {
        height: 50%;
    }
    
    .modal-details {
        height: 50%;
    }
    
    .modal-nav {
        top: 25%; /* Adjusted for the new layout */
    }
}
