/* Project Modal Styles */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.project-modal.active {
    display: block;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2rem auto;
    max-width: 1200px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

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

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-gallery {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.modal-gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-gallery-item.active {
    opacity: 1;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-nav:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.modal-details {
    padding: 2rem;
}

.modal-details h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 2rem;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.project-meta div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
}

.project-meta i {
    color: #3498db;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.project-description {
    margin-bottom: 2rem;
}

.project-description h3,
.project-features h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-description p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.project-features li {
    position: relative;
    padding-left: 1.5rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.project-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* Responsive Styles */
@media (min-width: 992px) {
    .modal-body {
        flex-direction: row;
    }
    
    .modal-gallery {
        width: 60%;
        height: 500px;
    }
    
    .modal-details {
        width: 40%;
        padding: 2.5rem;
        overflow-y: auto;
        max-height: 500px;
    }
    
    .project-meta {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991px) {
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }
    
    .modal-gallery {
        height: 350px;
    }
    
    .project-meta {
        grid-template-columns: 1fr;
    }
}

/* Animation for modal content */
@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content > * {
    animation: slideIn 0.5s ease-out forwards;
}
