/* ================= LUXURY MODAL STYLES & ANIMATIONS ================= */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(7, 20, 15, 0.85); backdrop-filter: blur(8px);
    z-index: 9999; align-items: center; justify-content: center;
    opacity: 0; animation: fadeInOverlay 0.4s forwards;
}

@keyframes fadeInOverlay { to { opacity: 1; } }

.modal-content {
    background: #ffffff; width: 95%; max-width: 850px;
    border-radius: 20px; overflow: hidden; position: relative;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    transform: scale(0.9); opacity: 0;
    animation: popInModal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popInModal { to { transform: scale(1); opacity: 1; } }

.modal-header-banner {
    background: #07140f; padding: 40px 30px 30px; text-align: center;
    border-bottom: 4px solid #d7a84f; position: relative;
}

.modal-header-banner h2 { color: #ffffff; margin: 0 0 10px 0; font-size: 34px; font-weight: 900; }
.modal-header-banner h2 span { color: #d7a84f; }
.modal-header-banner p { color: #b7c8c0; font-size: 16px; margin: 0; }
.highlight-role { color: #07140f; background: #d7a84f; padding: 4px 15px; border-radius: 20px; font-weight: 800; display: inline-block; margin-left: 8px; }

.close-modal {
    position: absolute; top: 15px; right: 25px; font-size: 32px;
    color: #ffffff; cursor: pointer; transition: 0.3s;
}
.close-modal:hover { color: #d7a84f; transform: rotate(90deg); }

.modal-form-container { padding: 35px 40px; overflow-y: auto; }

/* Staggered Form Animations */
.anim-delay-1 { animation: slideUpFade 0.5s 0.1s forwards; opacity: 0; }
.anim-delay-2 { animation: slideUpFade 0.5s 0.15s forwards; opacity: 0; }
.anim-delay-3 { animation: slideUpFade 0.5s 0.2s forwards; opacity: 0; }
.anim-delay-4 { animation: slideUpFade 0.5s 0.25s forwards; opacity: 0; }
.anim-delay-5 { animation: slideUpFade 0.5s 0.3s forwards; opacity: 0; }
.anim-delay-6 { animation: slideUpFade 0.5s 0.35s forwards; opacity: 0; }
.anim-delay-7 { animation: slideUpFade 0.5s 0.4s forwards; opacity: 0; }
.anim-delay-8 { animation: slideUpFade 0.5s 0.45s forwards; opacity: 0; }

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

.section-divider { display: flex; align-items: center; text-align: center; margin: 25px 0 20px; }
.section-divider::before, .section-divider::after { content: ''; flex: 1; border-bottom: 1px solid #e0e0e0; }
.section-divider span { padding: 0 15px; color: #888; font-size: 13px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }

.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group label { color: #07140f; font-weight: 700; font-size: 14px; margin-bottom: 8px; }

/* Clean White Inputs */
#candidateForm input[type="text"], #candidateForm select {
    width: 100%; padding: 14px 16px; border: 1.5px solid #e0e0e0; border-radius: 10px;
    background: #fdfdfd; color: #333; font-size: 15px; transition: 0.3s;
}
#candidateForm input[type="text"]:focus, #candidateForm select:focus {
    outline: none; border-color: #d7a84f; background: #ffffff; box-shadow: 0 5px 15px rgba(215, 168, 79, 0.15); transform: translateY(-2px);
}

/* Custom File Upload */
.custom-file-upload { position: relative; width: 100%; }
.custom-file-upload input[type="file"] { display: none; }
.custom-file-upload label {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 25px; border: 2px dashed #ccc; border-radius: 12px; background: #f9f9f9;
    cursor: pointer; transition: 0.3s; color: #555; text-align: center;
}
.custom-file-upload label:hover { border-color: #d7a84f; background: rgba(215, 168, 79, 0.05); color: #07140f; }
.upload-icon { font-size: 30px; margin-bottom: 10px; }

/* Submit Button */
.submit-app-btn {
    background: #d7a84f; color: #07140f; border: none; padding: 18px; width: 100%;
    border-radius: 10px; font-size: 16px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; cursor: pointer; margin-top: 20px; transition: 0.4s ease;
}
.submit-app-btn:hover { background: #07140f; color: #d7a84f; box-shadow: 0 10px 25px rgba(7, 20, 15, 0.3); transform: translateY(-3px); }

.app-status-msg { margin-top: 15px; text-align: center; font-weight: bold; font-size: 15px; }

@media (max-width: 768px) {
    .form-grid-3, .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
    .modal-form-container { padding: 25px; }
    .modal-header-banner h2 { font-size: 26px; }
}