/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 2% auto;
    padding: 3rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.modal-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 3rem 0;
}

.modal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border-radius: 0.5rem;
    overflow: hidden;
}

.modal-content thead {
    background-color: var(--primary-color);
    color: white;
}

.modal-content th,
.modal-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.modal-content tbody tr:hover {
    background-color: var(--bg-light);
}

.close {
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-white);
    padding: 0 1rem;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 2rem 1.5rem;
    }

    .close {
        font-size: 2.5rem;
    }
}

.project-image {
    width: 50%;
    height: auto;
    min-height: 250px;
    overflow: hidden;
    border-radius: 0.75rem;
    margin: 0 auto 1.5rem auto;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}