/* ============================================
   RESUME MODAL — Light Theme
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #ffffff;
    margin: 4% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-card);
    position: relative;
    overflow: hidden;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
    line-height: 1;
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 600;
}

.modal-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal-body {
    padding: 16px;
    height: 80vh;
    background: #f8fafc;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: white;
}

/* Download Button */
.download-btn {
    background: var(--accent-purple);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 15px var(--accent-purple-glow);
    text-decoration: none;
}

.download-btn:hover {
    background: var(--accent-purple-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-purple-glow);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .modal-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .modal-controls {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: 8% auto;
    }

    .modal-body {
        height: 70vh;
    }
}

/* Certificate & Badge Image Preview Modal */
.cert-modal-content {
    max-width: 800px;
    margin: 3% auto;
}

.cert-modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 16px;
    height: auto;
    max-height: 80vh;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.cert-modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-card);
}

@media (max-width: 768px) {
    .cert-modal-content {
        width: 95%;
        margin: 8% auto;
    }
    .cert-modal-body img {
        max-height: 55vh;
    }
}