/* Image Gallery Modal Styles */
.gallery-container {
    margin: 10px 0;
    padding: 10px;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.gallery-thumb {
    cursor: pointer;
    border: 2px solid #579AD2;
    transition: transform 0.2s, border-color 0.2s;
    padding: 2px;
    background: #ffffff;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    border-color: #DDA9AC;
}

.gallery-thumb img {
    display: block;
    width: auto;
    height: 100px;
    pointer-events: none; /* Prevent img drag */
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Content */
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 85vh;
    border: 5px solid #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
    text-align: center;
    max-width: 600px;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px 10px;
}

.modal-close:hover {
    color: #DDA9AC;
}

/* Navigation Arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 10px 15px;
    transition: background 0.2s;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-prev {
    left: -60px;
}

.modal-next {
    right: -60px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-nav {
        font-size: 30px;
        padding: 5px 10px;
    }
    .modal-prev {
        left: 10px;
    }
    .modal-next {
        right: 10px;
    }
}
