/**
 * Portfolio Gallery/Lightbox Styles
 */

/* Modal Container */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #fff;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    transition: color 0.2s ease;
}

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

/* Modal Body */
.modal-body {
    padding: 20px;
}

.image-container {
    position: relative;
    width: 100%;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    height: 70vh;
}

.image-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#modal-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.navigation-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    pointer-events: none;
}

.prev-btn {
    position: absolute;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    pointer-events: auto;
    z-index: 10;
}

.next-btn {
    position: absolute;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    pointer-events: auto;
    z-index: 10;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
    pointer-events: auto;
}

.zoom-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.zoom-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.image-counter {
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #777;
}

#modal-description {
    color: #555;
    line-height: 1.6;
}

/* Modal Footer */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Dark Mode Styles */
.dark-mode .modal-content {
    background-color: #222;
    color: #eee;
}

.dark-mode .modal-header {
    border-bottom-color: #333;
}

.dark-mode .modal-header h2 {
    color: #eee;
}

.dark-mode .close-modal {
    color: #aaa;
}

.dark-mode .close-modal:hover {
    color: #fff;
}

.dark-mode .image-container {
    background-color: #333;
}

.dark-mode #modal-description {
    color: #ccc;
}

.dark-mode .modal-footer {
    border-top-color: #333;
}

.dark-mode .nav-btn {
    background-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
    
    #modal-image {
        max-height: 60vh;
    }
}
