.modal-gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none; 
}

.modal-gallery-overlay:target {
    visibility: visible;
    opacity: 1;
    pointer-events: auto; 
}

.modal-gallery-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-gallery-overlay:target .modal-gallery-content {
    transform: scale(1);
}

.gallery-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: white;
    background-color: #ff4444;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
    border: 2px solid white;
    text-decoration: none; 
}
.gallery-close-btn:hover {
    background-color: #ff1744;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.7);
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-decoration: none; 
}
.gallery-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.gallery-prev-btn {
    left: -25px;
}
.gallery-next-btn {
    right: -25px;
}

.gallery-nav-btn.disabled {
    background-color: rgba(150, 150, 150, 0.5);
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
    pointer-events: none;
}

.modal-gallery-image-container {
    margin: 0 30px; 
}
.modal-gallery-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.modal-gallery-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    padding-top: 10px;
}
.gallery-page-indicator {
    text-align: center;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

