/* Apply Now program picker modal */
#applyProgramsModal {
    position: fixed;
    inset: 0;
    z-index: 9997;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

#applyProgramsModal.is-open {
    display: flex;
}

#applyProgramsModal .apply-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 31, 63, 0.72);
    backdrop-filter: blur(4px);
}

#applyProgramsModal .apply-modal-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
    animation: applyModalIn 0.3s ease;
}

#applyProgramsModal .apply-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid #e8edf4;
}

#applyProgramsModal .apply-modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #001f3f;
}

#applyProgramsModal .apply-modal-subtitle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #64748b;
}

#applyProgramsModal .apply-modal-close {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

#applyProgramsModal .apply-modal-body {
    padding: 1rem 1.5rem 1.5rem;
}

#applyProgramsModal .apply-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
}

#applyProgramsModal .apply-program-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 100%;
}

#applyProgramsModal .apply-program-card:hover {
    transform: translateY(-2px);
    border-color: #001f3f;
    box-shadow: 0 12px 24px rgba(0, 31, 63, 0.12);
}

#applyProgramsModal .apply-program-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

#applyProgramsModal .apply-program-card__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #eef4ff;
    color: #001f3f;
}

#applyProgramsModal .apply-program-card__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    background: #fff3df;
    color: #8a5d09;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#applyProgramsModal .apply-program-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #001f3f;
}

#applyProgramsModal .apply-program-card__desc {
    margin: 0;
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #64748b;
}

#applyProgramsModal .apply-program-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #001f3f;
}

#applyProgramsModal .apply-program-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
}

body.apply-programs-modal-open {
    overflow: hidden;
}

@keyframes applyModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

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

@media (prefers-reduced-motion: reduce) {
    #applyProgramsModal .apply-modal-panel {
        animation: none;
    }
}
