.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 92%;
    max-width: 800px;
    direction: rtl;
    position: relative;
    transform: translateY(20px);
    animation: modalSlideIn 0.3s ease-out forwards;
}

@keyframes modalSlideIn {
    to {
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    color: #64748b;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
}

.close:hover {
    background: #e2e8f0;
    color: #334155;
    transform: rotate(90deg);
}

#modalJobDetails h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    background: linear-gradient(120deg, #3498db, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#modalJobDetails p {
    margin-bottom: 1rem;
    color: #475569;
    line-height: 1.8;
    font-size: 1.05rem;
}

#modalJobDetails strong {
    color: #1e293b;
    font-weight: 600;
    background: linear-gradient(120deg, #3498db20, #2563eb20);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}

#modalJobDetails .job-detail {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: transform 0.2s ease;
    will-change: transform;
}

#modalJobDetails .job-detail:hover {
    transform: translateX(-5px);
}

#modalJobDetails .job-detail i {
    margin-left: 1rem;
    color: #3498db;
    font-size: 1.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalJobDetails .apply-job {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: linear-gradient(120deg, #3498db, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    width: 100%;
    max-width: 300px;
    position: relative;
    overflow: hidden;
}

#modalJobDetails .apply-job::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

#modalJobDetails .apply-job:hover::before {
    transform: translateX(100%);
}

#modalJobDetails .apply-job:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

#modalJobDetails .apply-job:active {
    transform: translateY(1px);
}

#modalJobDetails .requirements,
#modalJobDetails .description {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.3s ease;
}

#modalJobDetails .requirements:hover,
#modalJobDetails .description:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#modalJobDetails .requirements h3,
#modalJobDetails .description h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

#modalJobDetails .requirements h3 i,
#modalJobDetails .description h3 i {
    margin-left: 0.75rem;
    color: #3498db;
    font-size: 1.25rem;
}

#modalJobDetails ul {
    list-style-type: none;
    padding-right: 0;
}

#modalJobDetails ul li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.75rem;
    color: #475569;
}

#modalJobDetails ul li:before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    color: #3498db;
    font-size: 0.9rem;
    top: 0.25rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

#modalJobDetails ul li:hover:before {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 480px) {
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
    }

    #modalJobDetails h2 {
        font-size: 1.75rem;
    }

    .close {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}
